NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

MyTypes.ini changes propagate to sequences

We have defined various custom types in the MyTypes.ini file, some of which contain constant values which we are using within sequences as parameters passed to DLL functions that take enums.  So rather than every sequence contain a hardcoded value of 1, the sequence writers can access the constant value in the type.  To facilitate this, each sequence that uses the type with the constants creates a local variable of that type.  The problem we just discovered is that the values of the constants are saved within the sequence file.  So if the constant values are changed in the MyTypes.ini, they are not picked up at runtime by TestStand.
I understand that if I have the sequence open, make the constant change, and have the "Apply Value to all loaded instances of type" check box checked on the constant value in MyTypes.ini, then the sequence will have the new value in its instance of the type in its locals.  But I can not see how we can have ALL sequences pick up the new values of the constants at runtime.  In other words, is it necessary to update every sequence with a new instance of the type to make sure to pick up the new constant values from the MyTypes.ini type?
0 Kudos
Message 1 of 3
(3,176 Views)
One other note of interest.  If I choose "Sequence File Types" from the View window and browse into my type, the updated constant values from the type in MyTypes.ini DO show up correctly here, but if I browse into the local variable instance of the type, the constant values remain as they were when the local instance was created.
Another note is that if I add a new constant to the type in MyTypes.ini, save, and then open up a sequence that has a local instance of that type, the new constant shows up, but still the constant values that were changed in the MyTypes.ini type are unchanged in the local instance.  In other words, TestStand recognizes that the structure of the type changed, but it doesn't seem to recognize that the values of items in the type changed.
0 Kudos
Message 2 of 3
(3,175 Views)
Hey Barry,
 
First of all, the selection for "Apply Value to all loaded instances of type" will only modify the sequences that are currently open.  Any sequence that is not in memory within TestStand will not update the value for the custom data type. 
 
Secondly, based on what you've said, it sounds like what you might actually consider using is a station global rather than a custom data type to do what you're wanting.  If all the sequences are part of the same sequence file (*.seq), you might consider using file globals.  These different scopes (station and file globals) allow for this type of commonality between sequences by declaring variables with a larger scope than within a sequence (sequence locals).
Thanks,

Andy McRorie
NI R&D
0 Kudos
Message 3 of 3
(3,159 Views)