NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Write to database Operation when Running Selected Step

Solved!
Go to solution

I'm writing to a database that has a specific format for process monitoring. The problem I'm facing is that when I use run selected steps, only the data from the selected steps is being written to the database and therefore causing a shift in my data because the other steps aren't being recorded. I was hoping that run selected step would mark the other steps as skipped in which I'm able to see if the step is skipped to write null data for that step. What run selected step seems to do is recreate the sequence to only have the selected steps in it, in which I can't detect any skipped steps. Has anyone faced this issue? Am I understanding the how run selected steps work, and if so is there a way to override this to perform in the way that I would like where run selected steps just skips the steps that aren't selected?

0 Kudos
Message 1 of 5
(2,684 Views)
Solution
Accepted by topic author Phil-G

So you are talking about an "interactive execution".  If you google TestStand and Interactive Execution there are many articles out there.

 

However, I don't understand why you would expect all of the other steps to execute in a skipped mode.  That seems like a very odd expectation out of the box.

 

You can right click on steps and change the mode to skipped and then run the automation normally.

 

You could create a tool that pops up a dialog and allows the user to select which steps they want to run.  Then it will dynamically skip all of the other steps by changing their precondition or setting the mode to skipped.

 

Just out of curiousity- how and what is writing to the database?  Generally databse logging is done through a plugin via the process model.  But process models don't run in interactive mode.

 

Regards,

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

I'm aware of the skipping option and that works well for me, but that can be tedious for the operator (lazy devils) if there's several steps, especially when running a selected step would only be for diagnostic purposes only. I'm using a PostMainSequence to build up a string of all the step Measurements to insert in my shcema. For a skipped step I can look at the Status in the ResultList to determine if the step has been skipped and act accordingly. I will have to review again, but I didn't see anything about Interactive Execution that helped for my particular case, and I wasn't really expecting the other steps to be skipped as more so hoping, because it would work nicely for my specific case 😁. However creating a tool to dynamically skip steps might be my best option in this particular case.

0 Kudos
Message 3 of 5
(2,657 Views)

Ok this makes more sense.  I was just pointing out that it is called interactive execution so you knew what to look for (official key words).

 

The tool is really your only options unless you want to recurse through the sequence file in your PoseMainSequence callback and gather all of the steps and create entries based on the difference between that and what was in the result list.

 

Regards,

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

I thought about doing something like that but your suggestion seems a lot cleaner, thanks

0 Kudos
Message 5 of 5
(2,637 Views)