05-10-2016 08:40 AM
Hi Everyone,
For my application i have converted all my typedef clusters into varient. In some places i have to convert this varient into cluster for some kind of processing. In this situation i have to place all typedef cluster in the block diagram. If i add one more typedef i have to change this code. Is there is any way to read the cluster dynamically from the hard disk.
Thanks in advance.
05-10-2016 09:48 AM
To convert variant into cluster, you use Variant to Data function. But in any case it needs a wire with specified type. Changing wire type is change of the source code, you can not change it on the fly.
You can do a lot of things with variants only (show different controls to user, load, save data), but if you fix data type, this will be a different vi, it is not trivial to replace wire type in memory.
05-10-2016 01:11 PM
It is not quite clear what you are doing nor what you want to do. Having a VI (or several) that illustrate some of this would really be helpful (make sure, if you do attach code, that you attach actual VIs or Controls, not static pictures of block diagrams or front panels).
Here are some questions:
I had to deal with something similar recently. I had an analysis routine for data generated by Version 2.0 of a program, which had a specific Data Format. However, Version 2.1, 2.2, and 2.3 had slightly different formats (each had its own TypeDef for the data). I handled this by using a Case Statement with the Version Number (as an Enumerated Type) as the selector -- the individual Cases were "Process 2.0 Data", "Process 2.1 Data", etc., that is, each sub-VI "knew" how to process its own data.
Could something similar work for you?
Bob Schor
05-11-2016 03:03 AM
Hi Sankar,
I understand your Question, Did auto update of Typedef Helped you?
Regards
Santhosh Balaji Raveendran