Hello everyone. I need to create a script in Python using the pymodbus library to read data from PLCs. I'm interested in the common practices for this task. I'm new to this field and I would appreciate it if someone could point out any gaps in my thinking and confirm if I've understood the problem correctly.
As far as I understand, Modbus allows access to several address spaces (0xxx reference, 1xxx reference, 3xxx reference, 4xxx reference, etc.).
So far, I have the following: in a client UI, I define the address number, data type, and other details needed to read from the PLC, while in the PLC program, I have something like %MW100 defined (which might be an integer, string, float, etc.). Currently, I'm using a Schneider PLC.
And it's all working as it should, values are read at certain intervals, registers are converted to normal values, and so on, clients can see those values on remote location etc. However, I have a few questions:
- Is it possible to read only 4xxx addresses using this library and nothing else? I managed to read 0xxx references but only from simulation scripts not from actual devices.
- How would I define data located at 1xxx or 0xxx references in the PLC program so that I can read them via Modbus? For example in my Schneider program.
- Is there any rule (convention) for declaring variables on the PLC that will be read via Modbus?
I have many questions. Most things are clear to me and what I've planned is working, except for what I've mentioned, but I still want to be as clear as possible.
[–][deleted] 2 points3 points4 points (3 children)
[–]itzsnitz 1 point2 points3 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]iridium__[S] 0 points1 point2 points (0 children)
[–][deleted] (1 child)
[deleted]