22.02.2023, 13:19
(21.02.2023, 12:05)Nir70 Wrote:I need to insert a virtual object, the address 0/0/2 cannot be in the controller, what does binary mean, I don't have such an option in objects(20.02.2023, 08:36)admin Wrote: Map this script to a binary object. 0/0/2 is a numeric output object that the script modifies in the 0..6 interval (7 total steps). false is step down, true is step up.
Code:step = event.getvalue() and 1 or -1
curr = grp.getvalue('0/0/2') + step
curr = math.min(curr, 6)
curr = math.max(curr, 0)
grp.update('0/0/2', curr)
ok thanks very much i will check