LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Virtual serial port

Hi!
I have made a program to find virtual serial port using visa find. My problem is that in my project i am using two virtual serial port using FTDI. So how can I find that which virtual serial port is for which application? One Port i am using for Microconroller and one for UUT. I have found COM5 and COM6 but I don't know where it's connected. I can't select this port manually  for controller and this for UUT. It should be automatic. Please guide me.
 
Thanks 
0 Kudos
Message 1 of 4
(4,421 Views)
The only way to really know for sure is to send a command through the ports and see what comes back. Assuming that the micro and UUT are different, there should be something you can write that will return a unique response. If, when you build the system, you are careful and know which cable goes where, you could simply assign an alias to each (i.e. 'Micro', 'UUT') and instead of refering to com1 or com2, you use the alias instead.
0 Kudos
Message 2 of 4
(4,411 Views)

Hi! Dennis

Thanks for your reply.

How to send commands to each port and what kind of reponse i will get so I know that which port is connected where? How to define aliases to all Ports. I have found all three com ports which is connected to microcontroller and UUT. But I don't know which port is connected where.

reply me as soon as possible

 

0 Kudos
Message 3 of 4
(4,387 Views)

You send commands with a VISA Write and get responses with a VISA Read. I have no idea what commands to send. It's your micro and UUT. I would imagine you would know how to communicate with them and what commands they accept and what responses they will return.

You assign aliases in MAX. Expand Devices and Interfaces>Serial & Parallel. Click on the port and on the right side of the screen, the general window will have a box labeled VISA Alias on My System. Enter the name you want and then click on the Save at the top.

I take note of which port was what when I build a system. The built-in ports of a pc are usually labeled but when I add a USB-RS232 converter, I add one at a time and note how it is then designated in MAX. I label the device and then add the next converter and repeat. Since, apparently, you did not do this, you will have to open a communication session with each com port in turn and send some commands to see what repsonses you get back as noted above. With USB-RS-232 converters, you could also disconnect one at a time, refresh MAX and see which resource disappears. Label the converter with that name.

0 Kudos
Message 4 of 4
(4,382 Views)