I am developing a GUI using labview and want to give an option to user on menu bar for selecting desired COM or USB port for communication.Actually on clicking, it should display a list of all com ports and usb ports available on PC for communication.Since, I am new to labview,I dont know how to actually accomplish it.All suggestions are most welcome.Thanks in advance.
Hi Dennis,thank you for the response.I would highly appreciate if you can put up some example vi of this sort.
in general, if you just want a list box to access available serial ports of you computer to access VISA functions, you can just use the VISA resource name Control available in the frontpanel.
You can also right click the terminal of your VISA VIs and select Create Control in the context menu:
For example for VISA functions you have to right click the VISA resource name terminal:
Thank you Lam for your reply.I am now making use of VISA find resource and VISA configure serial port functions for getting a dropdown menu for all serial ports present in the system.Can I also do something similar for USB ports?
As Dennis mentioned, using USB is more complex compared to the RS232, so it wouldn't make sense to make all usb ports available in general.
If you want to work with USB in LabVIEW you should check out this tutorial:
I am now using VISA resource name to list all ports available in the system. I have also used I/O name filtering option and made interfaces types to support only serial instruments.I am getting the list as in the attached image. Is there anyway to display only "COM" ports and remove other encircled ports from list in the image?