I have read all the posts I can find on ramp functions. I need some help with getting a linear ramp output. I want to have a ramp function before the setpoint input to a PID controller. The formula I am using gives a decelerating ramp. Starts out quickly and then slowly approaches end_point.
Ending_Point = Beginning_Point + ((Ending_Point-Beginning_Point)*Elapsed_Ramp_Time/Total_Ramp_Time)
I'm using the current output as beginning point. because this value increases with each scan, the difference from begin to end decreases which adds a smaller amount each scan. Looks like a logarithmic graph. How do I capture the beginning point and keep it constant till ramp is complete? Also allowing it to change if setpoint is changed before ramp is complete in case of a fat finger.
I am using Tristation 1131 4.9. It does not have a ramp in its basic library.
I have a basic knowledge of structured text but not too familiar with calling other functions within my function.
The manual doesn't help much. I'm trying to use TMR so I can use TMR.ACC / TMR.PT as my multiplier.
My inputs are: Enable, Beginning_Point, Ramp_Time,
Output: Ending_Point
I know this question lacks some detail but I'm at home now. I can post my function tomorrow.
Thanks
Rogelio
Ending_Point = Beginning_Point + ((Ending_Point-Beginning_Point)*Elapsed_Ramp_Time/Total_Ramp_Time)
I'm using the current output as beginning point. because this value increases with each scan, the difference from begin to end decreases which adds a smaller amount each scan. Looks like a logarithmic graph. How do I capture the beginning point and keep it constant till ramp is complete? Also allowing it to change if setpoint is changed before ramp is complete in case of a fat finger.
I am using Tristation 1131 4.9. It does not have a ramp in its basic library.
I have a basic knowledge of structured text but not too familiar with calling other functions within my function.
The manual doesn't help much. I'm trying to use TMR so I can use TMR.ACC / TMR.PT as my multiplier.
My inputs are: Enable, Beginning_Point, Ramp_Time,
Output: Ending_Point
I know this question lacks some detail but I'm at home now. I can post my function tomorrow.
Thanks
Rogelio