NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Where is loop status stored during runtime using "loop on selected steps"

I am trying to write a custom report that allow a technician to loop on an arbitrary set of steps and receive the results in a csv file or equivalent (without having the techs trying to change parts of the sequence, since that would violate quality controls on manufacturing testers). 
 
I was hoping to be able to read a variable in the poststepcallback that shows whether the step was tested using "loop on selected steps" and having a custom output for that case.  If anyone knows how I can detect looping I would appreciate the help.
 
Thanks,
Sean
0 Kudos
Message 1 of 9
(4,488 Views)
Sean,
 
Do you know that you can Loop On ...Using Single Pass or Test UUTs. Which means that a report will be generated at the end of the execution.
 
Regards
Ray
Regards
Ray Farmer
0 Kudos
Message 2 of 9
(4,481 Views)

Ray, 

I am aware of the "loop using ..." ability.  The default reports in test stand are not compatible with our process, so I wrote a set of custom reporting vis that run in the setup/poststepcallback/cleanup stages for normal reporting and deactivated the automatic reporting (since all it was doing was cluttering the harddrive).  Now I am trying to implement a second type of reporting that only happens when a technician (not operator) is logged on and decides to loop on selected steps (to help debug intermittent DUTs).

The ideal solution would be if there is a variable/parameter somewhere that indicates that looping is being performed (which I could use to trigger the alternate reporting).  I suppose an alternative way to get where I want would be to programmatically re-enable the default teststand reporting only for the duration of looping.  Is that possible?

Thanks,
Sean

0 Kudos
Message 3 of 9
(4,473 Views)
Hey s.cooper,
 
This may be a bit more tricky than it seems.  Only because the reporting, as you are aware, is, or at least should be, taken care of by the process model.  Therefore you cannot use the default reporting because you have your own process model.  Since the default reporting is part of the Sequential, Batch or Parallel process models that ship with TS then you would have to use one of those process models to get the default reporting. 
 
Concerning the looping-
Will the ops and techs be selecting to loop on a particular set of steps interactively (i.e. Execute>>Loop on selected steps)?  If you used the default sequential model you'll notice that you can Loop on Selected Steps Using the SinglePass entry point.  This does use the process model to loop on the selected steps a certain number of times.  However, Execute>>Loop On Selected Steps...  does not use the process model and just loops on the selected steps.  If you did write your own process model then you can select your entry point to Allow Interactive Execution of Entry Point.  This option is in the entry point sequence properties.  Right click the entry point and select properties.  On the Model tab you will see that option. 
 
OR
 
Will the ops and techs have the option set forth by your process model to select which steps to loop on?  If so then how would you loop on those steps?  Have a GoTo step that loops back to the beginning?  Have something that sets each step to loop a fixed number of loops?  There is a Step.LoopType API property that returns the Looping property for a given step as a string.  NoLooping means that the step has no looping properties set for it.  This could be used somewhere in a condition to determine which type of reporting to do.
 
Hope this helps you some,
jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 9
(4,469 Views)

A few more thoughts after REALLY reading your issue....

There is a SequenceFilePostInteractive Engine callback that gets called after each interactive execution.  Which just happens to be what you are doing.  This may be helpful to call certain steps (i.e. your custom reporting steps, or steps that take the resultlist and write it to a csv file etc....).  This will also seperate the "real" execution from the debugging of your ops and techs.

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 5 of 9
(4,465 Views)
Sam,
 
The techs would be using the "Loop on selected steps..." method to loop on whichever tests appear to be intermittent as a debug assist.  Unfortunately, if the steps process to quickly they cannot see any but the last result from the looping (as they update to quickly).  I was hoping to be able to put a conditional in the post step callback that would trigger off whatever mechanism in Teststand allows it to keep track of the looping in "Loop on selected steps..." to record all of the results to a .csv file for the tech to review or have on hand as a record during debugging.
 
Sorry for the bolding, but I wanted to emphasize the particular piece of information that I think I need.
 
Thanks,
Sean
0 Kudos
Message 6 of 9
(4,463 Views)
Sam,
 
Thanks for the suggestion.  The SequenceFilePostInteractive Engine callback might be a better way to do it than what I had originally been trying (i.e. figuring out how to read the looping mechanism itself).  I will look into how to get that to work and post back later.
 
Thanks again,
Sean
0 Kudos
Message 7 of 9
(4,462 Views)
Hi Sean,

Did you ever find the variable that holds this value? I'm running into the same problem...

I can access the interactive args but that only tells me the number of loops that the user selected to run not the actual index of the execution

Thanks,

Ignacio
0 Kudos
Message 8 of 9
(4,180 Views)
<< - N - >>,

This was reported to R&D (# 4I3G2D6O) for further investigation.R&D is currently investigating this issue. We have had several requests for this feature, and currently there is no API or way to get this information other than parsing the step setting string which you can get by calling Step.GetStepSettingsString().

We appreciate your feedback!

 
 
 
Josh W.
Certified TestStand Architect
Formerly blue
0 Kudos
Message 9 of 9
(4,122 Views)