LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Monitoring the changes on a big number of variables

I have approximately 100 variables in my LV project. What I want to do is to log any change on any of those variables. The way I started to do was to put a copy of those variables inside a loop and at each iteration I check if their current values are equal to theithe previous ones, using the "Add Shift Regiter" functionaly of the loop. However, I think it will become a huge mess when they are all there...
 
Does anybody know a better way to do it? I'm thinking about a better solution, but couldn't find it yet...
 
Thanks!
 
Daniel
0 Kudos
Message 1 of 7
(3,417 Views)
Give us more to work with ... how many different kinds of variables? It sure makes things a lot easier if you can simply build a 1D array with 100 elements of dbls than if you had 100 different variables of 10 different data types. Smiley Surprised Either way, the first step is to group your data into groups that make logical sense with your data flow. Then you can work from there.
PaulG.
Retired
0 Kudos
Message 2 of 7
(3,403 Views)
Daniel,

PaulG is right some more info would make it easier to help.

That being said have you look into using an event loop to monitor for a value change event for your variables in question. Just for making things easier to manage is it possible to cluster some of those variables together??

Cheers,

--Russ
0 Kudos
Message 3 of 7
(3,389 Views)

Wel... I'm using strings, booleans, and integers here. But I don't see very well the reason why this is so relevant...

Anyway, the fact is that I simply want to monitor any change in any of those variables. So far I've been using those "Shift Registers" that you add to your while loop for example. If you think about a better/easier/cleaner way of doing it, please let me know, ok?

Thanks for the help, guys!

Regards,

Daniel

0 Kudos
Message 4 of 7
(3,372 Views)
Hi Daniel,

Again have you looked at the using the event structure inside of a loop and triggering events on the value change event of all your controls?


--Russ
0 Kudos
Message 5 of 7
(3,361 Views)
Well, Russ, I was taking a look on that structure, but it seems that it can only handle events from controls, not from global variables. Am I wrong?
 
What I'm doing is monitoring global variables. If any of their values change, I need to take one single (the same) action, that is create a log file with all of them...
 
Thanks for the help.
 
Best,
 
Daniel
0 Kudos
Message 6 of 7
(3,333 Views)
Do you have all of these 100 global variables (which seems excessive) in a cluster? If not, then bundle them all together and use a single shift register. You can use the Equal function in the Compare Aggregates comparison mode so that a single change will result in a false output.
0 Kudos
Message 7 of 7
(3,329 Views)