02-15-2007 09:50 AM
02-15-2007 10:05 AM
02-15-2007 10:22 AM
02-15-2007 11:04 AM
Thanks for this advice, sounds like a very helpful feature. I will use this whereever it is possible. But to my original question: Is this the most elegant way to pass over configuration information to sub-vi's? This method still requires a rather bulky read routine to read and store all the information into the various clusters....
@pincpanter wrote:
A very useful technique to stay updated automatically when datatypes change is making clusters typedefs (right click on the cluster control, choose Advanced->Customize, then save the customized control as a Typedef). A Typedef is a custom data type; when you change a Typedef, all controls and constants connected to the datatype are automatically updated.
Typedefs should be defined in the early stages of the development process.
In your case, if you create a Typedef for each cluster/section, you will need to Replace every occurrence of a control or indicator or constant into the newly created Typedef before being able to enjoy the automatic update. After that, if you add/remove/change a member in a Typedef and choose File->Apply changes when the datatype is open, you get the desired effect in all related vi's.
02-15-2007 01:05 PM
02-16-2007 12:46 AM
Thanks, I will try this out today. One question though: Are these libariries pure labview-code? I am asking because the code in question needs to be uploaded to a compactFieldpoint and this guy does not like windows dll's.
@tst wrote:
If you go to the OpenG site, you can download the Variant Configuration package which will give you VIs which can save and load clusters to INI files. Very convenient.
02-16-2007 02:05 AM - edited 02-16-2007 02:05 AM
Message Edited by Kallis on 02-16-2007 02:09 AM
02-16-2007 04:24 AM
Thanks again, just downloaded the library and it seems to be exactly what I was looking for. 🙂 On further question: Is there any example code that helps me impleneting the variant cluster into my app? I have some ideas how to manage this but some further documentation would help a lot! E.g is the following code correct use?
@tst wrote:
If you go to the OpenG site, you can download the Variant Configuration package which will give you VIs which can save and load clusters to INI files. Very convenient.
02-16-2007 05:54 AM
I can't look at your code, but you basically need to use the Variant to Data primitive to convert the variant back to your cluster. You can see a simple example here (which contains all of the OpenG code).
This library is pure G, but you should test it on an RT target before embedding it in your code, because RT does not support some things even if they are native G. I think this should work, though.
02-16-2007 06:29 AM
Sorry, I probably should have converted the vi from 8.20 to 8.0, but here is the screenshot:
@tst wrote:
I can't look at your code, but you basically need to use the Variant to Data primitive to convert the variant back to your cluster. You can see a simple example here (which contains all of the OpenG code).
This library is pure G, but you should test it on an RT target before embedding it in your code, because RT does not support some things even if they are native G. I think this should work, though.