delbertson Posted February 6, 2007 Report Share Posted February 6, 2007 I am trying to put together a VI's 'state so it can be re-loaded. I was hoping to pass in only a cluster and have the config file use the name of the Cluster as the section then in that section have each element of the cluster as a key in that section i.e. [Cluster1] Span=50 Speed=20 Home=TRUE Enable=FALSE Carrier Size=127 [Cluster2] Span=10 Speed=100 Home=FALSE Enable=FALSE Carrier Size=127 This is what I've come up with... but I get the following error "These cannot be wired together because their data types (numeric, string, array, cluster, etc.) do not match. Show the Context Help window to see what data type is required. The type of the source is Variant. The type of the sink is boolean (TRUE or FALSE).can't get the value out right." The write.value input is set as Automatic Any comments or suggestions would be appreciated Derek Quote Link to comment
Tomi Maila Posted February 6, 2007 Report Share Posted February 6, 2007 My first suggestion for you is: Download VIPM from http://jkisoft.com/vipm/ and install OpenG variantconfig package. The variantconfig package contains tools for writing and reading variant data to and from INI files and it's licensed under BSD license so you can easily use it in your commercial software as well. Tomi Quote Link to comment
Eugen Graf Posted February 6, 2007 Report Share Posted February 6, 2007 You can convert variant data to boolean using Variant To Data and as type an boolean constant. Quote Link to comment
delbertson Posted February 6, 2007 Author Report Share Posted February 6, 2007 You can convert variant data to boolean using Variant To Data and as type an boolean constant. Yeah but I'd like to set up the one VI to write the cluster to the file and determine the Data type at run time, the example posted is a trivial one to test my ideas out. In my final application it's likely to be 20->30 variables that's likely to change frequently during development. Hoped I'd be able to use Variant to Flattened String then use the data type String in a case statement to define the data type but I couldn't get that working either. I'm off to look at the variantconfig package, thanks to both of you for replying Derek Quote Link to comment
Eugen Graf Posted February 6, 2007 Report Share Posted February 6, 2007 In cases if I must save configs such Front Panel or Settings Cluster I use XML-Files without any converting troubles. Eugen Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.