11-04-2010 07:32 AM
Hi,
Following advise from another question I have painstakingly developed a series of Functional Global variable VI's to manage various data in a test rig. One of them isn't working - GFTR Digital Outputs.vi (attached).
I though I could be clever and use a two-stage Enum-case structure. The first case is Read-Write to control the action of the FGV. Inside the Write case is another case which detemines which boolena bit in the array to change.
I am pretty certain that the calling VIs are doing their jobs properly. Indeed I recently added the extra feedback out of the FGV to show the values that are being used. However the data is not being stored correctly in the FGV. All elements in the array stay false.
Any ideas? Do I have to explicitly define each case for the element name? Or is this a "feature" of RT?
I am using LabView RT 8.6 on a PXI-8106
Thanks,
Ian
Solved! Go to Solution.
11-04-2010 07:47 AM
Question:
Are you initializing the array in the shift register? You can't replace an element that does not exist.
Ben
11-04-2010 08:06 AM
Ben,
Of course - the array is uninitialised. I knew it would be something simple - like me
But the point of an FGV is that the shift registers are uninitilaised isn't it?
If I do initialise the array, will the FGV then maintain the new values, or will it re-initialise each call?
Thanks,
Ian
11-04-2010 08:10 AM
Add an explicit "Init" action and in it create an array and pass it to the SR (shift register). The array should then be available to be acted on with the other actions.
Ben
11-04-2010 08:12 AM
Consider it done. Thanks again.
Ian