AdvancedHMI Software
General Category => Support Questions => Topic started by: Pierre Marier on March 22, 2017, 09:10:40 AM
-
Hello,
I have a PLC (Siemens S7-1214c); ModbusTCP; VS2017 Pro
I have added to the project the ModbusTCPcom object,
set up the IP address, TcpipPort, UnitId. Swap Bytes=T Swap Word=F
The first address I need to read in my PLC is 40001, the last is 40010.
If I set the MaxReadGroupSize to 10: I receive the Illegal Data Value for all addresses
If I set the MaxReadGroupSize to 1: I receive the Illegal Data Value for all addresses except for 40001
What am I doing wrong?
Can the ModbusTCPcom object read more than 1 address?
I thank you for your assistance.
Pierre,
-
The Illegal Data Value is an error returned from the device. So your PLC is not accepting addresses higher than 40001.
Is there a setup in your PLC that defines the number of elements when using function code 3?
-
Hello Archie,
You were right, the PLC address range was incorrect.
Thank you for the quick reply and support!
Pierre,