PLC Commissioning Tool

Analog Scaling Calculator

Convert raw card counts (4–20 mA, 0–10 V, ±10 V…) to engineering units and back, then copy ready-to-paste scaling code for Rockwell, Siemens and CODESYS.

Raw counts
range 032767
Engineering unitsPSI
range 0150 PSI
08192163842457532767counts037.575112.5150PSI

4–20 mA is a live-zero signal: 0 mA means a broken wire or dead transmitter, so under-range can be detected as a fault — the analog equivalent of wiring an E-stop normally-closed.

// Scale 4–20 mA raw counts to PSI  (Studio 5000 / RSLogix, Structured Text)
EngValue := (RawValue - 0) * (150 - 0)
            / (32767 - 0) + 0;

// Ladder equivalent: a CPT instruction with the same expression
// CPT  Dest EngValue  Expression (RawValue - 0) * (150 - 0) / (32767 - 0) + 0

Questions

Frequently Asked

What does the analog scaling calculator do?

It converts the raw integer your analog input card reports into real engineering units (PSI, °C, RPM…) and back again, then generates ready-to-paste scaling code for Rockwell, Siemens and CODESYS. Type in either the raw box or the engineering box and the other side updates instantly.

What are “raw counts”?

The whole number a controller reads from an analog channel before scaling. The range depends on the card and family — Rockwell is typically 0–32767, Siemens 0–27648, a 12-bit card 0–4095. Pick the matching preset to set the raw range with one click.

How do I scale a 4–20 mA signal to engineering units?

Set the raw range to your card’s counts, set the EU range to your transmitter’s span (e.g. 0–150 PSI), choose the 4–20 mA signal, then enter a raw value or drag the gauge. The calculator solves the linear slope/offset for you.

Why is 4–20 mA called a “live-zero” signal?

Because the lowest valid value is 4 mA, not 0. A reading of 0 mA can only mean a broken wire or a dead transmitter, so a fault is detectable as under-range — the analog equivalent of wiring an E-stop normally-closed.

Which controllers does the generated code support?

Rockwell Studio 5000 / RSLogix (Structured Text plus a CPT ladder equivalent), Siemens S7-1200 / S7-1500 (SCL using NORM_X and SCALE_X) and CODESYS / IEC 61131-3 ST. The Formula tab gives you the raw slope-and-offset math for any other platform.

Is anything sent to a server?

No. Everything runs in your browser — no values are uploaded or stored.