04-17-2009 01:07 PM
hi guys,
i just have a quick question..
I found out that my main program uses 855 global variables.
it wasn't built by me.
i am hoping if you guys have dealt with this before?
What do you think its a good approach for me.
Find ways to get rid of all global variables using cluster?
or leave it the way it is because its working and don't borther with it.
or is there another solution?
thank you in advance
Solved! Go to Solution.
04-17-2009 01:22 PM
04-17-2009 01:26 PM
hahaha...
i am not a consultant though..
i am here till i quit, get FIRED. or die...hahaha.
it bugs me that everytime i want to use the variable i have to look around for it...
i dont know if its worth the time to fix it though..and i dont want to break anything either..
04-17-2009 01:28 PM
04-17-2009 01:41 PM
04-17-2009 02:27 PM
You can use Find and Replace... to locate all the variables and to replace them with the functional global. Of course the Functional Global will have an additional input to be wired, so you will still need to go to each place in the diagram where they occur. Find Next is your friend for that.
Lynn
04-17-2009 02:30 PM
04-17-2009 02:59 PM
yeah..i run into that too....
function global variables is using wires/shift registers to carry data from one subvi to the next right?
isn't that the same as using clusters of data as in bundle and unbundle of data?
04-17-2009 03:07 PM
krispiekr...,
Now that the laughter has subsided and the rest of us have had time to thank the gods that we're not dealing with your application......
You can pick your battles and try to improve areas that are obvious. I would be tempted to see if I could group signals into clusters or arrays and use Functional Global Variables to pass data between vi's. Still going to be tough trying to track down all the variables.
jmcbee,
If I must wimper it's always into a cold beer.
04-17-2009 03:10 PM