LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using modbus RTU via serial line, EXE not able to communicate

Hi
I am trying to communicate with a sensor over a serial line using Modbus RTU protocol. My labview VI is the master VI and the sensor is a slave. The labview VI works fine and the EXE works fine too when run on the PC which has labview 2013 installed. The VI was developed using labview 2013 (DSC modbus library was not used). But when I try and run the EXE on a pc with no LV installed (lets call it the pilot PC), i get an error 56 (timeout). I have installed the NI runtime library and the NI VISA runtime library on the pilot PC and port setting are also in order. Can't figure out where the problem lies??  

0 Kudos
Message 1 of 16
(5,355 Views)

Try remote debugging of the .exe to see if you can poke around in the block diagram as the executable is running.

 

0 Kudos
Message 2 of 16
(5,337 Views)

You can also try creating an installer for your EXE just so you're sure that all the runtimes you need are included in the executable.

Ty Prather
Technical Marketing Specialist
National Instruments
0 Kudos
Message 3 of 16
(5,325 Views)
You should have also installed MAX and imported the hardware configuration. Use MAX to test the communication and verify that the resource name is the same.
0 Kudos
Message 4 of 16
(5,296 Views)

I tried installing MAX on the pilot PC, and I can't access the "open VISA panel" option to test my serial port. Can't seem to figure out why??
I created a new installer with the EXE build and NI runtime intsaller, VISA runtime and NI MAX and installed it on the Pilot PC, but that did'nt work either.

 

0 Kudos
Message 5 of 16
(5,259 Views)

I have the same exact issue.   The .exe file works on the machine that I use for Labview Development, but does not work on another machine with Labview Runtime loaded.  The .exe application will open up and operate, but NO RS485 RTU communication.  

 

Has there been any solution to this problem?  

 

LabView 2015 with NI MODBUS library.  

 

0 Kudos
Message 6 of 16
(4,465 Views)

Did you install the NI-VISA runtime?

Message 7 of 16
(4,460 Views)

Installing NI Visa Runtime did the trick.  I really appreciate it.  

 

Thanks,

0 Kudos
Message 8 of 16
(4,450 Views)

I am facing the same problem. If I am creating the Exe. in my computer it works fine, but when I am installing that software in to another PC which has no Labview installed than communication port is not detected through which the command is being to the controller or Slave.

 

If anybody has solution Please help me.

 

0 Kudos
Message 9 of 16
(1,854 Views)

Hi Wajiddjo,

 


@Wajiddjo wrote:

when I am installing that software in to another PC which has no Labview installed than communication port is not detected through which the command is being to the controller or Slave.


So you already followed the suggestion in message #8?

And you verified the VISA reference you use in your VI is valid for that other computer? (Like "COM1" is present and connected?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 16
(1,847 Views)