14.02.2020, 12:06 (This post was last modified: 14.02.2020, 12:08 by UfficioTecnicoEE.)
Hello Everyone,
I have to write a single bit of a register with a boolean value.
Can you help me with a script?
In the attachment you can find the register that I have to use.
For example I have to command the Bit0
Thanks for your reply, but I'm a beginner in this things.
Why I have to calculate the value of 3 object together? The post that you send me is good for 1 object also?
Thank you so much for your patience
Example can be changed to accept any number of input objects.
If you want to convert boolean value to a number you can do this via an event script (1/1/2 is output object):
Code:
123
value = event.getvalue()
out = valueand1or0grp.write('1/1/2', out)
(14.02.2020, 12:15)admin Wrote: Example can be changed to accept any number of input objects.
If you want to convert boolean value to a number you can do this via an event script (1/1/2 is output object):
Code:
123
value = event.getvalue()
out = valueand1or0grp.write('1/1/2', out)
Sorry, I explain all my situation so I can understand all better.
I have created a script that read all the bit of a register (in this case the register 1280):
so at my address 32/1/1 there is the boolean value of the Bit0 of the register 1280.
Now I have to command the Bit0 of the register n°1280 with a boolean value.
Can you please write me all the script, so I can write it for the other commands.
Thank you very much and sorry for bothering you.