Multi Client Modbus Support

3 posts / 0 new
Last post
IdlePhase
IdlePhase's picture
Multi Client Modbus Support

Can the T7 modbus server support multiple clients? I am currently trying to implement a system with a PLC reading/writing registers through modbus tcp/ip as well as a labview application which is streaming/reading all of the aforementioned registers. I thought that modbus tcp/ip was not strictly a 1:1 connection, however I noticed that upon starting the labview application the PLC was blocked and was unable to read the AIN registers from the T7. The labview streaming application scans at 10Hz and the PLC also reads and writes at 10Hz. The exception string thrown by the PLC only when reading, not writing is: "Illegal Data Value", described by the manual as "Typically generated when the Modbus request sent to the CPU [T7] is formed incorrectly." PLC modbus read details

 

Have I misunderstood modbus tcp/ip protocol or am I simply overloading the modbus server by streaming (seems unlikely at the low stream rate)? Is there a way to have multiple modbus tcp/ip clients connect to the T7? So far my best alternative seems to be at the physical layer: using 232 or 485 to directly connect the PLC with T7 uart and handle the reading and writing through a lua script, although this adds far more complexity with level shifting and scripting that I was hoping to avoid by using modbus tcp/ip.

IdlePhase
IdlePhase's picture
I ran some further tests

I ran some further tests working through different combinations of the PLC reading, writing, T7 comm/resp, T7 streaming and found that the PLC modbus connection fails only when labview starts a stream, without even making a call to eReadStream. I have not tested streaming with any other language, so perhaps a clarification on my question is what is it about streaming that blocks other modbus connections? Surely it cannot be a bandwidth issue as I had tested streaming without ever reading the stream.

LabJack Support
LabJack Support's picture
Stream mode does take over

Stream mode does take over the entire analog input system.  When a stream is running analog inputs are not available through command-response.

https://labjack.com/support/software/api/ljm/device-sharing