NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to modify Sequential Process Model for report generation.

I am using the Sequential Process Model in my application and the TestStand Reference Manual, (Figure A-1), clearly shows the following processing sequence:

 

...<part removed>

    Call the Test Sequence

    Display the UUT results

    Generate a Report

    Log Result to a Database

...<more removed>

 

I want to generate the report BEFORE displaying the results to the operator, or at a minimum, I want to generate the report in parallel with displaying the results to the operator.  Currently, the problem I have is that when the test is done I have some automated scripts that take the data file and do some statistical processing on it, but the way the Sequential Process Model is set up, the test might finish but until the operator acknowledges the PASS/FAIL results display, the resulting file is never created.  It could be overnight, over the weekend, or several days before an operator comes back and says, "Oh that last test finished, I guess I can press the OK button!", but until they do, I get no data.  So I want the report generated no matter what, and right after the test finishes.

 

Any ideas as to how that might be best accomplished?

 

Thanks a billion -  Ski (noob)

0 Kudos
Message 1 of 13
(4,390 Views)

Have you used On-The-Fly reporting?  Just go to Configure>>Report Options.  It's a checkbox on the bottom there.  It generates the report during execution.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 13
(4,390 Views)

By the way.  On-The-Fly Reporting does generate a temporary file you can analyze while TestStand is running.  I can't remember the name but just look in your report folder during execution and you'll see it.  It's very similar to what the report will be named after execution.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 3 of 13
(4,390 Views)

Thanks for the quick response.

 

No, we don't use on-the-fly reporting.  We tried it early in our development process but it slowed things down too much.  (There may have been some other issues too.)

I am happy with generating the report all at once, I just need it to happen without waiting for the operator acknowledgement step.

 

Thanks,

 

Ski

0 Kudos
Message 4 of 13
(4,386 Views)

You will have to modify the process model to meet your needs then.  The process model is what does all the on-th-fly reporting as well so you might be able to manipulate it to make it faster.  However, I would assume just moving the reporting step to occur before the pass/fail banner gets displayed would probably do the trick.  You have to be careful though that everything you want is already in your resultlists.  Also, you will have to identify all the risks of moving those steps to even know if it's feasible.  I would make a copy of your process model and use the copy to goof around with.  When I get home tonight maybe I'll look into it and see what else could cause issues.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 5 of 13
(4,380 Views)

OK, thanks.   

 

I knew I was going to have to modify the process model, I just wasn't sure if anyone had made this particular change before.  I was looking at the Process Model and it was not immediately obvious as to which call to move to get the "Generate Report" to happen before the Display UUT Results. If there turns out to be a single, "Write the report" step and all I have to do is move it in front of the "Display UUT Results" step, then I will be a very happy engineer.  😉

0 Kudos
Message 6 of 13
(4,375 Views)

Hi,

 

When you look in the Test UUT's sequence it's the Set Report step after the call to TestReport that displays the report in the UI report view, so you would need to move the Post UUT Callback to after the Set Report step. But if you are not interested in the banners then just override the PostUUT Callback. You would have to put at least one step in the callback to get it invoked because the engine doesn't call an empty callback sequence.

 

By the way what TestStand version are you using?

 

Regards
Ray Farmer
0 Kudos
Message 7 of 13
(4,367 Views)

Ray,

Is that new in 4.2 that the engine won't call a callback with nothing in it?  I just did it and it seemed to work fine.  I'm using 4.1.1 though.

 

Ski,

Maybe there is a better solution for what you want.  Are you using the SequentialModel?  What version of TS do you use?  Why does the report have to be written before the pass/fail banner displays?  The pass/fail banner gets displayed in the PostUUT callback.  Like Ray said if you just put that in your client sequence you won't see the banners.  However, I'm assuming there is more to this than just that.  I'm assuming you want to see the report because of your external analyzer that is gathering the statistical data.  And then based on that data you want to allow the user other options.  Is this correct? 

 

If so then I would override the PostUUT callback and then use a different callback (possible the ProcessCleanup callback) to displaly the banners.  You could even do this without modifying the process model (which I always try to avoid).  Just override both the PostUUT and ProcessCleanup callbacks.  And then put code in the ProcessCleanup to behave like you need.

 

Or if you want you can modify the process model and create a new callback lower in the process model.  Then have that new one do the post report analysis.

 

Just some thoughts.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 8 of 13
(4,362 Views)

Maybe this just applies to Engine Callbacks,

 

TestStand Reference Manual, Chapter 10-8
Caveats for Using Engine Callbacks

• When a callback sequence is empty, TestStand does not invoke the Engine callback.

 

But I thought I read this somewhere about Callbacks as well.

Regards
Ray Farmer
Message 9 of 13
(4,352 Views)

Ray,

That's odd.  I just got the PostStepFailure engine callback to execute with nothing in it.  I wonder if they are referring to specific ones.  Although maybe it means completely empty.  I had a breakpoint at the <end group> of the main step group.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 10 of 13
(4,348 Views)