The maximum number of serial ports that NI-VISA currently supports on any platform is 256. The default numbering of serial ports is system dependent, as shown in the following table.
Platform | Method |
---|---|
Windows 7/Vista/XP/Server 2008 R2/Server 2003 R2 | All COM and LPT ports are automatically detected when you call viFindRsrc(). The VISA interface number may not equal the COM port number. |
LabVIEW RT | All COM ports are automatically detected when you call viFindRsrc(). |
LabVIEW PDA | All COM ports are automatically detected when you call viFindRsrc(). |
Mac OS X | All COM ports are automatically detected when you call viFindRsrc(). |
Linux | ASRL1-ASRL4 access /dev/ttyS0 – /dev/ttyS3. |
If you need to know programmatically which ASRL INSTR resource maps to which underlying Serial port, the following code will retrieve and display that information.