scaling analog inputs ab slc 500 series

MNJ96

Lifetime Supporting Member
Join Date
May 2005
Location
Salem, Oregon
Posts
50
hi

i am pretty good at programming ab plc . i have never had any experience with analog controls . i currently need to set up a slc 5/02 processor with ni4 analog input cards . to be used to read a 0-10 vdc psi tansducer and scale it 0-3000 psi. the modules are configured ,wired ,and set for voltage input . i need help .step by step on setting up the scl instruction . how the math works . calculations etc. i have read the instruction help for the scl and still do not understand . i notice on the rate it has the value you enter and / 10000 what does the / mean ? divide multiply , subtract ? i see this used in a lot of ab manuls and stuff ?any help on this or program examples anyone could email me would be greatlt appreciated
 
Phil

First off don't worry too much about the engineering units at this stage of game. Yes they are neat
AND they do make it easier to understand and interprolate (sp ??)
BUT you need to understand what you are doing with the signal coming in what that converts to in bits and same for the output side.

I JUST learned this with a lot of help from those on this site. Let us see how well I learned.

Here is how I did it.

Open up Excel spread sheet.
Enter input ie
Min 0
Max 10

Now put in allowable bits for input
Min 0
Max 16,000 bits (I am not giving you the real value -- look it up in manual -- I did and that is how I figured it out.

Now repeat for the output. It takes a little reading but if you do it in this tabular manner and look up the values for bits in Rockwell it will start tom make some sense.

IF you intend to to PID that instruction usees different bit values than those for the input output card. YOu can convert these using the Scale Parameters.

Search on trigger PID. In the many messages I have an Excel spredsheet showing how I did it.

Also learning

Dan Bentler
 
Greetings Phil,



and welcome to the forum ...



somehow you don’t sound like a student with an assignment to do ... more like a man with a mission and a deadline ...



so see if this example helps get you started ... sorry that I don’t have time right now to explain the math ... I’m sure someone will come along shortly and take care of that ... if not, I’ll be back in a day or two ... in the meantime, the “Rate” for your example works out to be approximately 0.091555528 ... that should be enough of a hint to help you figure out how the SCL is set up ... and notice that both number ranges start out at zero ... (0 to 32767 for the NI4’s 0 to 10VDC input range - and 0 to 3000 for your requested PSI range) ... that means that your “Offset” entry for the SCL should also be 0 ...



scl502.JPG




note to Dan ... Phil’s SLC-5/02 doesn’t support floating point math ... nor will it handle the SCP that worked so well for you ... the best that he can do with his processor is the SCL ... but otherwise, your advice would have been right on target ...
 
Sorry Phil
kinda wasted your time.

Listen to Ron (he is one of several who taught me)

Lessons here (for me)
1. SLC 5 02 is NOT a 5 05. More time exposure and practice is needed.
2. SCP and SCL are similar but SCL looks real handy also. Almost does math for you.
3. Humility is a good thing.
Dan
 
I would use the SCP instruction.......its much easier and you dont have to worry about trying to calculate the rate.

SCP.jpg


Much easier to adjust the Zero and Span if you have to calibrate a loop.

Dave
 
Last edited:
I basicly had the same problem as him and the plc im using dosent support the SCL instruction and did support the SCP instruction so that helped me out alot

thanx
 
thanks for the file but i am still not understanding the basics of the math involved here . do have any examples that break it down a little more
 
Hey I'm with Phil.

Most of the AB SLC500 stuff I work with are 5/03 5/04 and 5/05s so I use the SCP a lot. I would like to understand the math side of the SCL funtion also.The SCP is neat because it does most of the work for you. I'll keep my eyes on this thread. good luck and thanks Phil.

Todd M.
 
Let me see if I can put this in basic terms. The analog input puts a value in the plc, for the SCL and 5/02 I believe the value will be -32768 to 32767. What you will do is use A NUMBER to obtain what you need.

The Rate thing can throw you off because its MULTIPLYING a number divided by 10000. Look at Rons example with 32767 and rate of 916 with 3000 in the destination. Take the 32767 then divide it by 3000 and you get 10.92...obtain the inverse of that..1 divided by 10.92 equals .0916 ..ie 916 divided by 10000 which is the number you see in as RATE.

Its just a manipulation of numbers, use what you need to obtain numbers you want.
 
Rate is any number you need to use. The number used in rate will be divided by 10000 first then multiplied against the source.

Depends on what values you need to obtain what rate you use, there are several ways to do this.

Lets say it was a PSI value between 0 and 200.0 and the analog input is -32768 to -32767. Off top of my head a simple thing to do is add 32767 to the analog input value, which will give you 0 to 65535.

You could place this value as Source in an SCL and use RATE to give you the equvalent of 0 to 200.0. Here is where it gets detailed...note we wanted 200.0, the 5/02 doesnt support floating point so we are "cheating". We will obtain a value of 2000 to equal the 200.0.

To do this rate multiplies a number to the source to get an obtained value...65535 times .0306 will give you a value of 2005...which could be displayed as 200.5. .0306 is 306 divided by 10000.

I am definitely not in the league with those that have replied so far. I am just trying to offer simple answers to help understand, hopefully others can offer more.
 
From the RSLogix 500 on-line help:


Equations used in calculating a linear relationship:
Scaled value = (input value x rate) + offset
Rate = (scaled max. - scaled min.) / (input max. - input min.)
Offset = scaled minimum - (input minimum x rate)


Entering Parameters

Values must be between -32768 and +32767 for the following parameters.
Source must be a word address.
Rate (or slope) is the positive or negative value you enter divided by 10,000. It can be a program constant or a word address.
Offset can be a program constant or a word address.
Destination is the address of the result of the operation.



Note If the result of the Source times the Rate, divided by 10,000 is greater than 32767, the SCL instruction overflows, causing error 0020 (minor error bit) and places 32767 in the Destination. This occurs regardless of the current offset. If this occurs reset bit S:5/0 with your ladder program before the end of the current scan or else a major error will be declared.
 

Similar Topics

I know this has been covered before, but I can't get this scaling to work in Logix Designer/CompactLogix 1769-L33ER project. I tried to: -...
Replies
4
Views
3,611
I am familiar with RSLogix 500 and I have done multiple applications using analog. I have to do a project using Direct Soft 32. I am going to use...
Replies
6
Views
15,333
Hello, We monitor the temperature of a pipe via a 4-20mA temperature transducer. This goes into DB135(Read Analog Inputs). The issue I have is the...
Replies
0
Views
626
Hi all! I have a question about RSLOGIX and Analog input/output scaling So we have an existing controller with an IF8I and OF81 card. My...
Replies
3
Views
933
I’m trying to perfect the HMI interface for analog configuration. I’ve provided the user the same options for all analog inputs, as follows...
Replies
10
Views
1,672
Back
Top Bottom