LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FG reading

Solved!
Go to solution

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?

 

 

 

 

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 3
(2,758 Views)
Solution
Accepted by topic author jyang72211

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.

0 Kudos
Message 2 of 3
(2,744 Views)

I didn't think of trying the undo.  Thanks! 

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 3 of 3
(2,716 Views)