LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

accessing different custom controls during runtime

Hi,

 

I am developing a test engine. Each test requires different data. My idea is to store all the custom controls(specific control to specific test case). I am getting a variant input and this should be converted to the custom control data type. Is there anyway to access the custom control datatype based on the test case???

 

Or to be more specific, is there a way to get the data type of control in a VI using VI reference???

 

Tnx in advance

0 Kudos
Message 1 of 7
(2,938 Views)
hi. In your code instead of using varient data type use one cluster. Make that as a type def. Then pass that into your vi through shift reg. Then in every test cases just unbundle it. update the value and bundle it again. Because hangling varient is easy but it dont have memory. so every update the data get vanish. so better use cluster.
0 Kudos
Message 2 of 7
(2,927 Views)

Hi Sam.. I think u got my problem wrong... I ll explain u in asimple way.

 

Test 1 requires 1 boolean and 1 numeric

Test 2 requires 2 numeric

Test 3 requires 1 string

 

Wat I recieve is a variant containig all inputs of that particular test(Exmpl: 2 numeric for Test 2)....Now I need to convert this variant to 1 bool and 1 num(for Test 1) or 2 numeric(if Test 2) or 1 string (if test 3). Wat I thought was put all the ctrls in a folder and access it to convert the variant based on test number.(This is for future use so tht I can just add cntrls if new tests are added). Now the question is how to access this cntrl datatype for the conversion??????? 

0 Kudos
Message 3 of 7
(2,912 Views)

Have you looked into using classes? It sounds to me like your setup would be a perfect candidate for this. There is a section in the LabVIEW Help on object-oriented programming, as well as examples, as well as numerous articles on the NI site: http://search.ni.com/nisearch/app/main/p/bot/no/ap/global/lang/en/pg/1/ps/10/q/labview%20object%20or...

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

Yes Smercurio...... That's almost wat I wanted.... But, instead of subclasses, I need custom controls... Let me find a way to bring that into action......Thnks for the info man...

0 Kudos
Message 5 of 7
(2,892 Views)

That't the whole point of classes. You have a base class and then you can create derived classes that have their own list of members (i.e., controls).

Message 6 of 7
(2,869 Views)

Yes dude... It works... Kudos to u...

0 Kudos
Message 7 of 7
(2,857 Views)