05-25-2017 09:42 AM
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
05-25-2017 10:06 AM
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
05-25-2017 10:33 AM
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
05-25-2017 10:54 AM
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.
05-25-2017 11:06 AM - edited 05-25-2017 11:12 AM
I have found an example. I am trying to configure it right now. I will see if any problems arise
05-25-2017 11:18 AM
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.
05-25-2017 11:33 AM
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.
05-25-2017 11:46 AM
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?
05-25-2017 12:09 PM
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.
05-25-2017 12:46 PM
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.