Ni-visa can automatically detect the port. You can view the list of ports by using the visa resource name control on the front panel or the Visa lookup resource function. On any platform, the maximum number of serial ports supported by Ni-visa is 256, and the default number of serial ports depends on the operating system.
The visa resource name control is used to specify resources that are open to the visa session handle and to maintain the session handle and class. The visa session handle is the only logical identifier used by visa to communicate with the resource. The visa session handle is persisted by the visa resource name input control and is not visible to the user. The visa resource name Output is a copy of the resource name that is exported from the visa function. Data flow programming is simplified by outputting or importing resource names to functions and VI, and connecting functions and VI. This is similar to the file reference handle output used by file I/O functions.
Visa Resource Name Control