Popular plc programmingindustrial automationconnect PLC to SCADA ModbusControlSystemsLadderLogicStructured Text
Free tools

Engineering tools

Free calculators for automation and electrical work. Every answer shows the formula and the method, so you can check it and learn it. Below them is the Ladder Lab, a PLC simulator that runs in your browser.

Ohm's law & power

V, I, R and P from any two values

Formula and notes

V = I × R P = V × I = I² × R = V² / R

Fill in any two values and leave the others empty. Example: a 24 V coil with 120 Ω resistance draws 0.2 A and dissipates 4.8 W.

4–20 mA scaling

Signal to engineering units and back

Formula and notes

EU = LO + (mA − 4) / 16 × (HI − LO) mA = 4 + 16 × (EU − LO) / (HI − LO)

Example: a 0–10 bar transmitter reading 12 mA is at 5 bar. Below 3.8 mA usually means a broken wire (NAMUR NE43).

Modbus address converter

40001-style address to register and offset

Formula and notes

0xxxx coil (FC01/05/15) · 1xxxx discrete input (FC02) · 3xxxx input register (FC04) · 4xxxx holding register (FC03/06/16)

The first digit is the register type, the rest is the address. 40001 is holding register offset 0 in most devices, sent as function code 03.

PLC timer preset

Seconds to K value for any time base

Formula and notes

K = time (ms) / time base (ms)

Example: 5 s on a 100 ms timer is K50. Siemens S7 TON timers take a time value directly (e.g. T#5S).

Cable voltage drop

Single or three-phase, copper or aluminium

Formula and notes

ΔV = 2 × L × I × ρ / A (single-phase) ΔV = √3 × L × I × ρ / A (three-phase) ρ: Cu 0.0175, Al 0.028 Ω·mm²/m

A quick resistive estimate at 20 °C. Many installations aim for under 3–5% drop; always check your local wiring regulations and the cable maker's tables.

Motor full-load current

kW, voltage, PF and efficiency to amps

Formula and notes

I = P × 1000 / (√3 × V × PF × η)

An estimate for three-phase induction motors. Use the nameplate current for overload and VFD sizing when you have it.

LED series resistor

For Arduino, ESP32 and indicator circuits

Formula and notes

R = (Vs − Vf) / I

Typical forward voltage: red 1.8–2.2 V, green/blue/white about 3 V. Pick the next standard resistor value above the result.

NPN / PNP sensor wiring simulator

See which sensor works with which PLC input, and why

Formula and notes

PNP → sinking input (COM = 0 V) NPN → sourcing input (COM = +24 V)

Current must flow in a loop: from +24 V, through the sensor and the PLC input LED, back to 0 V. A PNP sensor connects its output to +24 V, so the input must return to 0 V. An NPN sensor connects its output to 0 V, so the input must be fed from +24 V. Wire colours follow IEC 60947-5-2: brown +V, blue 0 V, black output.

Simulator

Ladder Lab

Pick a circuit, press the inputs and watch power flow through each rung. The instruction list underneath is the same program in text form.

Start / stop with seal-in RUN
Program listing (IL)
LD   X0
OR   Y0
ANI  X1
OUT  Y0