From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial communication does not work in an executable.

Solved!
Go to solution

I have created a vi that communicates with a serial device. It works fine on the computer that it was creatd on. I then created an application and then built an installer to put it on another machine. The second machine does not have LV 2009 on it. Once installed on the machine the vi does not work. When it runs on the computer with LV 2009 the the com port control is a pull down, and it lists all comports on the computer and then you select the one you want to connect with. The computer that the vi is installed on does not list the available com ports. This leads me to believe that there is no serial comms support in the installable version. What do I do now?? I noticed that you can add "Additional Installers" when you build the installer and one of them is NI-Serial 3.4. I try to add this and a message said that it had to get, so I didn't use it thinking it was more than I needed and that standard com port driver would be included. Am I wrong here or am I missing something else?? All help is greatly appreciated.

 

ssmith@bnl.gov

0 Kudos
Message 1 of 18
(9,008 Views)
Solution
Accepted by topic author ssmith490D
I'm pretty sure NI-Serial is the driver for NI's COM port cards, and that most likely you instead need to install NI-VISA.  You can add the VISA installer as an additional installer to your application.  It may ask you for a DVD during the build process, because even though the software is already on your machine, the installer for it probably is not.
Message 2 of 18
(9,004 Views)
NI-Serial is indeed only for NI's serial cards. nathand is correct - you're missing NI-VISA on the target machine.
0 Kudos
Message 3 of 18
(8,988 Views)
NI-VISA and NI-VISA run time have different pass-through licensing requirements.   While I'm not fully up on the ins and outs I believe you would want to deploy the Run-Time license and not the full NI-VISA install

"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 18
(8,970 Views)
So the NI-VISA is not included in LV 2009 Professional?? Is this available as a download or do I have to buy it??
0 Kudos
Message 5 of 18
(8,945 Views)
Of course it's included. You used it on the development pc. You just did not include the VISA runtime when you built your installer. I would also recomend that you export your hardware configuration from MAX and install that along with MAX.
0 Kudos
Message 6 of 18
(8,938 Views)

Thanks for the help. I did not include the NI-VISA Runtime as an additional installer.

 

SSmith

0 Kudos
Message 7 of 18
(8,903 Views)

Hi  at all!!

I'm new in NI forum.

I have one similar problem. My VI communicate with external device on serial port. The VI work very well, but when I create executable (.exe) file with Labview application builder (on Labview 2010) the .exe don't use serial port!!! The executable run perfectly (nothing error or warning by the application builder), but the serial data on selected COM port  isn't send!!! Also on the PC where I developed the VI!!!

 

What can I do?

Thanks for all!!

0 Kudos
Message 8 of 18
(8,456 Views)

Claudio--

       When you build the installer remember to add the NI-Serial, Under the "Additional Installers" tab. You might have to also add NI-VISA Runtime also. Hope this helps.

 

ssmith

0 Kudos
Message 9 of 18
(8,419 Views)

@claudio.rossi wrote:

Hi  at all!!

I'm new in NI forum.

I have one similar problem. My VI communicate with external device on serial port. The VI work very well, but when I create executable (.exe) file with Labview application builder (on Labview 2010) the .exe don't use serial port!!! The executable run perfectly (nothing error or warning by the application builder), but the serial data on selected COM port  isn't send!!! Also on the PC where I developed the VI!!!


What do you mean by your last sentence?  Are you trying to say that you can't run your executable even on the same computer on which you developed the application?  If so, was LabVIEW open when you tried to run it?  Try quitting LabVIEW; if you had previously run your VI and didn't close the serial port, LabVIEW might have kept it open, which would prevent the executable from accessing it.  If the executable won't run on the development machine it's unlikely to be resolved by installing VISA since you need that installed for the VI to work properly in the development environment.  Do you have any error handling in your code that would indicate if an error occurred after trying to write to the serial port (an indicator on the front panel, or a call to Simple Error Handler)?

0 Kudos
Message 10 of 18
(8,411 Views)