09-22-2010 06:21 AM
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
09-22-2010 06:51 AM
09-22-2010 09:14 AM
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???????
09-22-2010 09:33 AM
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...
09-23-2010 03:37 AM
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...
09-23-2010 08:52 AM
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).
09-24-2010 03:09 AM
Yes dude... It works... Kudos to u...