VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Wait Until Settled Timeout

Solved!
Go to solution

If the wait until settled function should timeout because the monitored signal does not settle within the specified range within the timeout period, what is the indication that the function actually timed out?  Will it stop the sequence file from running or throw an error code of some type?

 

Thanks

Michael

0 Kudos
Message 1 of 9
(6,835 Views)

From the Context Help for the Timeout:


Specifies the amount of time in milliseconds within which the real-time sequence must complete each timestep. A zero or negative value indicates an infinite timeout. If the sequence does not complete a timestep within the specified amount of time, the VeriStand Engine aborts sequence execution and returns an error.

So, if it times out, you should see an error in the VeriStand Engine.

 

Best,

Ryan C.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 9
(6,809 Views)

I'm not sure that's the same timeout I'm referring to.

 

From the online Veristand help document:

 

  • WaitUntilSettled—Waits until Signal settles into a range you specify for a certain duration.
    • Signal—The signal the system monitors to settle within the specified limits.
    • UpperLimit—The high value of the range that Signal must remain within.
    • LowerLimit—The low value of the range that Signal must remain within.
    • SettleTime—The amount of time in seconds that Signal must remain within the specified limits.
    • Timeout—The maximum amount of time in seconds to wait for Signal to settle.

Timeout should be the time the function waits for the signal to settle.  In testing the setup, I can simulate conditions that never let the signal settle within the limits but nothing faults or appears to time out.  I can let the program run for minutes when the timeout is set to seconds, adjust the signal to a value within the limits, and the program continues on as if nothing ever went wrong. 

 

I'll post the snippet of the code; maybe I have something configured incorrectly as I am trying to use variables for every parameter in the function.

 

Thanks, in advance, for your help with this!

 

Michael

0 Kudos
Message 3 of 9
(6,801 Views)

Hi,

 

I think you can open and look at the source code (normaly the function should return false in case of a timeout) :

Capture.JPG

0 Kudos
Message 4 of 9
(6,791 Views)

@thumble wrote:

Hi,

 

I think you can open and look at the source code (normaly the function should return false in case of a timeout) :

Capture.JPG


Hello Thumble.  I'm finally getting back to this.  How can I detect in my veristand sequence that the function returns false so that I can trigger other actions based on this?

0 Kudos
Message 5 of 9
(6,450 Views)

Re,

 

In RT sequence you may use an "if" statement and at Stimulus & Profile level I think there is an option to make the step fail (and abort the Stimulus ?)

 

Season greetings,

0 Kudos
Message 6 of 9
(6,444 Views)

I've tried the if statement something like this:

 

if TimedOut (this is the return variable from the subsequence)

Then SequenceTimeOutFault = true

Else...

 

Even when I'm certain the function is timing out, this never returns true.

 

I had to declare the variable, TimedOut, in the calling sequence.  I set it as ByValue initially but also tried setting it to ByReference; both without success.

 

I've attached a screenshot of the code for the subsquence.  I'm not exactly an experienced user so maybe I'm interpretting the return value process incorrectly.

 

Any and all help is greatly appreciated!

 

Michael

 

0 Kudos
Message 7 of 9
(6,441 Views)
Solution
Accepted by jeepers52004

Re,

 

In my opinion the joined code should work. If not I'll give up to a NI Guy.

 

++

 

Message 8 of 9
(6,431 Views)
Solution
Accepted by jeepers52004

@thumble wrote:

Re,

 

In my opinion the joined code should work. If not I'll give up to a NI Guy.

 

++

 


Your example worked for me.  Thank you very much!

 

Michael

0 Kudos
Message 9 of 9
(6,425 Views)