09-27-2006 01:57 PM - edited 09-27-2006 01:57 PM
Message Edited by TonP on 09-27-2006 08:59 PM
09-27-2006 02:59 PM
Hi Ton,
I'll have a look at it tonight. - Thanks -
OK... now part 2 of the exercise..
I want to write a value (from a list) to each element within the Global Variable. I now have each name. I can create Property Node, etc.. But... How do I index the element?
In other words, how can I use the list I obtained earlier to index the element I want to write the value to?
Thanks,
RayR
09-27-2006 03:34 PM
09-28-2006 08:33 AM
Hi Ray,
If the above has obtained all of the names OK then you are most of the way there!
Modify Ton's examples such that you are building an array of reference in parallel with the names.
You can then use the two arrays (one of names one of refernces) in tandem.
Use a "Serach 1-d array" to find your name. The returned index can then be used to select the proper reference.
NOTE:
Since the refences will be in an array they will be of a generic type. Thise means your "value" property will be a variant. This should not be a problem. Just wire it up.
Limitation:
Clusters of arrays of clusters of ... get very complicated! AS long as your data types are simple, the above should get you there.
Have fun!
Ben
LVC meeting @ 10:00 CST. You gonna show?
09-28-2006 08:45 AM
09-28-2006 08:49 AM
touche Ton!
Ben
09-28-2006 09:03 AM
@Ben wrote:
@LVC meeting @ 10:00 CST. You gonna show?
Wish I could... I've been waiting > 1 month for the updated NDA from Sarah... I can't access the forum.. 😞
Thanks guys... I was on the right track, but failed to create an array of references.. I was trying to re-build it from another vi.. Needless to say, it was getting messy!
RayR
09-28-2006 09:29 AM
Thanks Ton,
I forgot to mention that I'm using LV7.1... That's 2 versions down from your posted example.. I'll try building the same from the info provided. But if you do get a chance to convert, that might be great!
Thanks buddies!
RayR
09-28-2006 12:41 PM
Thanks guys!!
It works great! Ya gatta luv LV!!
😄
09-29-2006 07:57 AM - edited 09-29-2006 07:57 AM
I'm on to the next stage...
I now need to read the value within each control of the calling vi and compare them with the values from the Global Variable. Basically, I need to identify all the changes in value and prompt the user/operator before writing them to the Global Variable.
The info discussed earlier worked up to one point. I can compare the values... I can probably write them (not there yet).
However, I need to convert the values to string to display the parameter and the values changed. Unfortunately, the "variant" is not cooperating with this one. Yep, I did a search and it seems that others are looking for the same solution.. I tried what was proposed, but to no avail!!.. I tried flatter to string, typecasting, drinking stronger coffee, even considered beer!!! 😮
Do you guys have a suggestion on this one? Till then, I'll continue to explore.
BTW: The value in from the propoerty node is correct! One observation.. Although a numeric value, a probe shows that there is a carriage return as part of the value, which is why I also tried setting the type to string.. Oh yeah.. I tried numeric type, etc.. As well as unbundle cluster, etc..
See attached image for typical error message.
Thanks,
RayR

Message Edited by JoeLabView on 09-29-2006 08:59 AM