Logic Machine Forum
Script that reads from the bus and write - 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: Script that reads from the bus and write (/showthread.php?tid=3537)



Script that reads from the bus and write - streilkx - 31.08.2021

Hello there,

Could you help me with a script that reads from the bus, every 10 minutes, the value (1 byte,%) of the object 2/3/11 and writes it back to the bus?


Thanks for help!


RE: Script that reads from the bus and write - Kapudan - 31.08.2021

Add a resident script with sleep interval 600

value = grp.getvalue('2/3/11')
grp.write('2/3/11', value)


RE: Script that reads from the bus and write - admin - 31.08.2021

Resident cannot have a delay larger than 60 seconds. Use a scheduled script instead. If you want to send a read request periodically just set poll interval in object properties.


RE: Script that reads from the bus and write - Kapudan - 31.08.2021

(31.08.2021, 16:22)admin Wrote: Resident cannot have a delay larger than 60 seconds. Use a scheduled script instead. If you want to send a read request periodically just set poll interval in object properties.

Sorry, I didn't know.

What about a resident script like this:

value = grp.getvalue('2/3/11')
grp.write('2/3/11', value)
os.sleep(600)

?


RE: Script that reads from the bus and write - admin - 31.08.2021

This will work as well


RE: Script that reads from the bus and write - streilkx - 01.09.2021

(31.08.2021, 16:22)admin Wrote: Resident cannot have a delay larger than 60 seconds. Use a scheduled script instead. If you want to send a read request periodically just set poll interval in object properties.

where can i find this?

Is a value regulation.

I need the value to be written periodically, not just after a change, detector does not have the optionĀ  Undecided


RE: Script that reads from the bus and write - admin - 01.09.2021

   
But this is only for reading, you still need a script for writing.