ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Resource Name alias to integer

I need to "convert" a VISA Resource Name alias an integer that will passed to a Call Function Node input parameter.

For example, COM1 will result in 1.

 

So far I have wired the VISA Resource Name to Format Into String then wire that string into Scan From String.

Is there an easier way.

0 Kudos
Message 1 of 7
(4,366 Views)

You can use VISA property node to get this information (and other informations, like "is it serial port?").

portno.png

Message 2 of 7
(4,320 Views)

@PiDi wrote:

You can use VISA property node to get this information (and other informations, like "is it serial port?").

portno.png


Thank you for this. I learned something new.

 

 

 

0 Kudos
Message 3 of 7
(4,300 Views)

Hi, is there a way to do this in the other direction? I will use Labview for a plugin in a other program. For this I need for input only a integer variable, e.g. the number of the COM Port. Is it possible to convert this then in a Visa Ressource name?

 

BR Martin

0 Kudos
Message 4 of 7
(2,176 Views)

Hi Friese,

 


@Friesenmartin wrote:

For this I need for input only a integer variable, e.g. the number of the COM Port. Is it possible to convert this then in a Visa Ressource name?


Simple like this:

(You can wire strings into VISA resource inputs…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 7
(2,173 Views)

Hi Gerd, thank you for the very (very) fast response:-)

I found in the last minute my own solution.

 

Friesenmartin_0-1660829581695.png

 

So both works. Thank you again.

 

BR Martin

0 Kudos
Message 6 of 7
(2,162 Views)

I do something similar to GerdW.

NOTE: That Set Termination Settings is my own VI, so don't go looking for it in the palettes.




There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 7
(2,147 Views)