From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

select "VISA Attribute name" by string

I want to change a VISA Attribute.

I know, this is possible by a fixed "property node", but the "property" of the node needs to be variable, like the example on the left side.

 

Just a picture to explain.

Do a Vi or function like this exist?

 

Greil_0-1621585738637.png

 

2nd Question: How do I get a list of all Attributes, like you see in MAX?

0 Kudos
Message 1 of 5
(1,148 Views)

Hello

Regarding the first and second question, here is the link which I believe will be helpful: VISA Resource Properties - LabVIEW 2018 Help - National Instruments (ni.com)

About the subVI with "?" symbol, this means you don't have that subVI on your PC or the location of that VI is changed. Check what's the toolkit that was used before or try to find the subVI when the pop up window appears when attempting to open the main VI

0 Kudos
Message 2 of 5
(1,062 Views)

@Hamlet23 wrote:

Regarding the first and second question, here is the link which I believe will be helpful


No, not helpful, there is no possibility to select a property by string.

 


@Hamlet23 wrote:

About the subVI with "?" symbol, this means you don't have that subVI on your PC or the location of that VI is changed.


No, this was just an explanation to show a use case. This VI/Toolkit don't exist.

 

 

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

HI,

 

can provide more details what the final goal is?, your first question is not that clear to me.

 

For the second question, you can see the available properties by left-clicking on the selected property (there are no other properties available except the ones you'll see there)

hy__0-1634124762813.png

 

0 Kudos
Message 4 of 5
(862 Views)

Under normal conditions you place a property node, select desired class and then select a property like "TermChar En" like you see in the top picture on the right side.

The "TermChar En" is the VISA Attribute.

This is normal LabVIEW code.

 

But if you have a text script like this example:

"VI_ATTR_TERMCHAR"="0xA"

Then the selected property is dynamic, like you see on the left side of the picture.

 

I use some VISA drivers which have lots of VISA Attribute names.

So it is impossible to write a BIG BIG case structure with lots of property nodes.

 

The solution is similar to "Call Library Function Node": Inside there you have the option "[x] Specify path on diagram".

 

In simple words:

I want a "Property Node" with "Specify Property by String on diagram".

(or a SubVI which can do that)

 

0 Kudos
Message 5 of 5
(855 Views)