Checksum error and Insufficient bytes recieved

Hi,
I am new to Modbus. I have a setup where I am trying to read data from the holding registers of a Modbus device. But I am not getting the output. Instead, I am getting two different types of error. When I set the length of registers to be read as 1, then the error is checksum error and when the length of registers to be read is more than 1, then it is insufficient bytes received. I am trying to understand and debug the cause of this error. Can anyone kindly help me.
 
Are you sure your PLC is configured as a Modbus slave and not a Modbus master? If your USB to RS-485 adapter has TX and RX LEDs or if the PLC has TX and RX LEDs, do any of these flash when Modbus Poll is not connected? If so, then your PLC is probably configured as a master too.

Modbus Poll can show the communication traffic by selecting the menu Display->Communication. If you have confirmed that your PLC is a Modbus slave, please open the communication traffic window and include a screenshot of the communication traffic when you are seeing each of the errors you mentioned above.
 
Your TX and RX packets are identical. It appears that your RS-485 adapter may be receiving its own transmissions. You can confirm this by disconnecting or powering off the PLC and see if you still receive the same errors in Modbus Poll.

Assuming from your previous screenshot, you're using a NI PXI-8431/4 serial interface for RS-485 communications. You should be able to select between 4-wire and 2-wire transceiver modes. Make sure you have 2-wire mode selected and are using "DTR/No Echo" or "Auto" for the transceiver control mode.
 
If my previous assumption that Modbus Poll is receiving its own transmissions is correct, after you fix that, I suspect that you will see timeout errors in Modbus Poll because your PLC is not responding to Modbus Poll's requests.

A timeout issue is almost always caused by either incorrect wiring or mismatched configuration settings. Please confirm the following.

Wiring
  • RS-485 + from your computer to RS-485 + on the PLC
  • RS-485 - from your computer to RS-485 - on the PLC
  • RS-485 reference (a.k.a. signal common, signal ground, com, ground, etc.) from your computer to RS-485 reference on the PLC
  • Remove or disable any end-of-line termination (i.e. 120 ohm resistors, EOL dip-switches, etc.)

Configuration Settings
All of the following settings must match in Modbus Poll and your PLC. If you're still having issues, try a lower baud rate on both (i.e. 9600).
  • Baud Rate
  • Data Bits
  • Parity
  • Stop Bits
  • Slave ID
 
Your TX and RX packets are identical. It appears that your RS-485 adapter may be receiving its own transmissions. You can confirm this by disconnecting or powering off the PLC and see if you still receive the same errors in Modbus Poll.

Assuming from your previous screenshot, you're using a NI PXI-8431/4 serial interface for RS-485 communications. You should be able to select between 4-wire and 2-wire transceiver modes. Make sure you have 2-wire mode selected and are using "DTR/No Echo" or "Auto" for the transceiver control mode.
I configured the PXI to two wire auto using labview and then tried to run modbus poll. But then it is showing that the com port is not available. So when the com port is being used by labview I cannot use modbus poll. When I stop labview and run modbus poll then the error which I mentioned in the beginning arrives. Can you please help me solve this problem? Thanking You.
 
Only one application can open a COM port at any time. This is why the COM port is not available in Modbus Poll when you have it open in LabView. There must be some other way to configure your serial interface without having to actively open the COM port in LabView.

Google is your friend here, this is the first result for "national instruments PXI-8431/4 configure 2 wire mode":
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019MPySAM&l=en-US
 
Only one application can open a COM port at any time. This is why the COM port is not available in Modbus Poll when you have it open in LabView. There must be some other way to configure your serial interface without having to actively open the COM port in LabView.

Google is your friend here, this is the first result for "national instruments PXI-8431/4 configure 2 wire mode":
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019MPySAM&l=en-US
Thank you very very much. I have googled it but couldn't find it. Thank you very much. It worked. My task was actually not to get it
working in Modbus Poll, but to get it working in LabVIEW. It was not working in LabVIEW, so I thought I will try Modbus poll and there also it is not working. So I thought if I could find out why it is not working in Modbus poll then I could get it working in LabVIEW and which now finally I did it. I was able to get it working in Modbus Poll, and then I checked it in LabVIEW, and it was working there as well. Thank you very much.
 
Can you tell us what you did to get it working so that others can benefit from your experience?
I did exactly what jschulze told me to do, that is change the transciever mode of the com port i am using to two wire auto in NI MAX. I also change the parameters of the com port in NI Max like baudrate, parity etc to match the PLC. I didnt know earlier that I had to do that. I did that and it worked. I am new to modbus communication.
 
Top