11-02-2010 09:53 PM
Are the following observation true about a functional global?
Please see attachment.
1. When you run attached program first the first time, you get 0, since the uninitalized FG contains the default value of the register's datatype. True?
2. I observed the following that was kind of strange. If you change the constant 1 to 2 and change it back to 1 (do not run the program while you are changing the constant back and forth) and run the program, you will get zero (the default value). Should I get 1 which was saved into the FG? Why did it get erased?
Solved! Go to Solution.
11-02-2010 11:45 PM
1. True.
2. The change of the constant on the block diagram probably caused a recompile of the VI which cleared the memory of the shift register. Note that if you change it to a 2, but then undo the step to have it go back to 1, and run it again, the original 1 remains in memory of the shift register.
11-03-2010 09:54 AM
I didn't think of trying the undo. Thanks!