NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Difference in Scope between "ordinary" Step and StepType definition

Hi guys,

 

probably I'm not the first to hit this issue, but I haven't found anything on the forum....

 

I'm planning to invoke a sequence in the PreExpr of my step definitions (to add GUI messaging). As an example, I refer to this this.

It works invoking sequences without parameters. As soon as parameters for the sequence to be called are introduced, I get errors.

 

tserror.png

 

The PreExpr used is

RunState.Engine.NewExecution(SeqFileReference, "SeqName", Nothing, False, 0, Step) where Step is the container to be passed.

 

During debugging, I found out, that using this PreExpr with a standard step (in this case a Statement) placed in the sequence, everything works as expected.

So I removed the PreExpr from my Typedef and retried inserting the PreExpr into the step manually.  No luck...

 

tserror2.png

 

 

So... is there a context-wise difference between the PreExpr used in the (user) TypeDef of the step and the NI Typedef?

 

Cheers

Oli

 

BTW.... still on TS2013 / Win7

 

 

 

0 Kudos
Message 1 of 9
(3,725 Views)

Hi,

 

can you attach your sequence file?

 

Anna

Anna Vogl
Certified LabVIEW Developer
0 Kudos
Message 2 of 9
(3,650 Views)

Hi Anna,

 

the problem has magically disappeared when modifying a sequence to be posted here Smiley Embarassed

 

Now, that this is working I have stumbled over another issue I am not really understanding:

 

 

The PreExpr starts a sequence from a different seq file in new execution:

 

RunState.Engine.NewExecution(StationGlobals.SystemParameter.GUI_MsgProcessing_Seq, "PreExecutionMsgs", Nothing, False, 0x11, Step)

 

--> calling PreExecutionMsgs passing the Step container as Parameter

 

So I have defined the Parameters for the sequence as

 

PreExe_Par.png

 

Now... running my seqeunce having set a breakpoint in the sequence and taking a look at the variables I get this

 

PreExe_Par_run.png

 

Parameter.Step is shown as type Boolean instead of Container! Smiley Surprised

And.... where do all the other Parameters come from?

 

Accepting this for the moment, I decided to delete Step from the Parameter section of PreExecutionMsgs. At runtime, this results in no variables available in the Parameter section, which seems reasonable.

 

Re-implemeting the Step Parameter, it turns out, that both

 

RunState.Engine.NewExecution(StationGlobals.SystemParameter.GUI_MsgProcessing_Seq, "PreExecutionMsgs", Nothing, False, 0x11, Step)

(--> handing over Parameter to the sequence)

and

RunState.Engine.NewExecution(StationGlobals.SystemParameter.GUI_MsgProcessing_Seq, "PreExecutionMsgs", Nothing, False, 0x11)

(--> handing over NO Parameter to the sequence)

 

are working equally fine: Variables showing up as mentioned above for both cases. Smiley Surprised Smiley Surprised

 

What is the point I'm missing? The implementation seems to be working, but I'd like to understand what I'm doing before using it.

 

Cheers

Oli

0 Kudos
Message 3 of 9
(3,642 Views)

Hi Oli,

 

the change of the Parameter has no logic background. I have never seen, that the type of a variable in TestStand changed when executing it.

 

A thing, that could cause the change, is, when you click on the parameter or variable, you have to rightclick it to change the type. If you often use shortcuts, this might be the reason for accidently changing it.

 

As long, as it works for you now, I would leave it at that and watch the behavior and if it changes again. If so, you can try to use Ctrl+Z to see the last changes in the project.

 

Best,

Melanie

Best regards,
Melanie Eisfeld
Senior Applications Engineer, National Instruments Germany
Certified LabVIEW Developer
Certified TestStand Architect
0 Kudos
Message 4 of 9
(3,590 Views)

Hi Melanie,

 

it is very strange.... that's why I'm a bit suspicious.

 

Before changing all my custom step types, I'd like to be sure not to base on a bug / unwanted behaviour

 

Cheers

Oli

0 Kudos
Message 5 of 9
(3,582 Views)

Hi Oli,

 

I think, if that is an unexpected behavior, this would effect other users and there would be a lot of forums entries about it.

 

Melanie

Best regards,
Melanie Eisfeld
Senior Applications Engineer, National Instruments Germany
Certified LabVIEW Developer
Certified TestStand Architect
0 Kudos
Message 6 of 9
(3,580 Views)