User Activity

  • Modified a comment on discussion General Discussion on EasyModbusTCP/UDP/RTU .NET

    Hi all I'm running into an error when I try to read over 120 coils. The first 120 read fine but for some reason cannot read over 120. This code is inside a polling timer: The error highlights the input 121 line of code then i get: System.IndexOutOfRangeException: 'Index was outside the bounds of the array.' ModbusClient PLC = new ModbusClient(plcIP, 502); PLC.Connect(); bool[] inputs = PLC.ReadCoils(0, 20); bool[] inputs2 =PLC.ReadCoils(120, 20); //==========input18 FEEDBACK===========================================...

  • Posted a comment on discussion General Discussion on EasyModbusTCP/UDP/RTU .NET

    Hi all I'm running into an error when I try to read over 120 coils. The first 120 read fine but for some reason cannot read over 120. This code is inside a polling timer: The error highlights the input 121 line of code then i get: System.IndexOutOfRangeException: 'Index was outside the bounds of the array.' ModbusClient PLC = new ModbusClient(plcIP, 502); PLC.Connect(); bool[] inputs = PortalPLC.ReadCoils(0, 20); bool[] inputs2 = PortalPLC.ReadCoils(120, 20); //==========input18 FEEDBACK===========================================...

View All

Personal Data

Username:
anon-user-c
Joined:
2024-12-16 22:56:37.803000

Projects

  • No projects to display.

Personal Tools

MongoDB Logo MongoDB