01-13-2008 10:02 AM
01-14-2008 05:08 AM
Hi Moshik,
The behaviour you see is to be expected with Locals.
It's the same rules of scope as in C programming.
Try using Sequence FileGlobals to maintain variable values between executions.
Remember to set your Client Sequence File properties so that each execution
shares the same FileGlobals (TS Editor: Edit -> Sequence File Properties).
Gary.
01-14-2008 05:43 AM
Hi,
To change the static version of the variable use the lookup string "RunState.InitialSelection.SelectedFile.Data.Seq[<sequence_name>].Locals.<variable_name>" instead of the Locals.<variable_name>.
eg
if your locals was in MainSequence and call MyNumber, the lookup string you would use would be;
"RunState.InitialSelection.SelectedFile.Data.Seq[\"MainSequence\"].Locals.MyNumber"
plus you also will need to set the runtime version as well using Locals.MyNumber
Use the same CVI TS function to set the static version as you use for the runtime version.
Because you are changing the static value you have to increment the count of the SequenceFile to indicate its dirty (ie something has changed in the file). If you dont do this, when you close the sequence file, you will not be prompted if you want to save changes.
Hope this helps
Regards
Ray Farmer
01-16-2008 01:42 AM