NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Customized Offline Results Plugin - Disable at PreBatch?

Solved!
Go to solution

 Hi all,

 

This is going to be a little tricky to articulate, but here it goes:

I’m customizing a plugin based on the NI offline results generator.

On a per-socket basis, I need to be able to disable offline results generation.  This is not too bad except that in some circumstances all sockets are in this state, and in the batch model this state gets set in our PreBatch callback.  By that time there seems to be no easy way to turn off offline results generation altogether.  It still creates the file and I no longer want it to.

 

Is there any way to disable the offline results generator plugin from the PreBatch callback?

From the  "Model Plugin - Pre Batch" entry point I have tried

Parameters.ModelPlugin.Base.Enabled = False
RunState.Root.Locals.ModelPluginConfiguration.Plugins[Parameters.ModelPlugin.Base.RuntimeVariables.ProcessorIndex].Base.Enabled = False

...but it continues along merrily and still outputs the TSR file.

 

Is there some method somewhere that will accomplish what I need to here?

 

Thanks as always,

 

Mr. Jim

 

 

0 Kudos
Message 1 of 5
(3,096 Views)

Could you add a small reproducing test case with your architecture for us to look into?

 

Also, are you calling any other report generation plugins at the same time?

Chase
NI Technical Support Engineer
0 Kudos
Message 2 of 5
(3,058 Views)

Hi Chase,

 

Thanks very much for your reply.

 

I talked to one of your colleagues via phone this morning - I'll PM you his name, and he can give you many more details.

 

Here are the plugins I've been developing so far:

  • Customized HTML report plugin (this one is finished and works great)
  • Model enhancements plugin.  This handles heavy lifting of model customizations that aren't explicitly related to results processing
  • Offline results plugin (this is the one I'm referring to in the original post)
  • I will probably be developing a database plugin as well so that the offline results processor can call it. We've got a few customizations on the database side, too.

In lieu of a test case, hopefully your colleague can fill you in?

 

Thanks again - I truly appreciate it.

 

Mr. Jim

0 Kudos
Message 3 of 5
(3,055 Views)

Ill speak with him and see what he says!

Chase
NI Technical Support Engineer
0 Kudos
Message 4 of 5
(3,037 Views)
Solution
Accepted by topic author Mr._Jim

Hi Chase, I should have updated this sooner.  Here's the strategy I'm going for based on a discussion with support:

 

  • The offline results processor just wasn't designed to be disabled as far along as the pre-batch plugin entry point, and it's way too painful to get it to work.  (i.e. heavy modification, if it's possible at all.)
  • Instead, it's going to be a lot easier to push all UUT results through the offline results processor and filter them from within another customized plugin that the Offline Results Processing Utility calls.
  • To tell the results plugin called by the ORPU (is that a real acronym?) to throw out UUT results, one has to send it one or more variables / properties delineating what should or should not be thrown out. To do this, the easiest way seems to be to append extra results containing these properties. The appended results aren't actually results, they're just a convenient way to pass variables. Those variables get written to the TSR file where they can be decoded and later picked up downstream by the plugin that writes to the database.

Not trivial, but doable.  I've almost gotten it finished and it does seem to work.

 

A heartfelt thanks to the NI personnel who helped me with this, including you, Chase.

0 Kudos
Message 5 of 5
(3,032 Views)