NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Set a step NOT to trigger a callback

Hi !

 

I defined some actions in my process model Pre/post step callbacks. So for each step of my client sequence, these callbacks run.

My client sequence contains subsequence calls.

 

Is it possible to avoid triggering the callbacks for some of the subsequence calls (or simply for some steps) ?

 

I filter the actions to do inside the pre/post step callback (if...end), but it still takes too much time just entering the callbacks, evaluating the if..end conditino and leaving the callback (i've got many steps and loops in the sequence that actually have no impact on the actions to achieve in the callbacks). That is why I want to avoid triggering the callback.

 

Thanks !

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 1 of 6
(4,526 Views)

One thought is that you could use Execution.EnableCallback() to disable the callback.... but that might not help you, since it will be hard to turn it back on unless you can make a modification in the client file to do so.  A sneaky idea would be to misuse an Execution.AddPostStepCustomUIMessage expression to do the enabling and perhaps also the disabling, but I haven't tried that, so I don't know if it could work..

0 Kudos
Message 2 of 6
(4,500 Views)

Hi James,

 

I can try using the EnableCallback() function, but I'll have to call it often in my test sequence. Will it be more efficient than an if/end in the callback ?! I'm doubting it.

Same thing for the AddPostStepCustomUIMessage expression...

 

I tought an attribute/flag cuold be (de)activated on the steps that should not trigger the callback.

 

We've seen the same behaviour since TS2012 : triggering a callback, evaluate an 'if' condition and leaving the callback takes a while !! For exemple, my current test program takes 210 seconds to fully execute.

If I remove the callback trigger (just adding an '_' in the sequence callback name), the test time falls down to 70 seconds !! Knowing that 95% of the steps trigger the callback and exits right away because it doesn't satisfy the head 'if' condition.

 

Do you have any idea of what could be going on ?

 

Thanks

 

Cyril

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 3 of 6
(4,482 Views)

Calling a subsequence has at least the same cost as executing a couple of steps. A callback is a call to a subsequence. By adding a callback that executes for every step, even one that exits on its first step, you are multiplying the per-step overhead by a factor of three or so. This is expected.

 

I would expect the work arounds I suggested to be more efficient, ... if they can be made to serve your use case.

0 Kudos
Message 4 of 6
(4,472 Views)

OK, I didn't imagine that the factor was so high !

I'll try your workarounds.

 

Do you have any link where I can see the 'cost' of each step type call/run ?

 

Thanks

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 5 of 6
(4,455 Views)

I don't have a link like that. It all varies anyway according to which options you utilize.

0 Kudos
Message 6 of 6
(4,446 Views)