Error 56 Occurs When Using Modbus API

Updated Jul 22, 2019

Reported In

Software

  • LabVIEW Datalogging and Supervisory Control Module
  • LabVIEW Real-Time Module

Issue Details

I am using the Modbus API that installs with the LabVIEW Datalogging and Supervisory Control (DSC) or Real-Time Modules to communicate with a Modbus slave device. When I try to read a coil or register on the slave device, I get the following error:

Error 56 occurred at SubVIs.lvlib:RTU Data Unit.lvclass:Read ADU Packet.vi:5030001

Possible reason(s):

LabVIEW: (Hex 0x38) The network operation exceeded the user-specified or system time limit.

 

Solution

This error indicates that the Modbus slave device did not respond to your read request within the timeout specified for the Modbus session. 
  • Make sure that the device is powered-on and ready to receive communication.
  • If using the TCP polymorphic instance of the Create Master VI, make sure that you have specified the correct IP address and port of the slave device.
  • If using the Serial polymorphic instance of the Create Master VI, make sure that you have specified the correct serial port, Unit ID, parity, and flow control settings. Refer to the manual for your device for information on how these should be set.

Additional Information

Error 56: Timeout When Communicating Between Network Devices Using NI Software