This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Creating a step counter for the shutter
#8
(21.02.2023, 12:05)Nir70 Wrote:
(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
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
Reply


Messages In This Thread
RE: Creating a step counter for the shutter - by Nir70 - 22.02.2023, 13:19

Forum Jump: