Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Write String to Serial port

The goal is to select a string (button) to send to a RS-232 instrument using a USB to serial converter to be run on any PC from an EXE file. The front panel buttons will select which string to send and select the proper com port. Reading messages is only for errors. When running example simple serial.vi, VISA is installed and does not find the virtual port (Port 😎 in the list. Can a program (with or without VISA) be converted to an EXE file?  Can a program in LabView, that does not use VISA, communicates directly with a serial port? Naturally the user must know which com port the USB converter is installed. This is typically a Virtual port, not com 1-4. I am looking for an example project or VI to complete the inital testing on LV2014 or LV8.6. Does anyone have a suggestion of the best way to complete this simple task?

0 Kudos
Message 1 of 5
(798 Views)

This is an excellent tutorial to learn Serial control using LabVIEW - https://labviewwiki.org/wiki/VIWeek_2020/Proper_way_to_communicate_over_serial

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 5
(786 Views)

@Powertech101 wrote:

The goal is to select a string (button) to send to a RS-232 instrument using a USB to serial converter to be run on any PC from an EXE file. The front panel buttons will select which string to send and select the proper com port. Reading messages is only for errors. When running example simple serial.vi, VISA is installed and does not find the virtual port (Port 😎 in the list. Can a program (with or without VISA) be converted to an EXE file?  Can a program in LabView, that does not use VISA, communicates directly with a serial port? Naturally the user must know which com port the USB converter is installed. This is typically a Virtual port, not com 1-4. I am looking for an example project or VI to complete the inital testing on LV2014 or LV8.6. Does anyone have a suggestion of the best way to complete this simple task?


1. A virtual port should still show up as a COM port.  If not, you likely do not have the right drivers installed.

2. VISA is an abstraction, but makes the communications super easy.  I don't think the raw serial VIs are supported anymore.

3. You were already given a link to my presentation on communicating over a serial port.  Go watch it.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 5
(783 Views)

Okay, Thanks for the video suggestion. The serial VI is sending to the instrument and recieving data on a XP that has a dedicated COM1, which can be selected by VISA. The XonXoff function was removed. VISA is not able to find the USB to RS-232 on virtural Com 8. The correct unsigned driver from Tripp-Lite was installed and communcations work when using a terminal program. When a driver is unsigned is VISA not able recognize the serial port?. Tripp-Lite does not offer a LabView driver. Is there a work around for this? Maybe there is a method for VISA to recognize a virtal port?

0 Kudos
Message 4 of 5
(748 Views)

If Windows sees the COM port, so should VISA.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 5
(737 Views)