NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Current Sequence Status

Is it possible to check the status of the current seqeunce during main execution or just in cleanup.

I was hoping to set a precondition for my steps in main that if execution has errored or failed do not execute the step -  I suppose on fail I am aswell just jump to cleanup..

Thanks,

Shane.

0 Kudos
Message 1 of 6
(4,009 Views)

Hi Shane

 

Try using ThisContext.RunState.SequenceFailed to check the status of your sequence.

 

If some of your steps has been failed i would think on a PostAction to jump to clean up

 

Hope this helps

 

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
Message 2 of 6
(3,992 Views)

There is also a global setting (station options dialog at the bottom of the first page) to goto cleanup on failures.

 

-Doug

0 Kudos
Message 3 of 6
(3,980 Views)

Hi,

Thanks for the replies.

I tried ThisContext.RunState.SequenceFailed  but it doesn't seem to update until cleanup.

Also I only want certain steps to jump to cleanup so I don't want to use a global setting.

I have posted another post on trying to jump to cleanup using the property loader - I can't seem to get the syntax correct.

http://forums.ni.com/ni/board/message?board.id=330&message.id=28162#M28162

Maybe one of you guys can help with this?

Thanks & Regards,

Shane.

0 Kudos
Message 4 of 6
(3,962 Views)

Hi Shane,

 

I have re-tried RunState.SequenceFailed on my TS 4.0 maschine in an example

and it is working a suspected. It is updated once a step has been failed!

Note: All steps has been set on default as Step Failure cause Sequnce Failure. This should not be disabled, of course!

 

In your case i would use the step post action and jump on fail to cleanup.

 

Just take a look on the example.

 

Hope this helps

 

juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
Message 5 of 6
(3,954 Views)

Hi,

Thanks for the example sequence file - it ran as you outlined - I must have had something wrong with my implementation when I tried it out. I will look at this again.

Thanks & Regards,

Shane.

0 Kudos
Message 6 of 6
(3,931 Views)