LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Opening a specific com port

I have a device connected via USB and I want to open it using the COM port. It is not a NI device. I was wondering how to specifically code it to open when ran

0 Kudos
Message 1 of 11
(4,842 Views)

I assume its a virtual com port?

If this is the case, you need to know the port number and open it using VISA serial as if it is a standard com port.

 

Else, I dont understand the question.

 

Deceased

0 Kudos
Message 2 of 11
(4,830 Views)

Yes it is a virtual com port. How do i use visa serial and code it in order to open the device up? Because I will use this in TestStand to call it and run the device later on

0 Kudos
Message 3 of 11
(4,805 Views)

There are several examples that ship with Labview for connecting to a serial device.  The process is no different for virtual COM ports.  Look up these examples and give it a try.  If you have specific questions after attempting it, please respond back with code and explanation for what you are trying to do.

aputman
0 Kudos
Message 4 of 11
(4,789 Views)

I have found an example. I am trying to configure it right now. I will see if any problems arise

0 Kudos
Message 5 of 11
(4,785 Views)

 

ANY of the serial port examples will work.

 

Don't get hung up on it being a USB device or a "virtual" com port.

 

To LabVIEW, VISA, and your program there is no difference between a USB serial port adaptor with a virtual com port and and actual hardware UART com port.  

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 11
(4,778 Views)

I have been searching and found many with using Visa read and write functions. But doesn't that only read the file  and write to it? My device being hooked up measures batteries when inserted so I want to open the device up when called the program is ran. I am new to labview, have been doing this for 2 weeks so sorry for asking all the questions. 

0 Kudos
Message 7 of 11
(4,773 Views)

I started it by configuring the serial port. Not sure if this is the correct beginning, but after configuring, and showing what port it is located, what would the next step be?

0 Kudos
Message 8 of 11
(4,764 Views)

You will need to know how to communicate with the instrument connected to that COM port.  Look in  the documentation of the device for a list of commands.  For instance, if you have a gram scale, you would send a command to get the weight, the device receives the command, sends the response and you read the response.  

aputman
0 Kudos
Message 9 of 11
(4,757 Views)

I already have the built VI which takes the data after putting the battery in. Im looking for a way to code in Labview to get the device's window to pop open when ran in TestStand. The data which it sends has already been coded.

0 Kudos
Message 10 of 11
(4,749 Views)