Ramp Function SLC-500

Jack

Member
Join Date
Jun 2003
Posts
22
I am writing a program on an AB SLC500 that controls a proportional valve from 0-50 PSI over a 15 second period. I am using a 1746-NIO4V for the I/O card. I have selected a linear algorithm with a one second time base. I am comparing the output to the valve with the feedback from the valve every second for 15 seconds to make sure it is within 5%. On the one second check, I see nothing on the output but expect to see 1/15 of 16383 or 1122. Because of this, my limit function is faulting out. Does anyone know why the first second is not tracking? After the first second, all is good.
 
Jack said:
I On the one second check, I see nothing on the output but expect to see 1/15 of 16383 or 1122

Do you mean 'Output', not the feedback ?
If you mean feedback, then it could be 'dead-area' in the propo.
If you mean Output, I need to see the code.
 
You were right, I meant feedback. I thought it was the valve and tried another with the same results. Then I took the valve out and tied the analog output back to the analog input and see the same thing. It's a new I/O card so I am assuming it is not the card. The control register (N7:0 to N7:6) is set up like this,
N7:0 = 16
N7:1 = 15
N7:3 = 0
N7:4 = 16383
N7:7 = Ramp Results
 
Jack said:
I ...expect to see 1/15 of 16383 or 1122.

How is your input scaled? 0-16383 (aka, PID), or 3277-16383 (aka 1747-NI4). If the latter, you need to subtract the offset before taking the 1/15th.

When checking the +/- 5% - is that relative or absolute. If the valve is closed and you are doing absolute then 5% of 0 = 0, and so the feedback must be exactly zero. A value of 0.0625 would not be allowed, even though that may be what the feedback signal is sending (i.e., 4.01 mA, instead of exactly 4.00000), just due to noise, calibration and the like.
 
The input is scaled 0-16383. The code is
RMP N7:0 - Control Words
N7:7 - Results

MOV
N7:7 to O:3.1

MOV
I:3.1 to N10

MUL
N10 x .95 - Result in N11

MUL
N10 x 1.05 - Result in N12

LIM
N11 - Low Limit
N10 - Test
N12 - High Limit

After once second, which is a long time, N10, N11, and N12 all have a small negitive number, all the same, ie. -3, or -4, or -5. That's what is confusing. N7:7 has a zero. I must be missing something :)
 
Isn't a typical analog output scaled from 6242 to 31208?

If so, for your first few seconds, the value may be less than 6242, i.e. less than 4 mA, so the valve doesn't respond and you see nothing.

When you get to 15 sec, you are sending only 16383 out to the output, so I would expect the valve to only be openning about 50%. Is that what you are seeing?

You might try changing N7:3 to 6242 and N7:4 to 31208.
 
Allen
What you said about the range, I believe to be true for the 4-20 ma board. This is a voltage board so I think the range is 0-32767. I am running the board only to 50% of the 100 PSI max on the valve. One thing I did find was the ladder was writing the analog output and on the next rung, reading the analog input. I placed a 25 millisecond delay before reading the input and things have settled down and giving the correct input. Real life times, go figure.
Thanks for everyones time and responses.

Jack
 
If the valve needs opening in 15 seconds i would use the timerprocesvalue for this.
So if timer starts it gives 0 seconds out of 15 seconds is 0/15 is 0% output
after 5 seconds it would be 5/15 is 33 % as the loop is done in a few milliseconds the valve will open very smoothly instaead of stepping every second.
You can check the feedback same way as it should be within 5% of full scale.
just compare the feedback with the timer
Just have it always checked and not every second.
hope it helps. :p
 
Enough.

Jack, have you verified that your control output ramp actually goes from 0% to 50%s in 15 seconds? This will tell you if the PLC and its outputs are working properly. I would use a scope, but the ramp is so slow you may be able use a multimeter.

Everyone has been so wrapped up in the PLC outputs. What about the valve? Jack has told us nothing about the valve! Jack, don't you think it would be nice to know what you are controlling? Do you really think that a valve will instantly respond to your ramp? Maybe the valve has a slow response or a dead zone where it will not respond to low signals.

Provide info.

Tests that I do:

Slowly increase the control output to the valve until air starts to flow. This give a dead band below which control output levels have no affect. I then do a step jump in the control output from the dead band to 100%. I measure the time it takes the spool to move to the final position. This is about 5 time constants. From this I can tell how the valve will respond in normal operation.

Believe in or not it takes time for the spool to accelerate and reach SP.
 
Shooter,
I am not sure how to implement your suggestion. Using the ramp function should allow the valve to ramp smoothly. I am just sampling the analog feedback every one second until I reach 15 seconds.

Peter,
I did not think to put a scope on the feedback, just an analog meter which *appeared* to be smooth. The specs on the valve show a 20 millisecond response from the command to the *start* of pressure rise and roughly an 800 millisecond response time from 0 to 80 PSI.

Stopping the program at one second showed my problem was a flaw in the way I programmed it. Even though I now know where the problem lies, I am still trying to get the timing correct so I can read back the input. Since I don't have air here at home, I just tied the analog output of my card back to the analog input and still can't get the timing right. But I am plugging away.
 
relative v absolute

One problem you might be having is with the small valve openings. This goes back to a question I asked earlier about whether your +/- 5% was relative or absolute.

Your code shows that you are using a relative 5% error. That is, if you are opening the valve to 5% of it's full 0-16383, you are expecting the feedback to be within .95*5 to 1.05*5 = 4.75 - 5.25% of it's full range 0-16383. If you were using an absolute error, then you'd accept a feedback of 0 to 10% for an output of 5%. If your feedback sensor is no more than +/- 1%, and you are looking for a range of +/- 0.25%, then you'll have trouble.

At the full open (100%) position, relative and absolute error checking are the same. But for anything less, relative error is a much tighter spec, possibly impossible to achieve (at output = 0%, relative error says that the feedback must be 0.0000%, while absolute allows -5 to +5% open.

The other thing that seems to be biting you is the scan time and the signal time. Just as the valve has delay characteristics, so does the PLC. Even sending the output direct to the input, the module still has to measure the new voltage, and the PLC will probably have to do at least one scan of the code before the new feedback signal is read. What's your scan time. How does it compare with 25 msec?

And why 25 msec? Do you have that critical of response rate for your valve? Or are you just trying to confirm that the valve has, in fact done SOMETHING in response to the output?
 
Allen
The +/- 5% is relative to the integer sent to the output card.
I start a one second timer and the ramp function. At 800 ms, I output the ramp into the output card and into a storage register. I now start a 200 ms timer (I increased from 25 ms to 200) then I multiply the storage register by .95 and 1.05 and store the results. At the end of the 200 ms timer, I capture the analog input and compare with the stored limits. The timers are reset and the cycle is repeated 15 times.
The timing is critical only to the fact I wanted the cycle done in one second. Since I am capping the valve with a small piece of plastic tubing, there is no problem getting the required output within that second.
I think increasing the second timer to 200 ms has given the analog card time to respond for both the output and inputs. Again, since I do not have air at the house, I tied the analog output back to the analog input and it *seems* to work. I will find out for sure on Monday when I actually connect the valves. :confused:
 
Who needs air?

What can be done.

A Static Simulation of Jack's Valve.

To model the pressure regulation valve I used the 20 millisecond dead time and the 800 milliseconds to 80% output in response to a 100 % control signal. Jack didn't say what control signal was required to get the 80% pressure in 800 milliseconds so I assumed it was 100%. I plotted the response to a step jump and a response to a ramp as jack say he did it. It goes from 0 - 15 volts in 200 ms increments so it looks like it steps instead of ramps to 15 volts. Notice the difference between the control signal and the feedback. Jack can make improvements by moving the control signal up to compensate for the delay. Jack can also make an improvement by increasing his ramp more smoothly.

The difference equation can be put in a timed interrupt to simulate the valves response to Jack's control signal. I do this sort of thing all the time to simulate systems so I know how they will react before they are built. This saves big $.
 
Peter,

Thank you very much for all your hard work on this. I'm kind of at a loss for words considering the time and effort you put into this. All I can say is Thanks Again !!

Jack
 

Similar Topics

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...
Replies
14
Views
13,279
Hi all, has anyone got a working example of the SCRV S-Curve Ramp Function Block. I cant seem to get it to run - guessing a parameter is not set...
Replies
2
Views
2,734
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...
Replies
3
Views
5,044
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...
Replies
9
Views
7,391
Dear All, any body execute the ramp function in Unity pro 6.1 schneider plc.plz gv me some standard ref.program backup. sandip
Replies
0
Views
3,003
Back
Top Bottom