Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

USB serial setup

I'm experienced with LabVIEW, but about to control an instrument in a way that I never have before: plugged in via USB and presenting a serial ASCII interface. I may use the instrument on both Windows and Mac.

Several questions, relevant to both operating systems:

 

1. Is VISA The best tool for working with this?

 

2. On a Mac at least, the identifier for the serial port changes based on which USB port I plug into. So I want to know how to handle this in a user-friendly manner. Is there a good way to get a list of all available serial ports and present that to the user in a menu box?

 

3. Is there any sort of standardized protocol for getting a serial device to identify itself – so that I could poll the available serial devices and automatically figure out which one is my instrument? The device is  not a National Instruments product.

0 Kudos
Message 1 of 5
(3,315 Views)

I have no experience with a Mac.

 

If the device and its drivers presents itself as COM port in Windows' Device Manager, then I use VISA.

Such a device would show up in VISA Resource Finder.

 

 

0 Kudos
Message 2 of 5
(3,284 Views)

@nyc_(is_out_of_here) wrote:

If the device and its drivers presents itself as COM port in Windows' Device Manager, then I use VISA.

Such a device would show up in VISA Resource Finder. 


This is helpful, and allows me to refine my question. On the Mac, I set up a VISA Resource Finder with the default, universal match string. Now I need help to interpret the two somewhat cryptic answers that came back:

ASRL1::INSTR

ASRL2::INSTR

How would I take these specifications and find out which one is actually my instrument?

0 Kudos
Message 3 of 5
(3,252 Views)

ASRL1::INSTR refers to a serial device attached to interface ASRL1. One way to determine the corresponding instrument is to connect an disconnect the device, and test which serial device it is. You could also perform loop-back tests to determine the instrument.

 

 On Windows computers, you can change the VISA aliases in NI MAX, and the VISA Resource in LabVIEW will reflect that: http://digital.ni.com/public.nsf/allkb/AE830D99E30CB61486256C7900697999. However, I am not sure if NI-VISA for Mac will have that functionality.

Brian.D
NI Product Owner
VeriStand
0 Kudos
Message 4 of 5
(3,237 Views)

Not sure about the Mac having something similar to the registry in Windows.  To gather more information as to the device, you can try to look up the information present in the registry.  Here is a link to some more information:

https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Automate-changing-of-GPIB-Interface-IDs/m-p/...

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 5 of 5
(3,233 Views)