NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Runing a sequence programatically

 If I have 2 or 3  Sequences and I select "Run Selected Steps" option, can you programatically call one of the unselected sequences in Preconditions??
I wrote a seq which allows the user to select Troubleshoot(TS) mode or end to end run (EtoE).  TS mode sets a station global to 1 based on buttonHit.    I wrote another subseq that does a setup  If I'm in EtoE I check and skip that seq.  But if the user select a particular step in TS mode and doesn't select the setup seq, the test will fail.  Can I select a single seq , check to see what my station global is, if its a 1 programatically run the setup seq. before I run the selected seq.  If not, it means I'm in end to end and don't need to run the setup seq.
Clint
0 Kudos
Message 1 of 8
(3,870 Views)

Hi Clint,

Is it possible to post a small example ?
Why are you using a Station global? (are not a all sequneces in ONE SequnceFile ?)
I assume a syncronisation StepType could solve your Task

Greetings

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 2 of 8
(3,860 Views)

Juergen,

Here is what I have.  I think you helped with the original seq.  It was a post on a discussions grp.   I only mod'd 1 seq file so you can get the idea.  What I'd like to do is when seq a is called from the main seq is check stationglobals to see if its a 1.  1 indicates troubleshoot mode.  This means the user can "jump in" at any point and run a sub seq.  It also means the ps may not have been powered up yet.  I was thinking I could create a sub seq with just the ps in it.  If the user selected Troubleshoot and "run selected steps", Teststand could check ( Preconditions using running a seq programatically????) to see if the power supply seq has been run yet.  If not run it.

 

Thanks,

Clint

0 Kudos
Message 3 of 8
(3,846 Views)

Juergen,

One other thing.  In the example I sent when I call say for example Seq A, from the Main Menu, it goes right into Seq A and starts to run it.  Is there a way call Seq A or B or C etc from the Main Menu and allow the user to "run selected steps" or "test UUTs" in each of those seq's??  This maybe a little better explanation of what I'm trying to do wih my previous post.  In my program Seq A, B, C each have calls to subseq.  I want to allow the user to select seq A or B etc then "run selected steps" or Test UUTs.  If they select run selected steps I have to make sure that a power up seq was run 1st.  That was my thinking when I said use a precondition to check and see if the powerup seq had been run yet.If it hadn't have TS run it for they.  I also need to run another seq at the end of the test to do power down.  If there isn't a solution to have TS auto call a seq if a certain condition was meant I was going to put each powerup/powerdown Step in each seq.( a LOT of work)  Then have a precondition that checked to see if they were in Troubleshoot mode (based on Buttonhit hit earlier; reason for using stationglobal) and ASSUME that they are selecting steps individually.  If they were in troubleshoot mode it meant they hadn't run the 2 special steps and therefore I need to run them.  I've been away from TS for sometime and dug out my old course manual.  I couldn't understand how I could use a "Step Type" as you suggested to solve my problem.

From what little I've seen TS is unbelievably powerful.  I hope there is a method to make TS run a seq if it hasn't been run yet based on criteria set by the user.

Thanks and I hope this isn't too confusing !!!

Clint

0 Kudos
Message 4 of 8
(3,818 Views)
Hi Clint,
 
I would start a thread in PreUUT or PreUUTLoop (depends on where is power off) which starts PowerSupply Sequence. Inside it will wait for a notification from one of the SeqA/B/C.
 
I think i should provide a example to show my stuff
give me some minutes
 
Greetings
 
Juergen
--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 5 of 8
(3,813 Views)
Hi Clint,
 
Scrup my upper stuff to litter basket !!! TO CONFUSING !!
When do you need Power Of ?
 
I will be back in 5 hours
 
Greetings
 
Juergen
--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 6 of 8
(3,810 Views)
I need power off if the user is done "Testing UUTs"
0 Kudos
Message 7 of 8
(3,805 Views)
Hi Clint,
 
Not really 5 hours !
 
check out this example
 
greetings
 
juergen
--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 8 of 8
(3,779 Views)