LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulate Modbus

I have an application that requires Modbus. When the application communicates with the hardware there is no Modbus error otherwise it throws  "Modbus error detected. Please try to re-initialize". I have to make some upgrades to the recipe/application and need to debug it without connecting it to the hardware everytime. Is it possible to simulate the process of Modbus?

0 Kudos
Message 1 of 3
(2,191 Views)

Modbus Serial or TCP? There are a number of Modbus TCP Server applications for Windows floating around (try Google), you'd just need to run the server and then customise your LabVIEW app to point to your localhost (or 127.0.0.1).

 

If you are running Modbus Serial, and you have two serial ports on your machine, there are also Modbus Serial server applications for Windows too; although you'll need to have the hard-wired cable between the two ports.

 

Otherwise there is no 'easy' way to simulate Modbus unless the API you are using supports it.

Message 2 of 3
(2,184 Views)

There are more then one way to simulate:

 

Simulated device (make a fake device that really communicates like the real one)

Simulated protocol data (e.g. play back recorded data in stead of a real read)

Simulated results (fake the entire driver)

 

You could simply make a switch in the application to simulate data. This doesn't really simulate Modbus, but it would allow you to run your program.

0 Kudos
Message 3 of 3
(2,132 Views)