Author Topic: V3.99_ModbusTCPcom Multiple Addresses Issues  (Read 1144 times)

Pierre Marier

  • Newbie
  • *
  • Posts: 4
    • View Profile
V3.99_ModbusTCPcom Multiple Addresses Issues
« 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,


Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: V3.99_ModbusTCPcom Multiple Addresses Issues
« Reply #1 on: March 22, 2017, 09:34:37 AM »
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?

Pierre Marier

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: V3.99_ModbusTCPcom Multiple Addresses Issues
« Reply #2 on: March 22, 2017, 10:34:38 AM »
Hello Archie,

You were right, the PLC address range was incorrect.
Thank you for the quick reply and support!

Pierre,