From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Step property not updated by Labview VI

Solved!
Go to solution

Hi,

 

I'm currently using TS 4 and LV 8.2 with Win7 Pro .

 

I've created a custom step which employs an Edit sub-step.

The Edit sub-step successfully calls a Labview vi which allows the user to modify values.

The intention is to copy the user values back into the calling custom step properties, using the Set Property Value.vi from the Teststand library.

 

After the step is Edited, the vi is closed and I check the Step variables expecting the variables to be updated, but the outcome that I see in the Variables panel does not always show the new Step property values.

 

The Labview vi called by the Edit sub-step receives the Sequence Context and the correct Step property string name.

 

Have I correctly selected the Set Property Value.vi for the task of updating the Custom Step's step properties ?

Also, when the Step properties do show the new value, the sequence containing the custom step does not indicate

the need to save which is opposite to my expectations, else how is the user remined to save changes ?

 

thanks,

 

Gary.

 

0 Kudos
Message 1 of 3
(3,875 Views)
Solution
Accepted by Gary_H

Gary,

 

i most often recommend developers to interface with EditSubstep modules by using parameters.

For input parameter, i pass the current values of the step variables.

For output parameter, i connect the same variables as they get the old/new values of the EditSubstep module.

 

I state this as my EditSubstep modules normally contain a "Cancel" button. If the user hits that, i simply pass the values as output which the module received as inputs values.

Input values are also used to correctly update the controls of the EditSubstep module. Otherwise, the user would only see the default values, but not the values the step has already modified.

 

Output parameters are important to pass unmodified (cancel)/updated values to the step. By selecting the correct container, the values are passed with closing the EditSubstep, so there is no risk of running into a race condition which could explain the behavior you are seeing.

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 3
(3,873 Views)

Whenever you make an edit to the sequence file, you need to do:


context.SequenceFile.AsPropertyObjectFile().IncChangeCount()

 

This tells the engine to both refresh the view and mark the file as modified.

 

If you wanted to do this via parameters instead of API calls, you can create an input that takes the current changecount and pass it:

 

RunState.SequenceFile.AsPropertyObjectFile.ChangeCount

 

Then have an output from your vi where you take that value and add 1 to it and pass it the same property:

 

RunState.SequenceFile.AsPropertyObjectFile.ChangeCount

 

-Doug

Message 3 of 3
(3,864 Views)