LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Slow down the impact in labview

Solved!
Go to solution

I want to ask if there is any way to slow down the impact in labview. For example, if I adjust the Knob to 10, the Gauge will not increase immediately to 10, but will increase slowly up to 10. When I adjust the Knob, the Gauge will change as well, but slowly Knob. Thank you guys!

 

 
0 Kudos
Message 1 of 7
(2,670 Views)

Hi khan,

 

maybe it would help to answer your question if you would explain about which knob and gauge you are talking about!

There's no reason a "gauge will not increase immediatly" - apart from your code…

 

Please attach your VI!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(2,632 Views)

@khanhpham_3108 wrote:

I want to ask if there is any way to slow down the impact in labview. For example, if I adjust the Knob to 10, the Gauge will not increase immediately to 10, but will increase slowly up to 10. When I adjust the Knob, the Gauge will change as well, but slowly Knob. Thank you guys!

 

I'd treat the changed value as a setpoint.

 

Then the code should have a function to go to that setpoint. This could be a ramp, or a P, PI, PID function. Even a cosine function.

 

The interpolation needs to be programmed, and the details depend totally on the program you have. In a new blanc VI, you'd first need some structure. This could be a Producer\Consumer, state machine, the usual suspects... This is actually CLD level coding.

 

It would be feasible to make a control and indicator, and design a VI that handles the transition from the indicator's current value to the control's value. If that is practical, again, depends on the program you have or are planning.

Message 3 of 7
(2,614 Views)
Solution
Accepted by topic author khanhpham_3108

Here is a motion ramp that we used for our robot. It calculates the accel deccel and steady state time and generates a curve. We used this curve and a PID loop to make the move happen. You should be able to do something like this to do what you want. This code also assumes that you are starting at zero and moving to a max point. You will have to change it to do what you need it to do.

 

Example.png

Tim
GHSP
Message 4 of 7
(2,595 Views)
Solution
Accepted by topic author khanhpham_3108

Do you want a maximum rate of change? Should be trivial to implement with a shift register.

 

Another option would be an simple exponential filter (see here). Can you give us more details on the requirements?

 

ExponetialFilter.png

Message 5 of 7
(2,563 Views)

Thanks. You can sent to me your code, please?

 

 
0 Kudos
Message 6 of 7
(2,521 Views)

thank you so much!

 

0 Kudos
Message 7 of 7
(2,513 Views)