How-to
Calculating SCL rate and offset for a 4-20 mA MicroLogix input
Short answer
Rate 40 and Offset -25 put a 1762-IF4 live-zero current input on a 0-100% scale: SCL computes destination = (rate x source) + offset, with Rate entered as an integer divided by 10,000, so the slope 100 / (31207 - 6242) = 0.0040 becomes 40 and the offset 0 - (0.0040 x 6242) becomes -25. Check for 0, 50 and 100 at zero, mid-span and full scale; for new rungs, SCP with 6242, 31207, 0, 100 hits both endpoints exactly.
On this page
Rate = 40 and Offset = -25. Those are the two constants that put a 4-20 mA tank level on a 0-100% scale in N45:0 from the raw word at I:4.0. The SCL instruction computes destination = (rate x source) + offset, and it takes Rate as an integer that the controller divides by 10,000 when it executes, so the slope of 100 / (31207 - 6242) = 0.0040 percent per count is entered as 40. The offset that anchors the live zero at 0% is 0 - (0.0040 x 6242) = -25. Acceptance is 0, 50 and 100, each within one count, at zero, mid-span and full scale. For any new rung, prefer SCP with 6242, 31207, 0 and 100: it lands on both endpoints exactly and leaves the slope math to the instruction.
Where the 6242 and 31207 come from #
A 1762-IF4 channel configured for current input over the live-zero span reports the loop as signed counts: 6242 counts at the bottom of the range and 31207 counts at the top. Those are the documented endpoints, and a healthy module can sit a count either side of them (6241 and 31206 both show up in service), which is why the verification section reads your own word at both ends instead of trusting the number alone. The counts themselves are the module's analog-to-digital conversion of the loop current; how PLC analog input and output modules convert signals covers what happens on the module side of the terminal block.
Before any scaling, confirm the channel is set for current input rather than voltage; that selection lives in the module's I/O configuration in RSLogix 500. The configuration also chooses the data format, because the module can report raw counts or data already scaled for PID; choosing raw or PID scaling for a 1762-IF4 analog input covers that trade-off, and scaling raw counts in ladder keeps the arithmetic visible where you can trend it.
| Loop position | Raw counts at I:4.0 |
|---|---|
| Live zero (0% level) | 6242 |
| Mid-span (50% level) | 18724 or 18725 |
| Full scale (100% level) | 31207 |
The mid-span row is the computed midpoint: 6242 + (31207 - 6242) / 2 = 6242 + 12482.5.
The SCL equation and its two formulas #
SCL is y = mx + b in ladder form: scaled value = (rate x source) + offset. You supply both constants, and the instruction reference defines them as:
- rate = (scaled max - scaled min) / (raw max - raw min)
- offset = scaled min - (raw min x rate)
Three execution facts shape how you enter the results. Rate and Offset are integers in the range -32768 to 32767, entered either as constants typed into the instruction or held in integer words. The controller applies Rate divided by 10,000, so one count of Rate entry is 0.0001 of slope, and usable slopes run from -3.2768 to +3.2767. The destination is an integer word: the multiply is carried in a 32-bit intermediate, so 40 x 31207 = 1,248,280 does not overflow, but fractional counts do not survive into N45:0.
Sizing Rate and Offset for 0-100% tank level on a 1762-IF4 #
Inputs, each with its source:
- Raw endpoints, 6242 and 31207 counts, from the current channel configuration above.
- Engineering range, 0% at the low end and 100% at full span, from the level transmitter's specification.
- Source I:4.0 and destination N45:0, from the rung being built.
Rule in words: the rate is the scaled span divided by the raw span; the offset is the scaled minimum minus the raw minimum times the rate; the Rate entry is the rate multiplied by 10,000.
Arithmetic, written out:
Rate = (100 - 0) / (31207 - 6242) = 100 / 24965 = 0.004006 percent per count.
Rate entry = 0.004006 x 10000 = 40.06, entered as 40.
Offset = 0 - (0.0040 x 6242) = 0 - 24.97 = -24.97, entered as -25.
The rung therefore computes N45:0 = (40 x I:4.0) / 10000 - 25.
Checks at the three loop positions:
- Live zero: 0.0040 x 6242 - 25 = 24.97 - 25 = -0.03%, reads 0.
- Mid-span: 0.0040 x 18724 - 25 = 74.90 - 25 = 49.90%, reads 50.
- Full scale: 0.0040 x 31207 - 25 = 124.83 - 25 = 99.83%, reads 99 or 100.
Decision: enter Rate 40 and Offset -25 and accept every check within one count. Integer truncation can park the extremes at -1 and 99 instead of 0 and 100; when it does, Offset -24 puts all three checks on 0, 50 and 100. If the spec demands zero counts of endpoint error, stop tuning constants and use SCP.
Entering the rung in RSLogix 500 #
SCL
Source I:4.0
Rate 40
Offset -25
Dest N45:0
Type 40 and -25 straight into the instruction, or park them in two integer words if several rungs share one scaling. Additional channels on the same module reuse the constants unchanged; only Source and Dest move.
When to prefer SCP #
SCP takes the boundaries and derives the slope itself:
SCP
Input I:4.0
Input Min 6242
Input Max 31207
Scaled Min 0
Scaled Max 100
Dest N45:0
Two behaviors earn it the recommendation for new code. It reaches 0 and 100 exactly at the endpoints even in integer math, because (31207 - 6242) x 100 / 24965 = 100 with nothing left to truncate. And it clamps: below 6242 counts the output holds 0, above 31207 it holds 100. The clamp deserves one caution on a tank, because an open or disconnected loop on this module drives the raw word high, not low, so a broken loop clamps to a steady 100% instead of faulting. Alarm on the raw counts above the top endpoint so a full reading from an open loop cannot pass as a real level; what high raw counts mean on an open 1762-IF4 loop covers that failure mode.
Verifying at the three loop positions #
- Confirm the channel is configured for current input, then disconnect the transmitter and drive the input with a loop calibrator.
- Drive the calibrator to the bottom of the span and record the word at I:4.0; it should sit within a count of 6242.
- Drive full span and record it again; within a count of 31207. If either endpoint is off by more than a couple of counts, recompute Rate and Offset from the measured endpoints before suspecting the scaling.
- Drive mid-span; expect 18724 or 18725 counts and N45:0 within a count of 50.
- Return to both endpoints for readings of 0 and 100, each within one count. If you see -1 and 99, change Offset to -24.
- Reconnect the transmitter and watch one full fill and drain cycle: the scaled word should move monotonically, and level alarms merit a small deadband (0.5% is typical) if the liquid surface sloshes.
When mid-scale fails while both endpoints pass, the scaling is right and the signal path is distorting; the diagnostic sequence in troubleshooting non-linear current-loop readings on an S7-1200 analog input applies to any platform.
Other ranges: zero-based current and hundredths of a percent #
The formulas carry over; the constants do not. A channel configured for the zero-based current range swings 0 to 31207 counts: Rate = 100 x 10000 / 31207 = 32.04, entered as 32, and Offset = 0 because the raw minimum is zero counts. The live zero leaves with it, and a dead loop then reads a true 0%, which is the standing reason to keep the live-zero span on a tank.
For resolution finer than whole percent, scale to hundredths, 0 to 10000: Rate = 10000 x 10000 / 24965 = 4005.6, entered as 4006, and Offset = 0 - (0.4006 x 6242) = -2500. The endpoints land on 0 and 10000 exactly; mid-scale reads 5005 instead of 5000 because the Rate entry rounds up, which is 0.05% high and invisible on a display showing one decimal.
The same slope-and-intercept math applies when the word is read over a link instead of used in local logic; scaling MicroLogix analog inputs to Pascals over DF1 reads walks the identical calculation for a pressure transmitter.
Questions asked
Why will RSLogix 500 not accept 0.004 in the SCL Rate field?
Rate and Offset are integers in the range -32768 to 32767, and the controller divides the Rate value by 10,000 when the instruction executes. The slope you calculated, 0.004006, is therefore entered as 40, which the controller reads back as 0.0040. The same integer limit explains the destination side: an N word cannot hold 99.83, only the whole count 99.
My module reads 6241 at the low end and 31206 at the top of the span. Do I need new constants?
No. The span is identical: 31206 - 6241 = 24965 counts, so the slope is still 100 / 24965 = 0.004006 and the Rate entry stays 40. The offset shifts from -24.97 to -24.96, which still rounds to -25. Keep the constants and accept the single count of calibration spread when you verify.
The scaled word reads 99 at exactly full scale and -1 at the live zero. Is the module faulty?
That is integer truncation, not a fault. With Rate 40 the products are 24.97 at the bottom of the span and 124.83 at the top, and the destination keeps only whole counts. Change Offset from -25 to -24 and the checks read 0, 50 and 100. If you would rather not nudge constants, SCP with 6242, 31207, 0 and 100 reaches both endpoints exactly.
How do I scale a falling signal, where full scale means 0%?
Run the same formulas with a falling slope. Rate = (0 - 100) / (31207 - 6242) = -0.004006, entered as -40. Offset = scaled value at the low end minus rate times the raw minimum = 100 + 24.97 = 125. Check it: 6242 counts gives -24.97 + 125 = 100.03, which reads 100, and 31207 counts gives -124.83 + 125 = 0.17, which reads 0.
Why is the raw word 6242 counts instead of 0 when the tank is empty?
That is the live zero doing its job. The transmitter holds its lower current at zero level so the controller can tell an empty tank from a broken loop: 6242 counts means a healthy loop reading zero level, while counts near zero mean no current at all. It is also why the companion alarm belongs on the high side, where an open loop parks the word.