Slc 500 Analog Ramp Function

EDWARDO

Member
Join Date
Mar 2004
Posts
10
I AM USING A STANDARD A.B ANALOG MODULE WITH A 0-10 VOLT OUTPUT RUNING A VALVE DRIVER WITH A 24 VOLT SIGNAL TO THE HYD. VALVE. WHEN THE DEVICE BEING RUN BY THE VALVE HITS A LIMIT SWITCH I WANT TO RAMP DOWN THE SPEED BEFORE IT BOTTOMS OUT. IN THE PAST THE WAY I HAVE DONE THIS IS TO SET A TIMER TIMING WHEN THE DEVICE HITS THE LIMIT SWITCH AND THEN USED COMPARE FUNCTIONS < > AND MOVED A LOWER OUTPUT TO THE VALVE IN A SORT OF STAIRSTEP MODE. DOES ANYONE KNOW OF ANOTHER WAY TO DO THIS RAMP DOWN FUNCTION WITHOUT A SPECIAL CARD.

THANKS
 
and maybe this "basic idea" will be helpful ...

[attachment]

adjust the timer's preset ... and the amount subtracted, etc. ... you can use this for lots of applications ...

ramp.jpg
 
Last edited:
"I AM USING A STANDARD A.B ANALOG MODULE WITH A 0-10 VOLT OUTPUT"

"DOES ANYONE KNOW OF ANOTHER WAY TO DO THIS RAMP DOWN FUNCTION WITHOUT A SPECIAL CARD."

The question is puzzling to me. What is the problem ?
Do you need some other kind of analog output ?
Do you want to do the same thing in a completely different way ?
You probably have worked the ramp program out yourself allready.

NB: Please turn off your CAPSLOCK !
 
The most deterministic and repeatable method of open loop ramping is to use a 10msec STI and have your routine increment or decrement by a selectable amount. Use an immediate output instruction for the output module. This is an excellent method of doing open loop ramping for non-critical motion control and does a wonderful job of eliminating hydraulic shock from a system.

So if you want a ramp of 10V/sec for example, you would decrement you output module count value the equivalent of 0.1V per STI scan (327.67 counts for a SLC module). Make sure you use compare statements to keep from ramping beyond your set points. Floating point math is nice here since you can scale your ramped values as 'volts' to make it easier to see, and then convert to DAC counts in integer format right before you output the value to the output module.

If you are clever, make the STI logic transparent to the main logic file i.e. have the main file pass the setpoint voltage to the STI, add some logic to determine polarity (forward or reverse) and magnitude (accel or decel). If the application is bi-directional, you may have to add zero crossing logic to allow for seperate accel and decel rates, depending on how fancy your system needs to be i.e. if switching from a '+' voltage to a '-' voltage, ramp down to zero first at the decel rate, and then ramp up to the accel rate. Generally, systems can tolerate higher accel rates than decel rates.

I have assumed you are using an SLC platform which does support immediate I/O instructions. If it is a PLC5 platform with 1771 I/O, immediate I/O will not help since the module uses block transfer writes. You will see some improvement in thruput if the block transfer is performed inside the STI file, and while not as deterministic as a SLC platform, still provides reasonable open loop ramping for simple systems.

BTW - check the data sheet for the amplifier that you are using for the valve driver. Some amplifiers have built-in ramp generators.
 
If you have a 5/03 or higher processor, you could just use the built in ramp instruction RMP.

From the manual:

The Ramp (RMP) instruction provides the ability to create linear,
acceleration, deceleration, and “S” curve ramp output data wave
forms. This instruction provides a means to ramp analog outputs
when using them to control devices such as valves.

Not sure when they added this gem to the instructino set but I'm sure many don't even know it exists (as shown by the previous replys). I sure wish I knew about it a long time ago.....

nOrM
 
Good point Norm!

I was aware of the function, but AB added it to their instruction set several years after I developed programs that already had my 'roll your own' ramp generator. In my case, I decided it was more work to retrofit the fuction into an existing program (our ramping logic uses floating point math so that we can work with units of volts for convenience, and the RMP function works with integers), but this would probably work fine for Edwardo, assuming he is using the SLC platform with this firmware and not a PLC5 or SLC5/01 or SLC5/02.

And if you can experiment with the S-curving, you will find the axis motion to be much smoother, assuming you can tolerate the added time required to move to position.

Other brands of PLC's may not have a built in function and in those cases, the 'roll your own method' works fine.
 
Last edited:
Searching for s ramp generator code

s ramp generator for analog outputs on a plc5! Any sample code would be much appreciated.
best regards, peter
 
Greetings Peter ...

and welcome to the forum ...

see if the attached program gives you the basic ideas you're looking for ... just toggle the "RAMP_UP" or the "RAMP_DOWN" bits to run a demo ...

attachment.php


basically I used the formula and the nomenclature from page 4-23 of the SLC-500 Instruction Set Reference Manual linked below ... note that the SLC platform has an RMP (Ramp) instruction ... the PLC-5 doesn't have one (but you probably already knew that) ...

http://literature.rockwellautomation.com/idc/groups/literature/documents/rm/1747-rm001_-en-p.pdf

friendly tip: the next time you have a request like this, start a new forum thread of your own ... I almost missed this one because you tagged it on to a six-year old post whose title didn't really interest me ... I'll bet a lot of other forum members missed it too for the same reason ...

I hope this helps ... and once again, welcome to the forum ...
 
Last edited:
Ron, thanks very much. I'll test this script. At first glance it looks like it is rounding continuously, but thats o.k. I think I can work with this fundamental algorithm. Thanks again, Peter
 
If your processor will handle the math a Gompertz function will give an adjustable s curve. You can fiddle the function for slope and roll on roll off. I run it on a SLC for DC motor control.
 
The Gompertz function will work but....
The Gompertz function is not symmetrical. Exponential functions require solves a Taylor series so they are not efficient.
There are simpler ways to ramp between two points using simple polynomials. A third order polynomial can ramp between two points with the derivatives at both ends being 0.
 

Similar Topics

I have a program that has a scp of 0v to Image dc and in the input minimum it has 1638 and the input max is 14736. The scaled min is 0 and the...
Replies
2
Views
2,168
I'm working with an AB slick 500. It's running a RO system for the boiler room. I'm trying to interface with a transar system so they can monitor...
Replies
5
Views
2,749
Hello Programmers, I am new into the analog programming world. Please excuse any errors or mistakes. I created a program that would scale my...
Replies
11
Views
3,365
My goal is to get an analog signal from a SLC-500 remote rack back to a PLC-5 main rack. Is this possible? If so, I may need some help. I've set...
Replies
4
Views
1,772
Hi, I am installing monitoring systems for 12 identical machines. SLC 542, 2 dc sink inputs 2 relay outputs and 2 analog 4I. The first two...
Replies
2
Views
2,850
Back
Top Bottom