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.

General command script
#8
(17.02.2021, 14:40)admin Wrote: I suppose you need something like this. 32/1/6 = 1 when both modes are 1, 0 otherwise; 32/1/7 = 1 when both modes are 2, 0 otherwise and so on.
Code:
mode1 = grp.getvalue('1/1/1')
mode2 = grp.getvalue('1/2/1')

function check(value)
  if mode1 == value and mode2 == value then
    return 1
  else
    return 0
  end
end

grp.checkwrite('32/1/6', check(1))
grp.checkwrite('32/1/7', check(2))
grp.checkwrite('32/1/8', check(3))
grp.checkwrite('32/1/9', check(4))

Exactly, this is exactly that i need. Thank you ppl. I really don't understand why my company use Schneider device... Here in LM there is a information for everything and you guys helps a lot. We have 5 projects with wiser and a lot of the thinks i am getting from here. Thank you again for the support! Be safe
Reply


Messages In This Thread
General command script - by svetoslavp - 17.02.2021, 13:11
RE: General command script - by Daniel - 17.02.2021, 13:43
RE: General command script - by svetoslavp - 17.02.2021, 14:24
RE: General command script - by Daniel - 17.02.2021, 14:36
RE: General command script - by admin - 17.02.2021, 14:40
RE: General command script - by svetoslavp - 17.02.2021, 15:08
RE: General command script - by svetoslavp - 17.02.2021, 14:48
RE: General command script - by Daniel - 17.02.2021, 15:02

Forum Jump: