Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I do an "atomic" bit write using the write_tag() #26

Closed
gman8a opened this issue Apr 15, 2017 · 4 comments
Closed

How can I do an "atomic" bit write using the write_tag() #26

gman8a opened this issue Apr 15, 2017 · 4 comments

Comments

@gman8a
Copy link

gman8a commented Apr 15, 2017

See Wiki page for my "Read-Modify-Write" code.

When multiple clients are connected to a PLC, and the "bit write" method is accomplished at the application layer, by doing "Read-Modify-Write" operation, then there is a good possibility the PLC bit write register will become corrupted, as there are no lock semaphore across connected clients.

Thus the low-level-driver (LLD) needs to support the AB bit write.

Question: Does pycomm support device bit write ?

@ruscito
Copy link
Owner

ruscito commented Apr 15, 2017

Not really sure what are you asking, but you can use "write_tag" to write a boolean

@gman8a
Copy link
Author

gman8a commented Apr 15, 2017

see AB Control logic manual

URL: http://literature.rockwellautomation.com/idc/groups/literature/documents/pm/1756-pm020_-en-p.pdf

page 30

Read Modify Write Tag Service
The Read Modify Write Tag Service provides a means to modify Tag data with
individual bit resolution. Within ControlLogix, the Tag data is read, the logical
or modification masks, or both, are applied, and finally the data is written back to
the Tag. It can be used to modify a single bit within a Tag without disturbing
other data. Its purpose is similar to the PLC-5 style Read Modify Write PCCC
command described in Chapter 5

@gman8a
Copy link
Author

gman8a commented Apr 15, 2017

I see the Read Modify Write Tag Service (0x4e) was not implemented.

@ruscito
Copy link
Owner

ruscito commented Apr 18, 2017

gman8a yes you are right Read Modify Tag Service is not implemented yet; I will take a look, but at the moment I'm focusing more to handle STRING datatype correctly

Thanks
Ago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants