No Modbus RTU serial communication


Stefan
 Share

Recommended Posts

I'm attempting to get coil status from a Click PLC from port #2 RS232 to the serial port on the PC. I'm running DAQ Factory Starter Release 16.3. DAQ is set to communicate through the serial port with Modbus RTU master to the PLC. The Com port setup appears to be identical, but the Alert that is coming up is: P-ModbusRTU 0010: Timeout with C1038 Timing lag, data acquisition stalled. Resetting timing: 1.000, offset: 0.000. I'm just getting familiar with this software and when completed I would like the PC to control a telescope and observatory so I'm going to need several I/O points going to and coming from the Click PLC. Any help would be appreciated.

Link to comment
Share on other sites

26 minutes ago, AzeoTech said:

Did you setup Port #2 on the Click to be Modbus?  Use their software to verify their comm port settings, then set yours to match.  Finally, go to the comm monitor in DAQFactory and see if you are getting any Rx traffic from your Tx queries.

Well part of the problem is solved. The ports are communicating now, but the status of the coil I'm addressing is not showing up. The communications problem turned out to be the timeout setting on the PC port. I changed that and I'm now getting Rx and Tx traffic and no alerts. However, I'm apparently not getting the coil status that I'm after. The channel I've setup set to Read Coil Status (1). According to the Click PLC the address I'm looking at it has the function codes (01, 05, 15). The Modbus address is unusual, it is 8193. Could the Modbus address be the problem? How do I fix this?

Link to comment
Share on other sites

That is a typical address for a coil.  But if you are not reading any holding or input registers, then you probably need to read 8192.  If you do start reading registers above 30001 you will  need to change your coil status back to 8193.  It has to do with the fact that some manufacturers use 0 indexed notation, and others use 40001 notation (which is offset by 1).  DAQFactory tries to figure out which you are using, but can only really tell if you start using registers instead of coils.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share