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.

traffic light effect
#3
(02.05.2024, 07:38)admin Wrote: Use this resident script. Sleep time controls when the next lamp will be turned on. Any number of objects can be specified.
Code:
objects = {
  '0/0/1',
  '0/0/2',
  '0/0/3',
}

curr = (curr or 0) + 1

if curr > #objects then
  curr = 1
end

if prev then
  grp.checkwrite(objects[ prev ], false)
end

grp.checkwrite(objects[ curr ], true)
prev = curr

This script can be enabled/disabled from a different script using these functions: https://kb.logicmachine.net/libraries/lu...enablename

objects = {
  '1/0/51',
  '1/0/53', 
}

curr = (curr or 0) + 1

if curr > #objects then
  curr = 1
end

if prev then
  grp.checkwrite(objects[ prev ], false)
end

grp.checkwrite(objects[ curr ], true)
prev = curr

Hello, I put the data in this way, where do I see the time it is supposed to change, it doesn't work, I work with a Schneider LS 100 200 product, thanks
Reply


Messages In This Thread
traffic light effect - by Nir70 - 01.05.2024, 16:12
RE: traffic light effect - by admin - 02.05.2024, 07:38
RE: traffic light effect - by Nir70 - 02.05.2024, 16:43
RE: traffic light effect - by Daniel - 02.05.2024, 16:47

Forum Jump: