Sign in to follow this  
Followers 0
Chris Elston

Scale with Parameters Application

12 posts in this topic

What would be an application for a scale with parameters? Like a LIMIT? Say if I wanted to limit only 0 through 100 percent of a analog signal which would be say, 6000 = 0 and 24000 = 100, but scaled lineraly, is that what you would use a scale with parameters function block for? Haven't used it yet looks like a great tool for that reason maybe.

Share this post


Link to post
Share on other sites
are you talking about the SCP in RSLogix500? ... if so, that one doesn't "limit" the signal ... it just provides a linear conversion from one number (ex: a raw analog input value) into another number (ex: a scaled reading in gallons) ... specifically, if the input number goes too high or too low - then the output will also go "out of range" ... it'll still be scaled in a linear fashion - but it WILL go beyond the MAX or MIN settings ... or did I just totally misunderstand what you're asking about? ...

Share this post


Link to post
Share on other sites
Yep... or say you are getting a 4-20 mA signal that is scaled 0-400 degrees you can: SCP I:4.0 0 16383 N12:11 N13:11 N11:11 My attachment shows 0 to 4000 but we scale that in the HMI to 0-400.0 and get tenths of degrees. Edited by finfin

Share this post


Link to post
Share on other sites
Yeah, I was kind of thinking along the lines of a PID, I didn't want the control input to go beyond a certain limit but scale in correctly. I can do it with normal limit statements, but I saw the limit options in SCP. So the INPUT MIN and INPUT MAX, won't limit the input to those settings in the RS500? In other words, say I have a sensor input going into a PID. If my sensor feedback reads 25, but my INPUT MIN was set to 50. Would it scale the output from the INPUT MIN setting of 50 rather than the 25 of the actual sensor reading? Or if there is no single from the sensor feedback, the output would still be 50 on the scaled output feeding the PID?

Share this post


Link to post
Share on other sites
I use them a lot for things like tank levels. 4-20mA or "2453-12094" do not really mean anything to the operator when he sees it on his HMI. So I usually get the two values i.e. "2453-12094" low and high, then use the output from the SCP to give me a 0 to 100% on my display. I have also used this instruction with a 4-20mA CT to be able to monitor current draw on a machine. CT was good for 30 amps, so I took the raw data and used the SCP to display 0-30 amps. rob

Share this post


Link to post
Share on other sites
the best way to look at the thing is as a Y=MX+B equation in a box ... the MIN and MAX words should probably have been called LOW and HIGH instead ... they do NOT provide a limiting action ... in fact, "been-bit-before" programmers will usually use the common "LES-MOV" and "GRT-MOV" rungs just ahead of an SCP to make sure that the input signals don't go too far out of bounds ... if they do, you could end up with an S:5/0 overflow trap fault ... again - NO limiting action ... going further ... as neat as the SCP is, many "purist" programmers scorn it ... since it is basically a Y=MX+B equation, the processor has to perform all of those RISE/RUN, etc. etc. math calculations EACH and EVERY time this thing executes ... in most programs, this "extra math" burden doesn't amount to a molehill - but a "purist" will perform the basic "slope" and "offset" calculations himself - and then use a simpler CPT or even an MUL instruction to do the scaling operation ... this offloads the extra boiler-plate math from the processor's workload ... most people figure: "I bought the processor to PROCESS - so let it do the work" ... but some people insist on debating anything and everything ... Edited by Ron Beaufort

Share this post


Link to post
Share on other sites
Dang, I didn't know I had been LABELED already..I must be a purist, I've always done my scaling with CPT, but I saw the input limit, thinking it would be sweet to keep a PID loop from misbehaving. Oh well, glad I asked. I'll just limit the feedback using the "purist" method.... IF LESS than THIS > MOV THIS INSTEAD...; -) Thanks Ron.

Share this post


Link to post
Share on other sites
here's some more to show what can happen with these handy little things ... here’s an interesting little exercise that I run my students through in the SLC-500 class ... (PLC-5 and CLX-5000 don’t have the SCP - so those guys miss out on this one) ... first, all of the students wire up a 4 to 20 mA signal to their analog input cards ... the input data normally ranges from 3277 to 16384 ... they twiddle the potentiometer and monitor the input signals ... life is lovely ... then they wire up a milliammeter to an analog output card ... the output data ranges from 6242 to 31208 ... they manually enter various values into the data table and the meter moves up and down ... life is lovely ... next I give them an assignment to use the potentiometer to control the meter ... some students try an MOV (Move) command ... that won’t work too well - because the potentiometer puts out only about 16,000 at the high end - which is only about half-scale for the meter ... eventually (sometimes with a nudge in the right direction) they decide to use the SCP function ... this works fine - on MOST of the workstations ... but Little Johnnie’s workstation is “rigged” ... I’ve adjusted the trimmers on his potentiometer circuit so that he can get about 24 mA when he cranks it full open ... now we’re to the punch line ... sooner or later, Little Johnnie is going to crank that potentiometer WAY UP, and his processor is going to fault out ... I’ll play dumb: “What did you do back there?” ... now let’s see how long it takes Johnnie and the rest of the class to track down what caused the fault ... actually, all of the concepts were covered earlier in the class when we discussed math overflows, etc. ... now it’s time to see how much the students really understood - and still remember - from those lessons now that life is suddenly not so lovely anymore ... the answer is that the extra high input signal causes the SCP to try and scale the output data to a value greater than 32,767 ... bingo! ... that’s an overflow condition - which causes a fault ... now let’s see how long it takes for someone in the class to suggest using those LES-MOV and GRT-MOV rungs that we learned about yesterday to LIMIT the input signal going into the SCP - so that we won’t ever get another annoying fault ... then MAYBE (hopefully - but not usually) somebody else will stop and think: “Hey, maybe the input signal went so high because the thermocouple lead broke - and the hockey puck transmitter 'fired high' to tell us about that field condition ... in that case, maybe a fault to shut the system down completely is EXACTLY what we want" ... I could go on, but maybe I’m giving away too much of the plot ... somebody out there might want to pay to see the show someday ... Edited by Ron Beaufort

Share this post


Link to post
Share on other sites
I use scp a lot on packaging equipment. Have operations where a motor turns on to execute a function on the machine, such as move a package from point a to point b, and as it is moving fire glue guns and close flaps etc. as the package cycles through the machine. Latley have been using a ab encoder that has a rating of 1000ppr. Will scale this to equal one cycle which is one revolution of the motor. In the operator display usually set up a maitenance screen, and in the program take the encoder input and scale it and display 0-360 for 0-360 degrees, which is the one revolution of the motor. The technician can jog the machine and observe the encoder on the display, which is 0-360 and then determine at what angle to turn on or off glue guns, flap close cylinders, etc. This was something that a lot of the equipment that we got in from Italy was set up to do, and works very well, so I adopted that technique on a lot of projects with packaging equipment. Attached a stripped down version of program that I wrote for a autoclave machine. The machine pulls a vacuum inside to -22 inches of mercury then injects steam to a certain pressure (which equals a certain temperature ) and maintains it for a certain time to set the fabric inside the chamber. I used the SCP as well as using the LIM instruction to clamp values used in the pid that is used to control the steam. Also used the SCP to controll a chart recorder that shows the pressure inside the chamber. Thought you might find the post interesting. No doubt, lots of better ways to do what i did, but the post may give you some ideas on how the SCP and LIM instructions might could be used. Also, I program in rslogix 500 different from most folks. I program everything in one continous lad file and enable the Integrate advanced diagnostics in project tree, under tools/options, so if you click on the + beside the Lad 2, you can select where to go to in the program. Just something I got used to doing, and seems to make it easier for me when I am troubleshooting a machine or debugging the code. I know its probably not the best way, its just the way I got use to doing it when i first started trying to learn rslogix500. AUTOCLAVE082906_1_RH.RSS

Share this post


Link to post
Share on other sites
Side Note: This is why this site and my job are great. I learn something new everyday!

Share this post


Link to post
Share on other sites
{Mracer takes note so while attending class with Ron he will not be "little Johny"},lo Good stuff Ron, thanks l

Share this post


Link to post
Share on other sites

he guys thanks for the good Knowledge from this website. i have a question here regarding SCP using AD ON INSTRUCTION  . I have  created   my scp which controlling injection molding position  ,and it has the following parameter  INPUT . INPUT MIN , INPUT MAX, SCALED MIN, SCALED MAX,  OUTPUT , AND RATE. But when i go to the program and call my scp and configure, i dont  get output to the my scp output point but if i get inside the parameter is giving output meas it scalling. so i dont know where is my mistake. please help me on this. NB This is what i have set to the scp. INPUT. i have created a tag with dint data type.INPUT MIN. i have put 0  INPUT MAX i have put 32767.SCALED MIN i have put 0, SCALED MAX  i have put 125. and  OUTPUT. i have created a tag with dint data type. so this has know output.

thank you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0