LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting className of an IVI I/O control

I'm trying to figure out how to get the className of an IVI I/O control. See the enclosed VI that shows the variant value I get when I use a CTL property node to return the value.

The variant value shows the className that I'm trying to retrieve (in this case niDCPower). This className is what shows up if you right click on an IVI I/O control and then select Select IVI Class.

I tried converting to an XML string, but that doesn't return the value I need. I've also tried all the NI Variant tools.

Any ideas on how to return this name?

 

It bugs me that I can see the className right there in the variant value control, but can't figure out how to extract it. Any ideas would be welcome.

 

George

0 Kudos
Message 1 of 11
(3,879 Views)

Hi,

 

You might be able to use a Flatten to String and parse the class name from there. 

Regards,

Jeremy_B

Applications Engineer
National Instruments
0 Kudos
Message 2 of 11
(3,855 Views)

Well, Flatten to String kind of works. The word I'm looking for is in there, but unless I knew what I was looking for I don't know how I'd pick it out of the mess of gobbly gook that surrounds it. The variant indicator has this wording

 

className=niDCPower

 

But the Flatten to String to string output only has the niDCPower part. Looking at the output as '\' codes gives this:

 

\b`\80\01\00\00\00\02\00\1E\007\FF\FF\FF\FF\00\03\b`\80\01\00\00\00\01\00\04\00\00\00\01\00\00\00\00\00\00\00<@p\00\0F\tniDCPower\00\01\00\00\00\00\b`\80\01\00\00\00\01\00\04\00\00\00\01\00\00\00\00\00\00\10IVI\sLogical\sName\00\00\01\00\01\00\00\00\tPXI1Slot5\00\00\00\00
Which doesn't seem to help much either. Any other ideas?
0 Kudos
Message 3 of 11
(3,847 Views)
When I create an indicator off the value, I don't get the className= string, I just get a number.  I think this is probably not possible given that there is no property node to retrieve the IVI class. 
Regards,

Jeremy_B

Applications Engineer
National Instruments
0 Kudos
Message 4 of 11
(3,814 Views)

Jeremy,

 

What kind of indicator did you create?

 

There has to be some way to extract the data. Somehow it exists in the variant so there must be a way to get it out.

0 Kudos
Message 5 of 11
(3,810 Views)
Doesn't the Text.Text property return what you want?
0 Kudos
Message 6 of 11
(3,803 Views)

>Doesn't the Text.Text property return what you want?<

 

Could you be more specific please? I don't know of any "Text.Text" property.

 

George

0 Kudos
Message 7 of 11
(3,790 Views)

Hi,

 

I just right clicked off the Value property and created an indicator.  How did you create the indicator?

Regards,

Jeremy_B

Applications Engineer
National Instruments
0 Kudos
Message 8 of 11
(3,776 Views)

I did the same thing to create the indicator. Then I right clicked on the indicator and checked "Show type".

 

You asked if the "Text.Text"  property gave what I wanted. I still don't know what you mean. There is no "Text.Text" property.

 

George

0 Kudos
Message 9 of 11
(3,773 Views)

hi there

 

can you please post as 8.5 or a screen shot?

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 10 of 11
(3,762 Views)