Author Topic: Using "EthernetIPforCLXCom1.Write" how maney INTS can be written with one shot  (Read 1015 times)

Richard Waterson

  • Newbie
  • *
  • Posts: 9
    • View Profile
Using "EthernetIPforCLXCom1.Write" how many INTS can be written to a CLX5000 array in one shot.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5270
    • View Profile
    • AdvancedHMI
Since the driver does not support automatically handling partial packets when writing, this is determined by the PLC packet size. Most Compact/ControlLogix support a 500 byte packet size. If you subtract about 30 bytes for the header, this leaves 470 bytes for data. DINT needs 4 bytes, so you should be able to write at least 117 DINTs and double that for INTs.

Richard Waterson

  • Newbie
  • *
  • Posts: 9
    • View Profile
I am writing a program in C# and Im trying to write the max INT's at one time. The issue is a INT in C# is comparable to a dint in the plc. The "EthernetIPforCLXCom1.Write only allows a INT to write. I need it to be able to write a "short" which is a INT in the PLC, Am I wrong? Im only now able write to 129 PLC INT's max per shot

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5270
    • View Profile
    • AdvancedHMI
It depends on the tag type in the PLC. The driver will first read the tag to get the type, then convert the data to be written into the format to match the PLC data type. If you are writing to an INT tag, then it will only send 2 bytes per INT. A DINT type will send 4 bytes per DINT