LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW as Slave in Modbus

Hi everyone,

                         Is it possible to use LabVIEW as a slave in Modbus using VISA serial? I am developing a program to test the Modbus query received from my hardware, and the program is nearly complete. However, I need to fix one last error. 

  My hardware will send a sequence of 6 queries, which may involve multiple reads or writes. If LabVIEW responds to query 1, the hardware will send query 2. If LabVIEW does not respond to query 1, the hardware will repeat the same query twice. If there is still no response from LabVIEW, the hardware will repeat the query one more time. If LabVIEW does not respond after this third attempt, the hardware will then send query 2. This process will continue until the disconnect button is pressed.

 

Question 1: Without using "Byte at the Port," is there any other option to get the correct byte for all queries (Multi Read = 8 bytes, Multi Write = Undefined Byte)?

Question 2: I have separated the queries by receiving 1 byte at a time, but I’m facing some errors. When query 1 is received and LabVIEW responds to it, the same query comes again, and LabVIEW responds correctly. However, when I connect the hardware to Dock light, it responds correctly at first time the same query is not repeating and hardware thrown the query 2 

 

Thanks  

0 Kudos
Message 1 of 2
(144 Views)

NI Modbus Library Toolkit for LabVIEW provides API and examples for both master and slave.

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
0 Kudos
Message 2 of 2
(81 Views)