LOGO! 12/24RCE Modbus Float to 0-10V / 4-20mA Conversion Guide
The Siemens LOGO! 12/24RCE (order number 6ED1052-1MD08-0BA2) on LOGO! 8.4 firmware supports Modbus TCP and can read 32-bit IEEE-754 floating-point registers from a remote device. Driving a 0-10 V or 4-20 mA analog output from that float is therefore possible, but only with an external AM2 AQ analog output module (6ED1055-1MM00-0BA2) because the base LOGO! 12/24RCE has no onboard analog outputs. The principal engineering constraint is that LOGO! math blocks operate on fixed-point (integer) values, so the float must be scaled to an integer before the gain/offset math is applied to the analog output word.
This reference walks through hardware identification, the Modbus map, the float-to-integer scaling math, AM2 AQ configuration, and verification steps. The target audience is a sourcing/commissioning engineer building a lightweight Modbus-to-analog bridge feeding a data logger.
6ED1052-1MD08-0BA2 (LOGO! 8.4 generation, Ethernet, relay outputs) before sourcing. Earlier 0BA6/0BA7/0BA8 generations do not support Modbus.1. Hardware Identification and Order Numbers
The full Siemens order number encodes the generation, power supply, output type, and firmware. Match the order number exactly when sourcing.
| Component | Order Number | Description |
|---|---|---|
| LOGO! 12/24RCE (base) | 6ED1052-1MD08-0BA2 |
LOGO! 8.4, 12/24 VDC supply, relay outputs, Ethernet, Modbus TCP, no onboard analog outputs |
| AM2 AQ analog output module | 6ED1055-1MM00-0BA2 |
2 analog outputs, software-selectable 0-10 V or 0/4-20 mA, 12-bit |
| AM2 RTD analog input | 6ED1055-1MD00-0BA2 |
2 PT100/PT1000 inputs (optional, for local loop-back) |
| LOGO! Soft Comfort V8.4 | 6ED1058-0BA08-0YA1 |
Programming software (DVD) for LOGO! 8.4 |
| LOGO! Power 24 V | 6EP3330-6SB00-0AY0 |
2.5 A DIN-rail supply for the LOGO! + AM2 AQ stack |
The -0BA2 suffix is the LOGO! 8.4 hardware generation. The -1MD08- segment is the 12/24 RCE variant (R = relay, C = clock/real-time, E = Ethernet). Only the 0BA2 generation supports the Modbus client/server functions in firmware 8.4.x; earlier 0BA8 (LOGO! 8.0/8.1) units require a firmware update via LOGO! Soft Comfort to access full Modbus function code 03/04/06/16 support.
Reference: Siemens LOGO! 8 product family page.
2. Prerequisites and System Architecture
Build the system topology before any programming. The signal flow is unidirectional in this application: a Modbus master (or third-party sensor/inverter) publishes a 32-bit float register, the LOGO! 12/24RCE reads it via Modbus TCP, scales it, and the AM2 AQ converts the resulting integer to either voltage or current.
2.1 Required Components
- One LOGO! 12/24RCE (
6ED1052-1MD08-0BA2), powered from 12 VDC or 24 VDC. - One AM2 AQ analog output module, mounted to the right of the LOGO! base and connected via the internal bus.
- 12/24 VDC supply sized for the LOGO! (typ. 1.5 W at 24 V) plus AM2 AQ (typ. 0.6 W at 24 V). The LOGO! Power 24 V / 2.5 A is a typical fit.
- Ethernet cable (Cat 5e or better) from the LOGO! RJ45 to the upstream Modbus TCP device (typically a sensor, energy meter, or VFD).
- Shielded twisted pair for the analog output run to the data logger. Maximum recommended run is 30 m for voltage output and 300 m for current output.
- LOGO! Soft Comfort V8.4 installed on a Windows PC for offline program development and online diagnostic.
2.2 IP Addressing Plan
Assign static addresses. The LOGO! 8.4 ships DHCP-enabled; disable DHCP for a deterministic bridge.
| Device | IP Address | Subnet Mask | Default Gateway |
|---|---|---|---|
| LOGO! 12/24RCE | 192.168.0.10 | 255.255.255.0 | 0.0.0.0 |
| Upstream Modbus TCP device | 192.168.0.20 | 255.255.255.0 | 192.168.0.1 |
| Engineering PC (LOGO! Soft Comfort) | 192.168.0.100 | 255.255.255.0 | 192.168.0.1 |
Configure the LOGO! IP via LOGO! Soft Comfort > Tools > Ethernet Connections or via the LOGO! onboard display under Network > IP Address.
3. Modbus Communication Setup on LOGO! 8.4
LOGO! 8.4 supports Modbus TCP as a client (master) on the Ethernet port. The client function block is Network Analog Input (NAI) for 16-bit words and the same block family extended to 32-bit for floating-point data.
3.1 Enable Modbus in LOGO! Soft Comfort
- Open LOGO! Soft Comfort V8.4 and create a new project.
- Select File > Properties > Project Properties and choose LOGO! 0BA2 (8.4) as the target hardware.
- From the toolbox, drag Network Analog Input onto the diagram (block group: Network).
- Double-click the block and configure:
- Server IP: 192.168.0.20
- Port: 502 (standard Modbus TCP)
- Function Code: 03 (Holding Register) or 04 (Input Register)
- Start Address: the holding register that contains the low word of the float (e.g., 40001)
- Data Type: 32-Bit Float (Float32)
- Read Trigger: any Boolean edge — typically a high-frequency clock or the AM2 AQ ready flag
The Network Analog Input block can also be configured through the LOGO! Web Editor by navigating to the device IP, logging in, and opening Modbus Connections. Both tools produce the same runtime behavior.
3.2 Modbus Register Map Example
The upstream device (a generic sensor or energy meter) exposes the engineering value as a 32-bit IEEE-754 float across two consecutive 16-bit Modbus registers.
| Modbus Address | Type | Content | Range |
|---|---|---|---|
| 40001 (low word) | Holding Reg. (R/W) | Float32 low word | 0x0000 – 0xFFFF |
| 40002 (high word) | Holding Reg. (R/W) | Float32 high word | 0x0000 – 0xFFFF |
| 40003 | Holding Reg. (R/W) | Scaling slope (int16 ×100) | –32768 – 32767 |
| 40004 | Holding Reg. (R/W) | Scaling offset (int16 ×10) | –32768 – 32767 |
With function code 03 and start address 40001, the LOGO! reads two 16-bit words in a single transaction and reassembles them into an IEEE-754 single-precision float. Byte order is configurable as Big Endian (ABCD), Byte Swap (BADC), Word Swap (CDAB), or Little Endian (DCBA). Confirm byte order from the upstream device manual before commissioning; mismatched byte order is the single most common cause of a stuck output.
4. The Floating-Point to Fixed-Point Conversion Challenge
LOGO! math blocks (Analog Math, gain/offset, addition, subtraction, multiplication) all operate on integer values with an implied decimal shift. The engine does not implement single-precision float arithmetic. This is documented in the LOGO! 8.4 system manual: analog values are stored in a 16-bit signed integer range of –32768 … +32767 with the decimal point defined implicitly per block.
When the Network Analog Input block returns a 32-bit float, the value is read correctly and shown on the LOGO! display, but it cannot be passed directly to a math block. Two engineering approaches solve this.
4.1 Preferred Approach: Request Scaled Integer from the Upstream Device
Most modern sensors, VFDs, and energy meters can publish a pre-scaled integer alongside (or instead of) the float. For example, a flow meter might expose:
- 40005: Flow rate scaled as integer in 0.01 m³/h units (e.g., 12345 = 123.45 m³/h)
This integer is read with a 16-bit Network Analog Input block, scaled by ÷100, and the result drives the AM2 AQ output. No float math is required. This is the recommended path for a "lightweight PLC" implementation.
4.2 Float-to-Integer Workaround Using a Remote Integer Map
If the upstream device only publishes float data, ask the device vendor to add a scaled integer mirror register. For Siemens SINAMICS V20/G120 drives, parameter r0021 (output frequency in Hz) is exposed as float; the parameter P443.0 connector at the drive can be scaled to integer in 0.01 Hz units and written to a holding register.
For third-party meters that cannot be reconfigured, use a Modbus gateway (e.g., a Siemens SIMATIC IOT2050 or a Phoenix Contact EPC) to read the float and re-publish a scaled integer to the LOGO!.
4.3 Why Native Float Math Is Not Supported
LOGO! math blocks use the 16-bit signed integer format with a configurable decimal shift. The implicit decimal is set per block (typically 0, 1, 2, or 3 decimal places), and arithmetic is performed as fixed-point. The Analog Comparator and Analog Threshold Trigger blocks compare integer values against threshold constants. The runtime does not contain a soft-float library because the LOGO! 8.4 target processor (an ARM Cortex-M class SoC) executes the LOGO! Soft Comfort-compiled program directly without an FPU.
5. Configuring the AM2 AQ Analog Output Module
The AM2 AQ has two output channels, each software-selectable as 0-10 V or 0/4-20 mA. Resolution is 12 bits (4096 steps) mapped onto the LOGO! integer range. Configuration is done from the LOGO! device display or via LOGO! Web Editor under I/O > Analog Outputs > AQ1/AQ2 Type.
5.1 AM2 AQ Output Mapping
| Integer Output Value | 0-10 V Mode | 0-20 mA Mode | 4-20 mA Mode |
|---|---|---|---|
| 0 | 0.000 V | 0.000 mA | 4.000 mA |
| 1000 | 2.500 V | 5.000 mA | 8.000 mA |
| 4000 | 10.000 V | 20.000 mA | 20.000 mA |
| Max (32767) | 10.000 V (clamped) | 20.000 mA (clamped) | 20.000 mA (clamped) |
Note: the integer value 4000 maps to full-scale because the AM2 AQ uses a normalized range of 0-4000 integer counts = full-scale output. The LOGO! Soft Comfort block exposes this as AQ1 on the block connector list.
5.2 Selecting Voltage or Current per Channel
Each AM2 AQ channel has a single hardware jumper (inside the module) plus a software setting. The software setting alone does not change the output; the jumper must be set. With the module powered down, open the housing, move the jumper from V to I on the channel to be used as current, then re-install. Power up and the software setting takes effect.
6. Scaling Formulas and Parameter Mapping
The general scaling equation for a 0-10 V or 4-20 mA output driven by a 16-bit signed integer engineering value is:
AQ_out = ((E_in – E_min) × 4000) / (E_max – E_min)
where:
-
AQ_out= integer value written to AM2 AQ (0 to 4000, full-scale) -
E_in= engineering input value (integer from Modbus) -
E_min= engineering value that should produce 0 V / 4 mA / 0 mA -
E_max= engineering value that should produce 10 V / 20 mA
Implement this with two Analog Math blocks in series: a subtraction to remove the offset, then a multiplication by a gain constant. The multiplication result is clamped to the AM2 AQ input range.
6.1 Worked Example: 0-500 m³/h Flow Meter to 0-10 V Output
Upstream Modbus register 40005 returns the flow rate scaled in 0.01 m³/h units (0 to 50000 representing 0.00 to 500.00 m³/h). The desired output is 0-10 V on AM2 AQ channel 1.
- Step 1 — Subtract zero (no offset required):
E_in – E_min = E_in – 0 = E_in. Wire the Network Analog Input (NAI) to Subtrahend-A of an Analog Math block, with constant 0 on Subtrahend-B. Block result:X1 = E_in. - Step 2 — Scale to 0-4000 integer: gain
G = 4000 / (50000 – 0) = 0.08. In LOGO! fixed-point, use two decimal places, so write the gain as8with shift = 2 (i.e., 0.08). WireX1into a second Analog Math block, multiply by gain8(shift 2), clamp the result to 0-4000. - Step 3 — Wire the second block output to the
AQ1connector. Set AM2 AQ channel 1 to 0-10 V mode.
For a 4-20 mA output, the engineering range corresponding to 4 mA is the zero of the loop. If the engineering zero is 0 m³/h, you cannot drive 4 mA at exactly zero flow using only gain; instead, set the lower 25% of the output to 0-10 V and rescale with a Analog Amplifier (gain) and Analog Offset (offset) pair:
AQ_out = ((E_in – E_min) × 2500) / (E_max – E_min) + 1000
The +1000 offset shifts the 0-10 V integer to 4 mA at E_min, and 2500/4000 ratio gives 20 mA at E_max. Configure as: subtract E_min, multiply by gain 0.0625 (fixed-point 6, shift 2), add constant 1000, clamp to 0-4000.
7. LOGO! Soft Comfort Programming Example
The following ladder-style block diagram describes the complete program. Blocks are listed in the order they appear in the execution cycle.
[M001] Network Analog Input (NAI1)
Server IP = 192.168.0.20
Port = 502
Function = 03 (Holding Register)
Start Addr = 40005
Data Type = 16-Bit Signed Integer
Read Trigger = Clock C001 (1 Hz)
→ Output = 0..50000 (engineer units, scale 0.01 m³/h)
[B001] Analog Math (Subtraction)
Input A = NAI1 output
Constant B = 0
→ Output = X1 = E_in
[B002] Analog Amplifier (Gain)
Input = X1
Gain = 8 (decimal shift = 2, i.e., 0.08)
Offset = 0
→ Output = X2 = E_in × 0.08 (range 0..4000)
[B003] Analog Watchdog (Clamp)
Input = X2
High Threshold = 4000
Low Threshold = 0
Enable → bool = (B003.Q1) // flag for "output out of range"
[AQ1] → AM2 AQ Channel 1 output, 0-10 V mode
The Analog Watchdog block is not strictly required for the math but is recommended for diagnostics: a flag is set if the upstream Modbus device returns a value outside the expected 0-500 m³/h range, which usually indicates a stuck sensor, a register map error, or a wiring break. The flag can be wired to a digital output for a remote alarm or simply read from the LOGO! Web Editor status page.
8. Verification and Commissioning
Commission in three phases: bench test, loop test, and end-to-end test.
8.1 Bench Test (Logo! on the bench, no field wiring)
- Connect the engineering PC to the LOGO! Ethernet port and run LOGO! Soft Comfort > Online > Test.
- Force the upstream Modbus device (or use a Modbus simulator such as Modbus Tools or a second LOGO! acting as server) to return a known integer, e.g., 25000 for the 0-500 m³/h example.
- Read
AQ1in the LOGO! online monitor. Expected raw value:25000 × 0.08 = 2000. Expected output voltage:2000 / 4000 × 10 V = 5.000 V. - Measure AM2 AQ terminal voltage with a calibrated multimeter. Acceptable tolerance: ±25 mV (12-bit DAC, ±1 LSB at 10 V = 2.4 mV, plus reference drift).
8.2 Loop Test (logo! in panel, no load)
- Force three setpoints: 0% (E_in = 0 → AQ1 = 0), 50% (E_in = 25000 → AQ1 = 2000), 100% (E_in = 50000 → AQ1 = 4000).
- Record LOGO! online value, AM2 AQ terminal voltage, and data logger reading. Tolerances: AM2 AQ ±0.5% of full scale (50 mV at 10 V, 0.08 mA at 20 mA), data logger should match AM2 AQ within its own accuracy spec.
8.3 End-to-End Test (logo! in panel, with load)
- Connect the data logger to AM2 AQ channel 1. Confirm shield grounded at the data logger end only (single-point grounding).
- Step the upstream sensor through 0%, 25%, 50%, 75%, 100% of range and log the data logger reading against a calibrated reference meter.
- Confirm linearity: deviation from ideal straight line should be less than 0.5% of full scale.
9. Limitations and Alternative Platforms
LOGO! 12/24RCE is genuinely "lightweight" — that is both its strength and its constraint. Evaluate the following before committing to the design.
9.1 LOGO! 8.4 Limitations
- No float math. The runtime executes fixed-point integer operations. Float inputs must be mirrored as scaled integers upstream.
- Modbus TCP only on the base. The 12/24RCE has no RS-485 port. If the upstream device is Modbus RTU, an external Ethernet-to-RS-485 gateway is required (e.g., Phoenix Contact EW-485 or Siemens CM PtP).
- Single Modbus client connection. The LOGO! can act as a Modbus client to one server, or as a server, but not as a client to multiple servers. Multi-drop bridging requires a gateway.
- No onboard analog output. Requires the AM2 AQ module; adds 35 mm of DIN-rail width and the cost of an extra module.
- No SD card logging. If the data logger fails, the LOGO! has no local buffer.
9.2 Alternative Platforms
If any of the above are show-stoppers, evaluate:
| Platform | Float Math | Modbus RTU/TCP | Onboard AO | Cost | Notes |
|---|---|---|---|---|---|
| LOGO! 12/24RCE + AM2 AQ | No (fixed-point) | TCP only on base | No | Low | Simplest, but limited to integer Modbus data |
| S7-1200 CPU 1214C DC/DC/DC + SB 1232 AQ | Yes (full IEEE-754) | TCP + RTU (via CM 1241) | Optional SB | Medium | Full SCL/STEP 7 programming; handles float natively |
| S7-200 SMART SR20 + EM AM03 | Yes (limited float) | TCP + RTU | EM AM03 (2 AO) | Medium | Good balance for small systems, Micro/WIN SMART |
| Schneider TM221CE16R + TM3AQ2 | Yes | TCP + RTU | TM3AQ2 | Medium | EcoStruxure programming, similar footprint to LOGO! |
| WAGO PFC100 (750-8101) | Yes (e!COCKPIT IEC 61131-3) | TCP + RTU | Depends on I/O | Higher | Full Codesys 3, handles multi-protocol bridges |
For a pure Modbus-to-analog bridge that must handle 32-bit floats natively, the S7-1200 with a signal board (SB 1232 AQ, 6ES7232-4HA30-0XB0) is the lowest-cost Siemens platform that does not need the float-to-integer workaround. The LOGO! remains the right answer only when the upstream device can publish a pre-scaled integer, or when the application can tolerate a separate float-to-integer gateway.
10. Troubleshooting Matrix
| Symptom | Likely Cause | Diagnostic | Resolution |
|---|---|---|---|
| AM2 AQ output stuck at 0 V / 4 mA | No Modbus response, or invalid start address | LOGO! Web Editor > Modbus status; check for connection timeout flag | Verify IP, port 502 open, function code matches register type, start address is 0-based or 1-based as configured |
| Output at full scale (10 V / 20 mA) | Byte-order mismatch on 32-bit float | Read a known value (e.g., 100.0 = 0x42C80000) and inspect low/high word order | Cycle the byte-order option in the Network Analog Input block: ABCD, BADC, CDAB, DCBA |
| Output value half of expected | Word swap rather than byte swap | Verify the float register is in the expected order in the device manual | Select CDAB or DCBA byte order |
| Output value negative when input is positive | Signed/unsigned mismatch | Inspect raw register value; check if it is above 0x8000 | Switch Network Analog Input data type to Signed Integer if the upstream register is signed |
| AM2 AQ outputs ~10 V regardless of integer | Jumper set to V but software set to I (or vice versa) | Inspect jumper position on AM2 AQ | Move jumper to match software setting |
| Output value jitters > 1% | Modbus polling rate too slow or upstream device updates too fast | LOG! Web Editor > Statistics > Modbus cycle time | Increase polling rate (LOGO! cycle minimum 50 ms); add hysteresis in the math block |
| Data logger shows 4 mA offset at 0 flow | Ground loop between LOGO! and data logger | Measure shield current with clamp meter | Ground shield at data logger only; use isolated AM2 AQ output (not available — use signal isolator) |
11. Field Commissioning Checklist
- Confirm
6ED1052-1MD08-0BA2on the device label matches the BOM. - Confirm firmware version is 8.4.x (shown on the LOGO! display at power-up).
- Verify AM2 AQ jumper position matches software-configured mode (V or I).
- Verify static IP set on the LOGO! and on the upstream Modbus device.
- Ping the LOGO! from the engineering PC:
ping 192.168.0.10. - Read a known register from the upstream device and verify byte order before connecting the math chain.
- Force three calibration points (0%, 50%, 100%) and record AM2 AQ output with a calibrated DMM.
- Connect the data logger, repeat the three-point test, and confirm linearity.
- Document the final program, IP addresses, register map, and scaling constants. Save a backup of the LOGO! Soft Comfort project file to the project archive.
Reference: Siemens Industry Online Support — LOGO! 8 documentation.
FAQ
Can the LOGO! 12/24RCE read a 32-bit IEEE-754 float Modbus register?
Yes, on LOGO! 8.4 firmware (order number 6ED1052-1MD08-0BA2). Configure a Network Analog Input block with function code 03, the correct start address, and the 32-Bit Float data type, then match the byte order (ABCD, BADC, CDAB, or DCBA) to the upstream device manual. The float is read correctly and shown on the LOGO! display.
Does LOGO! perform math on 32-bit floats?
No. LOGO! 8.4 math blocks (Analog Math, Analog Amplifier, Analog Comparator, Analog Threshold Trigger) operate on 16-bit signed integers with an implicit decimal shift. To drive an analog output from a float, request a scaled integer mirror register from the upstream device, or use a Modbus gateway that re-publishes the value as a scaled integer.
Which module adds the 0-10 V or 4-20 mA output to the LOGO! 12/24RCE?
The AM2 AQ analog output module, order number 6ED1055-1MM00-0BA2, mounts to the right of the LOGO! base and provides two software-selectable 0-10 V or 0/4-20 mA outputs at 12-bit resolution. The LOGO! 12/24RCE has no onboard analog outputs.
How do I produce 4-20 mA from a 0-500 m³/h flow signal?
Compute AQ = ((E_in – 0) × 2500 / 50000) + 1000 in fixed-point math blocks, then write the result to AM2 AQ channel 1 set to 4-20 mA mode. The +1000 offset shifts the 0-10 V integer to 4 mA at zero flow, and 2500/4000 ratio gives 20 mA at full scale.
What is the cheapest Siemens PLC that handles 32-bit float Modbus natively?
The S7-1200 CPU 1214C DC/DC/DC with the SB 1232 AQ signal board (6ES7232-4HA30-0XB0) executes full IEEE-754 math in SCL or ladder and ships with Modbus TCP and RS-485 (via CM 1241). The footprint is similar to LOGO! + AM2 AQ but the engineering cost of avoiding the float-to-integer workaround is usually recovered on the first commissioning.
Why is my AM2 AQ output stuck at 0 V or full scale?
Three causes account for 95% of these cases: (1) Modbus connection not established (verify IP, port 502, and that the upstream device responds to function code 03); (2) byte-order mismatch on the float (cycle through ABCD, BADC, CDAB, DCBA); (3) AM2 AQ jumper position not matching the software setting (verify V/I jumper for each active channel).