NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Get variable name and type dynamically

Hi all,

What I am trying to do is be able to read the name (label) and type of a variable.  Here is a simple example of what I want to do:

1.  Main VI calls a sub VI, data is passed to the sub VI in a cluster.
2.  Cluster contains four elements: a boolean, a string, a double, and an integer.
3.  The sub VI should take this input cluster, read the name of each element, concatenate each of those into one string (tab delimited).
4.  The sub VI should also read the type of each element, and be able to use this type to decide on a format string to use when converting the element's value to a string.

I can do all of the programming above except for being able to read the type and name of any given element of the input cluster.  I know you can use a property node to get these data if you were trying to do so for a front panel control, but can you do this for a variable that has been passed into a sub VI using a cluster?  Also, my example is simple; I have about 50 different inputs I want to perform this operation on.  Thanks in advance for any help you can give to me.

-Ian
0 Kudos
Message 1 of 3
(3,043 Views)
Sorry, I just realized I posted this in the wrong forum, I meant to post it in the LabVIEW forum...my apologies.
0 Kudos
Message 2 of 3
(3,042 Views)
Duplicate of http://forums.ni.com/ni/board/message?board.id=170&message.id=246582#M246582
Doug M
Applications Engineer
National Instruments
For those unfamiliar with NBC's The Office, my icon is NOT a picture of me 🙂
Message 3 of 3
(3,027 Views)