
SBAppakaya (Customer) asked a question.
I started off with the library pyModbusTCP and the eeip. Nothing seems to work and it looks like there is not a lot of applications that use this. Any help is much appreciated.

SBAppakaya (Customer) asked a question.
I started off with the library pyModbusTCP and the eeip. Nothing seems to work and it looks like there is not a lot of applications that use this. Any help is much appreciated.

You may want to start with a Modbus TCP interface application like ModbusPoll from the link below to establish communications and verify you can read when you need from the coupler.
https://modbustools.com/modbus_poll.html
If that works then you know exactly what addresses you need to read/write to/from.

Thank you for a quick response.
I think I started off in this path, but, I was getting the Write error for any configuration. Stopped there after that dead-end.
They have a an addressing tool, which does not give many details. Attaching the screenshot, let me know if you have any suggestions.

You will use modbus function code 4 to read from hex address 0x30202. Here is a table to modify the addresses for the different function codes. From the user manual.

Thank you. I think I was there as well. Here is the screenshot of Modbus poll configs I have used. Hope you had a chance to look at my response to your comment in the other thread.

Choose addressing mode of hex. Check address in cell also to see which address is for the data.
With the pyModbusTCP library, write the code 'read_input_registers(514, 1)'

Still same error with Modbus Poll, But here are some variations of the configs:
To match the PLC Address to '30202':
With Hex selected and 514 as the input:
Python code also didn't work. But here is the code and its output:

The hex address in Modbus poll should be 202 with a quantity of 2. The data is only 2 bytes as shown in the addressing tool. Trying to read too much data will give an error.
in python code, the 5 should be a 2. Trying to read too much data will cause it to fail.

The addressing tool will also give you the modbus TCP addresses for your setup. It can be downloaded at https://www.automationdirect.com/support/software-downloads?itemcode=XGB+Field+I-O.

Thank you for the response. Here is the screenshot of the addressing tool. I had for some time now and I am not sure if I understand how to use the information in it with the ModbusPoll.
I also have the XG5000 software and using the monitoring tool, I can see the inputs going on and off.
Copyright © 1999-2023 AutomationDirect. ALL RIGHTS RESERVED
The hex address in Modbus poll should be 202 with a quantity of 2. The data is only 2 bytes as shown in the addressing tool. Trying to read too much data will give an error.
in python code, the 5 should be a 2. Trying to read too much data will cause it to fail.