Overview
A 4-20 mA current loop is the dominant analogue signalling method for motor current monitoring, transducer feedback, and process variable transport across industrial panels. This reference documents the exact procedure for displaying a 0-50 A primary current from a Hall-effect transducer through a Unitronics A-1019 RS-485 / Modbus analogue input module on a Siemens SIMATIC TP1500 Comfort HMI using TIA Portal linear scaling.
The complete signal path is built from four blocks:
- Primary conductor carrying 0-50 A → Hall-effect CT produces 4-20 mA proportional output.
- 4-20 mA loop → A-1019 analogue input channel → Modbus holding register (raw integer 40-200 in 0.1 mA units).
- RS-485 / Modbus RTU link → TP1500 Comfort HMI tag receives the raw register value.
- Linear scaling on the HMI tag → engineering value in amperes shown on an I/O field.
Successful commissioning requires (a) configuring the A-1019 for 4-20 mA input mode (not 0-20 mA), (b) wiring RS-485 A/B with correct polarity and 120 Ω termination, (c) entering the correct linear scaling range into the HMI tag (PLC 40-200, HMI 0-50.0 or 0-500 depending on display format), and (d) selecting a Real-typed HMI tag so decimal precision survives the locale decimal-separator conversion.
System Architecture
The signal chain implemented as a logical block diagram with associated hardware references:
Compatible Hall-effect transducers for a 0-50 A / 4-20 mA primary:
| Family | Example Part Number | Primary | Loop Output | Bandwidth |
|---|---|---|---|---|
| LEM | HAIS 50-P | 0-50 A | 4-20 mA | DC to 50 kHz |
| Honeywell | CSLA2CD | 0-55 A | 4-20 mA (custom shunt) | DC to 25 kHz |
| CR Magnetics | CR5210-50 | 0-50 A | 4-20 mA | DC to 3 kHz |
| Allegro Microsystems | ACS758-50 (ratiometric) | 0-50 A | 5 V / Vcc (with conversion) | DC to 120 kHz |
The transducer is connected to the A-1019 input with shielded twisted-pair cable; the shield is bonded at one end only (the panel ground bar) to avoid ground loops that would inject 50/60 Hz common-mode noise into the loop.
Linear Scaling Mathematics
WinCC Comfort implements linear scaling with the standard two-point linear interpolation formula:
HMI_Value = (PLC_Raw − PLC_Start) × (HMI_End − HMI_Start) / (PLC_End − PLC_Start) + HMI_StartThe user-confirmed working parameters for this case are:
| Parameter | Value | Meaning |
|---|---|---|
| PLC_Start | 40 | Raw integer when loop current = 4.0 mA (= 0 A primary) |
| PLC_End | 200 | Raw integer when loop current = 20.0 mA (= 50 A primary) |
| HMI_Start | 0 | Engineering value at PLC_Start |
| HMI_End | 500 (or 50) | Engineering value at PLC_End — formatted as 50.0 A with display pattern 999.0
|
The slope of the conversion is therefore:
slope = (HMI_End − HMI_Start) / (PLC_End − PLC_Start) = 500 / 160 = 3.125 engineering-units / raw-countBecause the A-1019 reports the loop current in 0.1 mA increments (1 raw count = 0.1 mA), each raw count maps to:
0.1 mA × (50 A / 16 mA) = 0.3125 A / LSBThe user's original observation that "0.1 mA = 0.3125 A" matches the 0-50 A / 4-20 mA transducer transfer (50 / 16 = 3.125 A per mA = 0.3125 A per 0.1 mA) exactly.
Two equally valid display configurations:
-
HMI_End = 50 with format
0.0: ideal when the Real value is consumed by downstream scripts; arithmetic in the script operates on 50.0 directly. -
HMI_End = 500 with format
999.0: ideal when the Real value must remain integer for downstream arithmetic and the scaling ratio (3.125) must not be approximated by a non-integer HMI_End.
Both render as "50.0 A" on screen; choose based on what downstream code expects.
Configuring the A-1019 RS-485 Module
The A-1019 is a Uni-I/O expansion module accepting up to four analogue channels and converting each input to a Modbus holding register over RS-485. Configuration requires UniLogic (the Unitronics programming suite) or side-mounted DIP switches on legacy modules.
- Set per-channel input mode to 4-20 mA (not 0-20 mA, not 0-10 V).
- Assign a unique Modbus node address — default 1; verify against the device list.
- Match baud rate, parity, and stop bits with the TP1500 Comfort port configuration (typical A-1019 defaults: 19200 baud, 8N1 — verify against the module datasheet).
- Map the channel to a holding register. The A-1019 reports scaled loop current in 0.1 mA units in holding registers 0-3 (channel 1 = register 0, channel 2 = register 1, channel 3 = register 2, channel 4 = register 3).
- Connect RS-485 A → TP1500 X1 port T/R pin (typically pin 4, B), and B → T/R- (typically pin 5, A). Verify shield terminator on X1 pin 8.
- Apply 120 Ω termination at each end of the RS-485 segment if cable length exceeds 10 m at the highest baud rate used (per EIA-485 / TIA-485-A guidance).
Step-by-Step: Configuring Linear Scaling on the TP1500 Comfort
Configure the HMI tag that points at the A-1019 register in TIA Portal (WinCC Comfort / Advanced V16 or later):
- Open the HMI project; navigate to "Project tree → HMI Tags → default tag table".
- Add a new tag (e.g.
I_MotorCurrent_A). - Set the "Connection" property to the Modbus RTU master connection that targets the A-1019 slave.
- Set the "PLC tag" address to the relevant holding register — for register 0 use display address
40001(Modbus 1-based address representation on the HMI) orHoldReg[0]. - Set Data type to Real (mandatory for one-decimal display — see next section).
- Open "Properties → Linear Scaling" in the tag Properties inspector.
- Enable Linear Scaling. Enter:
- PLC range — Start: 40, End: 200
- HMI range — Start: 0, End: 500
- Bind an I/O field to the tag. Open the I/O field Properties dialog and set "Display format" →
999.0(one decimal, no thousands separator).
The 500 endpoint with a 999.0 format displays the engineer's intended 50.0 A. The internal scaled value remains numerically integer (500), which is robust against floating-point rounding error at the endpoint. An alternative uses HMI_End = 50 and display format 0.0; both approaches are equivalent at the screen.
Data Types, Decimal Points, and Regional Formatting
Decimal values are silently truncated to integer if the tag data type is Int or Word. The TP1500 Comfort supports Real for scaled values; the raw register read remains integer and is converted to Real internally for the linear scaling math.
-
Decimal separator: The runtime regional setting on the Comfort Panel follows the project language locale. Western European projects (English UK, German, French) default to comma (
,), so an operator expecting a period will read "50,0" on screen — this is correct, not a configuration bug. Switch the runtime language or modify the project locale to match operator expectation. -
Float precision: The tag is single-precision IEEE-754 Real. 500.0 is exactly representable; cumulative arithmetic should round via the display format
999.0. - Clamping at endpoints: If Raw_value < 40 the displayed value may go negative; enable the tag's "Lower limit = 0" property if a hard floor of 0 at zero loop current is required.
- Acquisition cycle: Default tag acquisition cycle is 1 s; tighten to 250-500 ms for fast-changing motor current monitoring if the transducer bandwidth permits.
Modbus RTU Configuration on the TP1500 Comfort
The Siemens TP1500 Comfort (article number 6AV2 124-1QC02-0AX0 and successors) supports Modbus RTU master on the COM1 / X1 port (RS-422/485). Configure the connection in TIA Portal as follows:
| Field | Setting |
|---|---|
| Driver | Modbus RTU (master) |
| Port | COM1 / X1 (RS-485 2-wire) |
| Baud rate | 19200 (verify against A-1019) |
| Parity | None |
| Data bits | 8 |
| Stop bits | 1 |
| Slave address | 1 (or as set on the A-1019) |
| Function code | 03 (Read Holding Registers) |
| Cycle / acquisition | 500 ms |
The HMI displays Modbus addresses in 1-based form; the underlying protocol uses 0-based registers. Offset conversion: displayed_address − 1 = protocol_register_number. Reference the TIA Portal online help topic "Modbus - Comfort Panel" and the SIMATIC HMI TP1500 Comfort device manual for the connector pin-out (DB9 / D-sub X1).
Verification and Calibration Procedure
After commissioning, run a four-point verification to confirm the signal chain:
- Loop-current injection test: Disconnect the transducer; inject a precision mA source at 4.000, 8.000, 12.000, 16.000, and 20.000 mA. The HMI display should read 0.0, 12.5, 25.0, 37.5, 50.0 A within transducer accuracy.
- Live-zero detection: Open the loop (0 mA). The HMI must not display 0; instead it should reflect a diagnostic under-range condition. If 0 is shown, the A-1019 is configured for 0-20 mA rather than 4-20 mA.
- Dynamic step response: Drive 12.000 mA; verify display = 25.0 ± 0.1 A. A discrepancy above 0.1 A indicates a format or scaling parameter error rather than a transducer error.
- Field-load cross-check: Run a known AC load (resistive load bank) at a measured current (true-RMS clamp meter) and verify the HMI display matches within transducer accuracy (typically ±1 % to ±2 % FS at 25 °C ambient).
Document the four-point test results and the date of the calibration in the panel maintenance log; re-test every 12 months or after any major electrical event on the motor circuit.
Hall-Effect Transducers in DC Drives and AC Motors
A frequent commissioning question is whether a Hall-effect transducer measures AC, DC, or both. The answer depends on transducer class:
- Open-loop Hall-effect: Responds to instantaneous magnetic flux from the primary conductor; suitable for AC and DC measurement. Output is either instantaneous waveform or true-RMS depending on the internal signal conditioner.
- Closed-loop (compensated) Hall-effect: Uses a secondary compensation winding driven by the primary current to null the core flux; typically ±0.5 % FS accuracy or better; suitable for AC and DC.
- Average-rectified Hall-effect: Cheaper devices rectify the secondary signal internally. They read AC correctly in true-RMS form only if the conditioner computes RMS. A "True RMS" specification and a crest-factor tolerance (typically CF ≥ 3 for variable-frequency drives) on the datasheet indicates the device can be trusted on PWM-DC and variable-frequency AC loads.
- DC-only Hall-effect: Rare; the conditioner outputs the magnetic-flux mean and is designed for slow DC only. Avoid for variable-frequency drive output.
Common causes of discrepancy between a clamp meter (RMS, AC mode) and a Hall-effect transducer while testing a DC drive:
- The transducer datasheet specifies average-rectified output; the clamp meter reads RMS, so for PWM-modulated DC the two meters disagree by the form factor (≈ 1.11 for sinusoidal, higher for PWM with high crest factor).
- The transducer outputs a peak-detected signal but the drive is switching PWM at the carrier frequency (typically 2-16 kHz); either add an RC filter on the analogue output or switch to a true-RMS transducer with crest-factor rating above the drive crest factor.
- The transducer is wired with reversed polarity through the cable gland; Hall-effect output goes negative on positive current.
- The clamp meter is set to DC mode and the loop is reading rectified average; switch clamp meter to AC true-RMS.
For AC motor monitoring on a variable-frequency drive output, select a true-RMS Hall-effect transducer with bandwidth ≥ 6× the fundamental frequency (covers up to the 50th harmonic of a 50/60 Hz line per IEEE 519 harmonic recommendations).
Cable, Shielding and Grounding Best Practices
Apply the following installation rules to ensure the 4-20 mA loop and the RS-485 bus behave predictably in electrically hostile industrial environments:
- Twisted-pair throughout: The 4-20 mA return and the 24 V loop supply must travel on a twisted pair. Untwisted loops pick up 50/60 Hz mains hum, which manifests as ±0.5 A jitter on the HMI display.
- Single-point shield bonding: Bond the shield at one end only — typically the panel ground bar at the A-1019 entry — to avoid ground loops.
- 24 V loop supply budget: Confirm that the loop voltage supply (typically 24 VDC) drops no more than 11 V at 20 mA across the cable (cable loop resistance ≤ 11 V / 20 mA = 550 Ω). For runs over 200 m of 24 AWG, use a 30 VDC loop supply.
- Separation from VFD cables: Route the 4-20 mA cable and the RS-485 cable at least 200 mm from variable-frequency drive output cables to avoid capacitive coupling of the carrier-frequency voltage (typically 2-16 kHz PWM).
- RS-485 topology: Bus topology only; no star or stubs. Maximum stub length per EIA-485 is 0.3 m.
- ESD protection: For outdoor cabinet installations, add an 8 kV ESD TVS diode at the A-1019 input and at the TP1500 port.
- Loop voltage drop calculation: For a 200 m run of 18 AWG (resistance ≈ 21 Ω / km loop, so 8.4 Ω total at 200 m), voltage drop at 20 mA = 0.17 V — well within the 11 V budget.
Troubleshooting Matrix
| Symptom | Likely Cause | Diagnostic | Corrective Action |
|---|---|---|---|
| HMI shows 0.0 A at all times, raw register = 40 constant | A-1019 set to 0-20 mA mode (no live-zero) | Inject mA source; observe raw = 0 at 0 mA | Switch channel to 4-20 mA mode |
| HMI shows negative values below 4 mA | PLC_Start set to 0 instead of 40 | Read raw tag; inspect PLC_Start value in scaling dialog | Set PLC_Start = 40, PLC_End = 200 |
| HMI shows 50.0 at all live loop values | PLC_Start = PLC_End (zero divisor) | Inspect scaling dialog | Set distinct PLC_Start/End values |
| HMI shows "50" not "50.0" | Tag is Int type, display format is decimal-less integer | Inspect tag properties | Set tag data type to Real, format = 999.0 |
| HMI value flickers ±0.5 A at steady current | ADC LSB quantisation on 0.3125 A resolution | Use scope on raw tag | Acceptable (within ±1 LSB); smooth with 500 ms time constant |
| Display reads "50,0" instead of "50.0" | Runtime locale uses comma separator | Inspect runtime language settings | Change project locale or accept operator training |
| Display clamps at 0 below 4 mA | Tag lower limit = 0 enabled | Inspect tag limits | Disable limit or set lower limit = -10 |
| Modbus timeout (red status bar on HMI) | Baud / parity / address mismatch between A-1019 and TP1500 | Check port diagnostic | Match all RS-485 parameters on both sides |
| Clamp meter reads ≠ HMI display | Form-factor / RMS mismatch on distorted waveform | Inspect transducer datasheet | Replace with true-RMS transducer with adequate bandwidth |
| HMI display frozen at last value | RS-485 termination missing or polarity reversed | Swap A/B wires; check 120 Ω | Install termination, verify polarity |
| HMI display = 32767 (overflow) | Modbus address not mapped; HMI reads invalid register | Inspect register map | Re-map tag address to channel register |
| Initial display shows arbitrary value then settles | Pre-loop warm-up of transducer | Power-on behaviour | Add 1-2 s power-on delay before acquiring display |
| HMI value drifts when other loads start | Common-mode noise on unshielded loop cable | Inspect shield, check grounding | Replace with shielded twisted pair; bond shield at one end |
Frequently Asked Questions
Why must the HMI tag data type be Real instead of Int for motor current?
An Int tag truncates decimals, causing the HMI to display "50" instead of "50.0" and losing one-decimal precision needed for live-zero diagnostic checks. Set the tag data type to Real and apply display format 999.0 on the I/O field.
Why set PLC_Start to 40 instead of 4 in the scaling dialog?
The A-1019 reports the loop current multiplied by 10 (0.1 mA resolution). At 4.000 mA the integer register holds 40, not 4. Using PLC_Start = 4 would compute (raw − 4) × 25 / 16, which gives an offset of about 50 A at zero loop current. PLC_Start must equal 40 and PLC_End must equal 200.
Does a Hall-effect current transducer measure AC, DC, or both?
Most open-loop Hall-effect transducers measure AC and DC because they respond to instantaneous magnetic flux. The key factor is whether the internal signal conditioner outputs true-RMS or average-rectified: true-RMS devices read accurately on PWM DC drive output and variable-frequency AC drive output, while average-rectified devices may read 10-15 % low on distorted waveforms. Check the datasheet for "True RMS" and crest-factor rating.
How do I change the Comfort Panel from comma to period as decimal separator?
In TIA Portal, open Languages & Resources → Project languages, select the runtime language, and set Decimal format to "1,234.5" (period as the decimal mark) for English (USA). Redeploy the runtime image to the TP1500 Comfort to apply the change.
What is the correct Modbus function code to read the A-1019 current register?
Use Function Code 03 (Read Holding Registers). The A-1019 stores channel values in holding registers 0-3 (one per analogue input, 0.1 mA resolution). In TIA Portal Modbus master, set the start address to 40001 (register 0, 1-based display) and length to 1.
Why does the HMI show a comma "50,0" while I expect "50.0"?
The runtime regional setting on the Comfort Panel follows the project language locale. Western European projects default to comma as the decimal separator. Either change the runtime language to English (USA) under Languages & Resources in TIA Portal or train the operator to interpret the comma format — both are valid number representations.