04-15-2016 08:36 AM
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.
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...
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
04-21-2016 03:34 AM
Hi,
can you attach your sequence file?
Anna
04-21-2016 09:11 AM - edited 04-21-2016 09:12 AM
Hi Anna,
the problem has magically disappeared when modifying a sequence to be posted here
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
Now... running my seqeunce having set a breakpoint in the sequence and taking a look at the variables I get this
Parameter.Step is shown as type Boolean instead of Container!
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.
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
04-26-2016 09:11 AM
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
04-26-2016 09:33 AM
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
04-26-2016 09:40 AM
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