Logic Machine Forum
grp.checkwrite - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: grp.checkwrite (/showthread.php?tid=5719)



grp.checkwrite - CristianAgata - 04.11.2024

Good evening,
I have a doubt, I always use checkwrite with the command feedback, here an example:

stato_int = grp.getvalue('cmd_1')
luce_1 = grp.getvalue('luce_1')

if luce_1 == true then
  grp.checkwrite( 'cmd_1' , 1 ,1, stato_int)
  else
  grp.checkwrite( 'cmd_1' , 0,1 , stato_int)
end

And this works fine. 
Problem, on a plant I don't know why, some time I found the command on but status off so I tought to pass the status but it doesn't work. Where m'I wrong?

stato_int = grp.getvalue('Status_cmd_1')
luce_1 = grp.getvalue('luce_1')

if luce_1 == true then
  grp.checkwrite( 'cmd_1' , 1 ,1, stato_int)
  else
  grp.checkwrite( 'cmd_1' , 0,1 , stato_int)
end

Best regards Cristian


RE: grp.checkwrite - admin - 04.11.2024

https://forum.logicmachine.net/showthread.php?tid=4472&pid=35746&highlight=checkwrite#pid35746


RE: grp.checkwrite - CristianAgata - 04.11.2024

(04.11.2024, 15:57)admin Wrote: https://forum.logicmachine.net/showthread.php?tid=4472&pid=35746&highlight=checkwrite#pid35746

Perfert, with the group address it works.... so I don't use the variable read with the grp.getvalue().
Thanks