09-12-2012 09:53 AM
I am wondering if we can convert enum data type into variant. I could not find literature regarding variant data type.
09-12-2012 10:05 AM
You can cast anything into a variant. That's the point of the variant. However, you have to convert back at some point.
09-12-2012 10:31 AM
What is the "thingie" that needs the variant? You may need to first convert the enum to a numeric value prior to converting to a variant. But that really depends on what's the thing that's using the variant.
09-12-2012 10:34 AM
First question: why do you "need" the variant.
09-12-2012 12:06 PM
I want to develop application which change the output base of the selection of enum and the data could be send via USB using api. I believe i am not able to by the use of variant. without varant it is working.
09-12-2012 12:09 PM
Sorry the attachment is required vi
09-12-2012 12:27 PM
I don't understand your problem.
For your posted VI, I would just use the I32 conversion bullet.
09-12-2012 05:06 PM
This is snippet of a sub vi.
the sub recieves different kind of data integer, float, double etc
like
09-12-2012 05:40 PM
Well if you are using floats and doubles to index an array you may run into problems due to rounding. What element should be selected if the input is 2.5? Still not entirely clear what exactly you are trying to do. Are you trying to do something like this?
09-13-2012 04:29 AM
i believe Chosing case is not a Problem. The sub vi process different. One of the case I have explain in the vi above. the Enum data I have to insert into the array. Without the varient setup it is working fine. If you suggent me to remove it altogether. 200 additional case i will have do design. I believe when i change the enum data into varient and then back, some thing is missing which I dont know about.