From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

modbus comms issues with Master device

I have another question about the timing of the slave ethernet demon.   What timing can be adjusted?  Ie, I am having a problem with the connection between my NI Modbus simulator and another controller that is runnning a modbus client interface.  I can exchange data, but am having problems with the connection being closed.  This causes the Timeout on the slave demon (5 seconds) to kick in and my updates are taking almost 5 seconds. I get the connection to allow for the exchange of data by making the timing of my client(master) have an update rate of 5 seconds.  This obviously is not a good thing, and although I am exchanging data, I have to wait a very long time. If i try to lower my client to something reasonable (100 ms is ideal), the client continues to close the connection thinking it is not happy with the response from the slave (ser er).  Is there something special I am missing in the TCP layer of the protocol?   Should I be setting something else or sending something else from the Labview Modbus TCP once I have a connection?   

0 Kudos
Message 1 of 4
(5,479 Views)

Greetings wegunterjrNGC

 

Could you please confirm which devise is the one that is taking so long to answer back? Is it your controller or you LabVIEW running computer? Are you using the Modbus Library or with the DSC module? Are you using an example program or was the code written by you? Could you upload a screenshot of the code with the parameters that you set in the devices? Let us know in order to better help you.

 

Warm Regards, 

Luis J.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(5,454 Views)

I am using the NI Modbus 1.2.1 library. I am not using the DSC module.  I wrote the code, but it was based on the example slave (although super-modified to be awesome!).    I am not sure what parameters yuo are asking about exactly.  I was looking down at the MB Ethernet Slave Demon.vi and wondering if you might be asking about its Timeout?   If I run the Slave and Master on the same machine (both using Modbus), it seems to run fine, but that is because the Master Example is not closing the TCP connection if there is too long of a delay from the Slave.   When I run the Slave on one machine and try to connect with the distributed Controller (C++ running on a different embedded device, not Labview)   I am just wondering if there is someway to modify the response times/settings on the Ethernet Slave Demon or the Ethernet Connection manager or something like that.

0 Kudos
Message 3 of 4
(5,447 Views)

Greetings wegunterjrNGC

 

The Ethernet Slave Demon does in fact allow you to change the timeout and the period settings. Both options are controllers available on the Front Panel of the Ethernet Slave Demon. By the way, have you confirmed the correct operation of your controller with other devices or simulators? Is it possible that the problem comes from the controller instead of the configuration of the Ethernet Slave Demon? (I ask because you mentioned that the Ethernet Slave Demon works fine with the Ethernet Master example) Also, have you tried using the plain Ethernet Slave example with your controller? How does that work? Let us know. Have a nice day.

 

Warm Regards, 

Luis J.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(5,425 Views)