From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

settling time

Solved!
Go to solution

hello,i have a code in labview which is generating a signal like this:

signal.jpeg

 

and i would like to stop the execution of the code when the execution time is equal to the settling time of the signal, is there a way to do this??

i need a command which calculate this settling time of the signal that i am generating

 

thanks

 

0 Kudos
Message 1 of 14
(5,336 Views)

Based purely on your graph, I would do some sort of derivative.  If the derivative is 0 and within your range of final value (peak is within the final range), call it done.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 14
(5,333 Views)

but i am generating that signal when the code is running, so i don´t know the exactly signal which i will have in each case.

the code is the next,and the signal generated is the input process variable of the regulator pid,so i need stop the code when the time is equal to the settling time

0 Kudos
Message 3 of 14
(5,325 Views)

@mariomoskis wrote:

but i am generating that signal when the code is running, so i don´t know the exactly signal which i will have in each case.

the code is the next,and the signal generated is the input process variable of the regulator pid,so i need stop the code when the time is equal to the settling time


 

Crossrules gave you the answer i would have suggested.

 

What criteria do you want to use decide if the signal has settled?

 

rember to be able to stop when it seetles the decision has to be based on the reading prior to the "STOP" since you do not know what is comming after.

 

Ben 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 14
(5,323 Views)

so,if i understand well

 

i must do the derivate of the pid´s output and if it is 0, and it is in the range that i want (+-1% of the setpoint),all is done?

 

 

0 Kudos
Message 5 of 14
(5,319 Views)

but my output are numers,so i should generate a function first and later derivate it?

0 Kudos
Message 6 of 14
(5,316 Views)

@mariomoskis wrote:

so,if i understand well

 

i must do the derivate of the pid´s output and if it is 0, and it is in the range that i want (+-1% of the setpoint),all is done?

 

 


 

 

Exactly*!

 

Give Crossrules a Kudos and mark his reply as the answer.

 

Ben

 

Well not EXACTLY zero since in real world meassurements zero is rare. look for a small derivative. I can't recall ever reading a real zero ever (that did not invlove an error).

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 14
(5,314 Views)

and how can i generate a function with the points that i will have at the output? because the if i try to derivate the output, the kind of terminals coneted are different

0 Kudos
Message 8 of 14
(5,307 Views)

Personally, I would use a shift register to hold the previous value.  You can then do a comparison between the current and previous values.  If the slope goes to 0 or changes sign (will need another shift register to hold slope), then you hit your peak.  I'll see if I can get together something really quick to show.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 14
(5,303 Views)

ok,it would be better to understand what u meant 🙂

0 Kudos
Message 10 of 14
(5,300 Views)