Linear ramp function

What PLC are you using?

If you just want to ramp a value over time, I would use (timer accumulator / timer preset) as the multiplier (m) in a y = mx + c formula.

If using a Rockwell SCP instruction: Input = Timer.ACC, Raw Min = 0, Raw Max = Timer.PRE, Scaled Min = Ramp Start Value, Scaled Max = Ramp Stop Value.
 
using s7 317 looking for the linear ramp function dynamic change , suppose starting at 0 value ramping upto 5000 counts at the rate of 10s , after reaching the value , suppose new value is 2500 ,should ramp down at the rate of defined time say 5s both acc/dec should be independent

can y suggest
 
I've not used S7 for a while, so I won't risk telling you what instructions to use; I'll stick to the technique.

Run a timer with a 10 second period. Calculate the output as:
( timer accumulator /timer preset ) * 5000.

When the timer is stopped, accumulator = 0 and output = 0.
When accumulator = 5 seconds, accumulator/preset = 0.5 so output = 5000.
When accumulator = 10 seconds, accumulator/preset = 1 so output = 5000.

The timer values will be integers, so you'll have to convert to REAL along the way, otherwise you'll end up with only either 0 or 1!

If you need more detail, you'll have to get help from somebody more up-to-speed with S7 than me.

I hope this helps.

-- Ian
 
I would use (timer accumulator / timer preset) as the multiplier (m) in a y = mx + c formula.
Is it really taught as Y = mx + c on that side of the pond? Over here it is "b" instead of "c".
 
Now we know, every region has its own preference for the equation of a line. I wonder who was first? Maybe the Chinese or the Greeks? C does make better sense in English as a Constant! But then m is also a constant, so I guess m is "Multiplier?
In the US, Australia, Canada, Egypt, Mexico, Portugal, Philippines and Saudi Arabia the notation is: y = mx + b

In the UK, Australia (also), Bahamas, Bangladesh, Belgium, Brunei, Cyprus, Germany, Ghana, India, Indonesia, Ireland, Jamaica, Kenya, Kuwait, Malaysia, Malawi, Malta, Nepal, Netherlands, New Zealand, Nigeria, Pakistan, Peru, Singapore, Solomon Islands, South Africa, Sri Lanka, Turkey, UAE, Zambia and Zimbabwe: y = mx + c

In Afghanistan, Albania, Brazil, Catalonia, Czech Republic, Denmark, Ethiopia, France, Lebanon, Holland, Kosovo, Kyrgyzstan and Viet Nam: y = ax + b

In Azerbaijan, China, Finland, Russia and Ukraine: y = kx + b

In Greece: ψ = αχ + β
In Italy: y = mx + q
In Japan: y = mx + d
In Latvia: y = jx + t
In Romania: y = gA + C
In Sweden: y = kx + m
In Slovenia: y = kx + n
 
Last edited:
Welcome to the forum.

The equation for a ramp is

Beginning_Point + ((Ending_Point - Beginning_Point)*Elapsed_Ramp_Time/Total_Ramp_Time)

If you'll search the forum you'll find dozens of posts with lots of different examples.
 

Similar Topics

Could somebody suggest to me how I would be able to ramp down an output linearly based on the state of an input? The process is as follows: The...
Replies
8
Views
2,520
Hello, We are currently working on a project that involves connecting a linear potentiometer to our Beckhoff PLC. After researching, we...
Replies
2
Views
176
hi! Has anyone experience doing linear interpolation for servo motors using omron CJ2M PLC and CJ1W-NJ413 PCU. If you do, can you show me...
Replies
0
Views
150
Hi, I have an application that currently utilizes SEW drives and programming that we are attempting to convert to Allen Bradley CompactLogix and...
Replies
9
Views
1,098
Does anyone know the part number for that plug that plugs into the 1771 devicenet scanner? The manual just says it is a linear plug, its 5 pins.
Replies
3
Views
1,040
Back
Top Bottom