Calculating The Out-Of-Range Flag Using The Scale Instruction - Allen-Bradley SLC 500 User Manual

4-channel analog i/o modules
Hide thumbs Also See for SLC 500:
Table of Contents

Advertisement

Calculating the Out-of-Range Flag Using the Scale Instruction

Use the following equation to calculate the low and high limit input
values which determine the out-of-range flag.
Once you have calculated the linear relationship and the out-of-range
flag value, this example allows you to:
The following ladder diagrams show how to program the processor.
The first example uses standard math instructions available in any SLC
500 processor. The ladder diagram prevents a processor fault by
unlatching the mathematical overflow bit S2:5/0 before the end of the
scan.
The second example uses the scaling instruction (SCL) available in
the 5/02 and higher processors. The rate parameter is calculated by
multiplying the slope by 10,000.
If the result of the Source times the Rate, divided by 10000 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.
The third example uses the SCP (scale with parameters) instruction
available in the SLC 5/03 (OS302 or later), SLC 5/04 (OS401 or later),
and SLC 5/05 only.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Input value = (scaled value - offset) / slope
low limit (275 - 100) / (400/32,767) = 14,344
high limit (300 - 100) / (400/32,767) = 16,393
• Turn on a heater or fan to maintain the process temperature
between 275° and 300° C by using the out-of-range flags.
• Monitor the process temperature using a Data Table Access
Module (DTAM) or Hand-Held Terminal (HHT).
• Output the process temperature for operation interface purposes
by:
– MOVing the scaled value to an output module as variable
data to a Dataliner
– Converting the scaled value to BCD (using TOD instruction)
and MOVing it to an LED display
rate = (400/32767) x 10,000 = 122
Programming Examples
Publication 1746-UM005B-EN-P - June 2004
6-3

Advertisement

Table of Contents
loading

Table of Contents