RSLogix 5000 Ladder Ramp Function

KLemas16!

Member
Join Date
Jun 2016
Location
NH
Posts
9
Good afternoon,

This is my first post with this website and I am also relatively new to ladder based programming (used mostly SAMA with DCS platforms).

Here's what I'm trying to do in ladder:

I have a pump and a discharge control valve (equipped with an I/P). When the pump is first started, the valve will be placed at 10% until pressure builds to 50 psig. At this point, the valve will be slowly ramped from 10% to 100% over 30 seconds. PID function is not required for this valve at all.

I've attached a screen shot of my software. The problem is the CPT function only provides a result when TON is done. I need it to pass a value continuously over the course of 30s to ramp the valve. Any simpler way of doing this? Any help is greatly appreciated.

Ramp_up.jpg
 
The image is a little blurry so correct me if I'm wrong.

This is your equation:

Code:
10+((100-10)*(Timer.ACC/Timer.PRE))
a) When you write numbers without decimals the controller will cast them as DINT. Also, HC_6108_Ramping_Up_Position is declared as DINT.

b) When the controller executes Timer.ACC/Timer.PRE, probably the result is being casted as DINT because the other parameters and the output variable are DINTs. Then you have two possible results: 0 and 1. You get 1 only when the timer is finished.

You can rewrite the equation like

Code:
10.0 + (90.0*((Timer.ACC+.1)/Timer.PRE))
a) I'm adding a ".0" to all the numbers. Now the numbers are casted as REALs.

b) Adding .1 to Timer.ACC is just a trick to tell to the controller "cast this division as REAL". Since the range of Timer.ACC is so big, adding 0.1 won't be significant.

Other way to get the same result is:

Code:
10.0 + Timer.ACC / 333.33
You can add some logic to keep the value equals to 100 is the result of the equation is greater than 100.
 

Similar Topics

How can I achieve the same functionality in Studio 5000? Image 001.png for the old RSLogix500 program Image 002.png for conversion to Studio...
Replies
6
Views
2,516
I don't think I'm going crazy.. Lately when I have multiple routines open in the ladder editor and I open another one my tabs at the bottom only...
Replies
7
Views
2,432
Hello PLCS.net! Here again to ask about how to do some weird quirky thing with RSLogix 5000. I see my team trending a lot of tags, but it becomes...
Replies
0
Views
1,542
Hello, Have aoi written in Ladder to pass in and out string variables. String VAriables that interact with PLC program are declared as InOut...
Replies
5
Views
4,268
Hi folks, I have a piece of code from my first project that I'm looking to improve a bit so am looking for some advice on how to do so. There's...
Replies
11
Views
2,830
Back
Top Bottom