04-05-2015 01:09 PM
I have some controls like shown in the picture. Lets say I want to check for changes done by the user in the String controls, since every string is inside a separated cluster, I would have to create a single case (inside a Event Structure) for each string or add them one by one to the same case, again one by one. How can I check for events on all the controls of the same type without having to add them manually one by one? Or, if I check for events on all the controls, how can I then identify wich control triggered the event structure?
04-05-2015 01:21 PM - edited 04-05-2015 01:25 PM
I don't know what you mean by time structure.
You can register the entire cluster for value change. Then compare the old value of the cluster with the new value to determine which one had changed.
04-05-2015 01:27 PM
I came up with comparing references of the controls changed till I find the one that tiggered the event structure. For this I get control references at the program start up. But since ther are quite some controls, I think it's rlly ineficient to check for the control like this. Any sugestions?
04-05-2015 01:32 PM
Yes but, then I rhater use shift registers in the while loop to check for changes (save last value, and compare with new one), but I wanted to use Event structure becous I thougth it was more efficient.
04-05-2015 01:42 PM
Attach your actual VI so I can see your data types.
04-05-2015 01:49 PM
04-05-2015 02:56 PM
Ty very much, I will create a "all elements" value change case, and then compare. But since in my cluster ther is a lot of diferent types of elements,the new value type gives me a analog cluster with the new value written into it, and also the control ref. Since I have all the control references stored, I would prefere to compare them instead of comprare individual elements of the cluster (to avoid a lot of unbundles and stuf), but i cannot compare this control refs (see image atached). I assume that control ref given by the Event structure is polimorfical, or weak control ref, and mine is strict. How can I convert classes?
04-05-2015 03:05 PM
04-05-2015 03:07 PM
That's a picture. That's not a VI.
04-05-2015 03:21 PM