LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

COM port from VISA alias

Solved!
Go to solution

I have a test fixture I am designing in LabVIEW that is composed of many independent instruments. For simplicity sake I gave all of these instruments a VISA alias (for instance Programmer rather than COM3) so I wouldn't have to guess at which COM port the instrument was attached to.

 

Now, in LabVIEW, one of my instruments does not have a driver but does have a DLL shared library that I am trying to create wrappers for. One of the inputs is the serial port in a numeric format (0 for COM1, 1 for COM2, etc). If I didn't have the alias I would just do something like this...

 

 COM to Number.png

 

But....because I have these aliases I cannot make it so simple. Is there a way to get the serial (COM) port number (I can decrement it) from the VISA alias?

 

Edit: seems the code didn't make it in on the first pass

0 Kudos
Message 1 of 6
(3,809 Views)
Solution
Accepted by topic author bshover

Capture.PNG

Name from Alias is straightforward with the System API


"Should be" isn't "Is" -Jay
Message 2 of 6
(3,806 Views)

Thanks, I had never used the system functions so I was unaware of their capabilities.

0 Kudos
Message 3 of 6
(3,797 Views)

Where are these System vis? I have 2014 professional development suite and just went through the entire palette set and could not find them.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 6
(3,763 Views)

obviously you're not using Quick Draw correct that drop.

they are on the pallets under measurements and they show up at the lower left hand sideI believe they install with DAC MX or device drivers

 

and of course that's a snippet so you could have just drop it will block diagram right click instead find an outlet from the alt correction find on pallets from the help

 

side note: Google speak doesn't recognize everything correctly


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 6
(3,752 Views)

@JÞB wrote:

obviously you're not using Quick Draw correct that drop.

they are on the pallets under measurements and they show up at the lower left hand sideI believe they install with DAC MX or device drivers

 

and of course that's a snippet so you could have just drop it will block diagram right click instead find an outlet from the alt correction find on pallets from the help

 

side note: Google speak doesn't recognize everything correctly


Ah.. I see them since I have never used any sort of DAQ devices or quick-drop (never could figure that out) I guess I never saw them before.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 6
(3,704 Views)