To download NI software, including the products shown below, visit ni.com/downloads.
Overview
When using USB-232 devices, you may want to use different USB-232 devices across different machines for testing purposes. Each time a USB-232 device is plugged into a computer, it receives a unique COM port number that is not necessarily the same across all systems. COMSelect.vi allows the user to manually select which serial port they would like to use in their program, eliminating the need to change constants in source code (useful if you build an executable) or changing the COM ports manually through Measurement and Automation Explorer or Windows Device Manager.
Requirement
LabVIEW2012 (or compatible)
Steps to Complete
1) Download COMSelect.zip and extract both files
2) Open and run COMTester.vi
3) When COMSelect front panel pops up, select the port you want and press OK
4) The COM port's name (ASRLXX::XX::INSTR) is returned, which can then be passed into a VISA Open function to generate a VISA Resource
Additional Information or References
COMSelect is primarily intended as a subVI, as the front panel pops open when the ports have been detected. Running it by itself may cause confusion as there is no indication as to when the serial ports have been found.
If you would like to change COMSelect to search for something besides serial instruments, change the string constant going into the VISA Find Resource VI. Reference the NI-VISA Help file to instructions on how to change this string to search for what you want.
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.