NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Sequence takes 10x more time to execute when launched from ProcessModel/ProcessModel Plugin

Solved!
Go to solution

Hi Doug,

 

Only single value is passed to the sequence.

And the for each iterates on arrays containing not more than 20 values...

Is the fact that this sequence is in file and this file is called from a ModelPlugin (so with the load option 'dynamic') would influence the execution time of this function ?

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 11 of 19
(1,754 Views)
Solution
Accepted by CyGa

Are you also dynamically unloading the modules after the step executes?

 

One possibility is also that perhaps some process model or other callbacks are getting called after each step in the case in which it's slower.

 

-Doug

Message 12 of 19
(1,749 Views)

Indeed, well done : I use the process model callback 'PostStep' !

I'll disable the callback when entering in this particluer sequence (I don't need the callback to be played there) and re-enable it after it executes.

I'll let you know the result.

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 13 of 19
(1,745 Views)

Hi Doug,

 

Once again you're right !

I disabled the ProcessModelPostStep Callback at the beginning of my modelPlugin - PreUUT sequence and re-enabled it at the end.

The code contained in this sequence now runs as fast as possible.

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 14 of 19
(1,738 Views)

In discussing this with a co-worker, I've learned that ProcessModelPostStep callback should not normally be active in a ModelPlugin sequence file, unless it is not set as a process model file. Model plugin sequence files created by the wizard are automatically marked as process model files. If you did not use the wizard, you will need to change this setting yourself (or recreate the file using the wizard). You can change the sequence file type to "Model" on the Advanced tab of the sequence file properties dialog.

 

Hope this helps,

-Doug

0 Kudos
Message 15 of 19
(1,724 Views)

I actually used the wizard to create the sequence file. I then moved this ModelPluggin file in TSPublic folder and declared as an addon (Addons folder).

I just checked tha Avdanced options of my ModelPlugin file : it's set as Model. So I guess I shouldn't have noticed any slow down running this ModelPlugin sequence.

Maybe the code isnot played but the sequence is loaded each time... ?!

 

Disabling and re-enabling the callback in the soecific part of the ModelPlugin-PreUUT sequence works fine. And the execution time of ModelPlugin - PreUUT were effectively divided by 10 since I disabled the PostStep callback...

 

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 16 of 19
(1,721 Views)

Are you perhaps calling into a different sequence file that isn't marked as a model from the plugin sequence file? Which file has the ProcessModelPostStep callback in it?

 

Thanks for any info.

-Doug

0 Kudos
Message 17 of 19
(1,708 Views)

Nope, the sequence is only called in the ModelPlugin - PreUUT.

There are no files in the ProcessModelPostStep callback. All I do in this callback is using the TS API to get status and progression of my execution for each of my sockets.

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 18 of 19
(1,705 Views)

hi zyl7,

 

Can you post or PM me the plug-in file you are using to get this behavior?  I tried to replicate this behavior using the ProcessModelPostStep but it does not get called in my case.  We'd like to investigate this further in case there is a bug on our end.

 

Thanks!

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 19 of 19
(1,693 Views)