vorfeed
Member
Hi,
I am using the Tuxeip library to talk to a customer's Allen-Bradley PLC5. Tuxeip currently uses DF1 command 0F 67 (Typed Write) to write binary values to the PLC. The only problem with this is that Typed Write can't change individual bits, only the entire word. I can get around this by reading the current word from the PLC and then re-writing it, but this is obviously problematic -- what if the value changes in the PLC in the meantime? It would be much better if there were a way to write a single bit without changing the rest of the word.
Can anyone suggest a better command to use when writing single bits to a PLC5? 0F 26 (Read-Modify-Write) seems to have the same problem, but what about 0F 02 (Bit Write)? Does anyone have any experience with that one?
Thanks for any help you can give me!
I am using the Tuxeip library to talk to a customer's Allen-Bradley PLC5. Tuxeip currently uses DF1 command 0F 67 (Typed Write) to write binary values to the PLC. The only problem with this is that Typed Write can't change individual bits, only the entire word. I can get around this by reading the current word from the PLC and then re-writing it, but this is obviously problematic -- what if the value changes in the PLC in the meantime? It would be much better if there were a way to write a single bit without changing the rest of the word.
Can anyone suggest a better command to use when writing single bits to a PLC5? 0F 26 (Read-Modify-Write) seems to have the same problem, but what about 0F 02 (Bit Write)? Does anyone have any experience with that one?
Thanks for any help you can give me!
Last edited: