Replacing Siemens IP246 with FM354: S5 to S7 Migration Guide

David Krause18 min read
Application NoteMotion ControlSiemens
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Replacing Siemens IP246 with FM354: S5 to S7 Migration Guide

The SIMATIC IP246 was a workhorse positioning module for S5-115U/H, S5-135U, and S5-155H systems, used extensively in plastics, packaging, converting, and special-purpose machinery. As S5 systems reach end-of-life and spare parts become scarce, retrofitters must replace IP246 with an S7-compatible module. The SIMATIC FM354 Positioning Module for Servo Drives is the canonical drop-in for single-axis applications. This guide covers hardware selection, encoder wiring (including Heidenhain linear scale conversions), configuration package setup, machine data migration, and STEP 7 setpoint programming.

IP246 to FM354 Migration Overview

The IP246 was offered in several variants tailored to specific industries (plastics, textiles, machine tools), each with proprietary machine data layouts and program structures. There is no automated conversion path: every IP246 application must be re-engineered on the FM354. Treat the migration as a clean re-implementation that re-uses the proven IP246 machine data and M-code (machining program) parameters rather than as a literal code translation.

For multi-axis IP246 configurations (up to two axes), use one FM354 per axis, or step up to a single FM357-2 multi-axis module that controls up to four servo or stepper axes from a single slot. The remainder of this document focuses on a single-axis migration, which is by far the most common retrofit case.

Hardware Comparison: IP246 vs FM354 vs FM357-2

Parameter IP246 (S5) FM354 (S7) FM357-2 (S7)
Backplane S5 (CR/ER) S7-300 S7-300
Axes per module 1 (some variants 2) 1 Up to 4
Motor type Servo / stepper (variant) Servo (analog ±10 V setpoint) Servo or stepper (variant)
Position encoder Incremental 5 V TTL, 24 V Incremental 5 V TTL, SSI Incremental, SSI, absolute
Setpoint output ±10 V analog, step/dir ±10 V analog (drive enable) ±10 V analog or step/dir
Position resolution 0.001 mm (with linear scale) 0.001 mm (configurable) 0.001 mm
M-function outputs 16 (M00–M99) 16 (configurable) 16 per axis
Digital I/O Front connector 8 DI / 8 DO on front connector 8 DI / 8 DO
Programming STEP 5 + IP246 COM STEP 7 + FM353/FM354 Config STEP 7 + FM357 Config
Lifecycle Discontinued Check current catalog Phased out, check current catalog

The FM354 order number 6ES7354-1AH01-0AE0 is the most common servo variant referenced in retrofits. Variants such as 1AH02-0AE0 exist for different encoder combinations. Verify the exact MLFB against the current Siemens catalog and the FM354 manual (PDF, entry 2110628) before ordering.

FM354 vs FM353 – Servo vs Stepper

The FM354 has a sibling, the FM353, for stepper motor positioning. The configuration package covers both, but the FM354 is the correct choice for a servo drive application with a ±10 V speed/position input. Key distinguishing features of the FM354:

  • Analog ±10 V setpoint to the drive (one D/A channel, 12-bit resolution).
  • Position-loop closed in the module, following-error monitoring with configurable window.
  • Drive enable relay contact for the controller-enable chain.
  • No pulse/direction output (unlike FM353), so it cannot drive a stepper indexer directly.

If the IP246 was driving a stepper via pulse/direction, use the FM353 instead of the FM354.

Pre-Migration Assessment Checklist

Before ordering hardware, capture the following from the existing IP246 application:

  1. Number of axes – if more than one, plan two FM354s or one FM357-2.
  2. Motor type – servo with ±10 V interface (FM354) or stepper (FM353).
  3. Encoder type – Heidenhain linear scale with EXE/IBV interface box, native Heidenhain signal, or 24 V incremental proximity.
  4. Travel range and resolution – linear scale pitch, reference mark style (distance-coded or single).
  5. Velocity profile – rapid traverse (Eilgang), roughing (Vorschub), and finishing (Reduzierung) speeds with override ranges.
  6. M-functions – which M-codes trigger machine-side actions (clamp, cool, blow-off, etc.).
  7. Setpoint source – HMI-set, recipe-driven, or calculated by PLC program.
  8. Existing wiring diagram – especially the path from linear scale → Heidenhain IBV box → IP246 front connector.
  9. Following-error and Kv factor – capture the original loop gain to seed the FM354 tuning.
  10. Limit switch and home position – hardware limit locations and reference-mark distance.

Hardware Installation and Wiring Conversion

Mechanical installation

The FM354 occupies a single slot in the S7-300 rail. Mount it in the same rack as the CPU, observing the standard S7-300 slot rules (digital and analog I/O are preferred in slots 4–11; FM modules can be in any slot but should be close to the CPU to minimize bus scan time). A 40-pin front connector (6ES7392-1AM00-0AA0) is required for power, encoder, drive interface, and digital I/O.

Drive interface

The FM354 provides:

  • ±10 V analog setpoint output (channels A1+/A1-) to the servo drive speed/position input.
  • Drive enable output (relay contact, terminals 24 and 25) wired to the drive's controller-enable input.
  • Ready input (terminal 22) to confirm the drive has reached the operating state.
  • External stop / limit switch inputs (terminals 16–20) for hardware-side safety.

If the original IP246 drove a SIMODRIVE 611 or similar drive, the ±10 V wires map 1:1. The drive enable logic is normally-open on both modules, but verify the IP246 wiring diagram for any interposing relay logic.

Encoder wiring – Heidenhain linear scale

This is the most common retrofit problem. An IP246 retrofitted with a Heidenhain LS, LB, or LIDA linear scale typically has the following signal chain:

Heidenhain Linear scale (LS/LB/LIDA) Heidenhain IBV TTL output (-B / -C) FM354 X2 encoder (5 V TTL) 1 Vpp / 11 µApp A, A*, B, B*, R, R* Replace any 24 V IBV with a TTL-output model before connecting to FM354.

The FM354 accepts 5 V TTL (RS-422) incremental signals on terminals 33–40. There are two valid migration paths:

Path A – Keep the Heidenhain IBV box and re-wire the 24 V side to 5 V TTL.
Order a Heidenhain IBV 100, IBV 600, or IBV 660 that supports TTL output (model suffix -B or -C). Rewire the 24 V input to the 5 V TTL output of the new IBV and route A, A*, B, B*, R, R* to the FM354 front connector.

Path B – Eliminate the IBV box and connect the scale head directly.
Some Heidenhain scales (e.g., LIDA 4xx with integrated subdividing electronics) output 1 Vpp or TTL directly. If the original IBV is 1 Vpp → 24 V, replace it with a Heidenhain EIB 741 or IBV 660B that outputs TTL/RS-422 and route the differential pairs to the FM354.

FM354 front connector X2 pin assignment (encoder)

Terminal Signal Description
33 A Track A, non-inverted
34 A* Track A, inverted
35 B Track B, non-inverted
36 B* Track B, inverted
37 R Reference mark, non-inverted
38 R* Reference mark, inverted
39, 40 5 V / 0 V Encoder power supply (5 V, max 300 mA)

For 24 V incremental encoders, the FM354 has no 24 V input. Use a Heidenhain IBV converter or a third-party signal converter (e.g., Kübler, Hengstler, Balluff) to translate 24 V push-pull to 5 V differential. Configuring the FM354 as 24 V input is not supported.

Reference mark handling

If the linear scale uses a distance-coded reference mark (Heidenhain option 01), enable "Distance-coded reference marks" in the FM354 configuration. The homing travel can be set in millimeters and the FM354 will evaluate the reference-mark spacing automatically. For single reference marks, set the homing approach direction and travel limits explicitly.

Configuration Package Installation (FM353/FM354 V4.03)

The FM354 is configured using the FM353/FM354 Configuration Package. Version 4.03 is the documented release that supports the FM354 hardware; it runs on Windows 95 / NT / 2000 / XP under STEP 7 V5.x. For STEP 7 V5.5 SP2 and later, the package is included on the STEP 7 setup disc. Download and installation details are in the Siemens support entry 12559629.

Installation steps:

  1. Insert the Configuration Package CD or run the downloaded setup.
  2. Launch SETUP.EXE from the package root.
  3. Select "FM354 Servo" during component selection.
  4. Restart SIMATIC Manager.
  5. Open the S7 project, right-click the FM354 in HW Config, and select "Object Properties → Configuration".

The configuration tool stores all machine data in a .dat file and the machining programs in .txt files inside the S7 project's program directory. The data is downloaded to the FM354 on every CPU stop→run transition or via the "Download to Target" button.

Migrating Machine Data and Machining Programs

There is no automated IP246 → FM354 translator. The recommended approach is:

  1. Export the IP246 machine data to a printout or text file. Identify each axis parameter: travel range, max velocity, acceleration, jerk limiting, encoder resolution, reference-mark handling, following-error window, position-loop gain (Kv factor), and M-function assignments.
  2. Build a new FM354 configuration with the same mechanical values. Key parameters to translate:
IP246 parameter FM354 equivalent Notes
EILGANG (rapid) MD 20: Rapid traverse velocity E.g., 10 000 mm/min
VORSCHUB (feed) MD 21: Approach velocity mm/min
REDUZIERUNG (finish) MD 22: Creep velocity mm/min
ENDSCHALTER + / − MD 28 / MD 29: Positive/negative SW limit mm, machine coordinates
REFERENZFAHRT (homing) MD 30–34: Homing mode Direction, travel, decel
ENCODER (linear) MD 12: Encoder type 0 = incremental 5 V TTL
SIGNAL MULTIPLICATION MD 14: Interpolation factor 1, 2, 4 (TTL)
FOLLOWING ERROR MD 50: Following-error window mm
LOOP GAIN (Kv) MD 51: Position-loop gain 1/s
M0–M15 assignments MD 60–75: M-function numbers Decimal code
  1. Migrate machining programs (M-codes) line by line. The IP246 M-code syntax was:
    G01 X100.000 F2000 M07
    The FM354 uses the same text-based format in its .txt program files:
    G01 X100.000 F2000 M07
    The function set is similar (G00, G01, G02, G03, G04, G90, G91, M00–M99) but with FM354 extensions: G30 (homing), G88 (MDI), G98/G99 (program select). Confirm each G-code against the FM354 manual (PDF, entry 2110628) before relying on a 1:1 copy.
  2. Write the STEP 7 program that:
    • Reads the program number from the HMI.
    • Issues the START command to the FM354.
    • Polls for READY.
    • Handles M-function handshakes via the MFI (M-function interrupt).

Position Setpoint Interface in STEP 7

The FM354 exchanges data with the CPU through two data blocks: one for setpoints (control data) and one for actual values / status. The DB numbers are configurable in HW Config under "Object Properties → Basic Parameters". The example projects use DB100 for the control interface and DB101 for the status interface, but the actual numbers depend on the project.

Setpoint DB structure (control interface)

Offset Name Type Meaning
0.0 START BOOL 0→1 edge starts a program
1.0 STOP BOOL 0→1 edge stops the axis
2.0 READ_IN_ENABLE BOOL Allow NC block transition
3.0 MDI_BLOCK_CHANGE BOOL Acknowledge MDI block
4.0 MODE_SELECT BYTE 0 = Auto, 1 = MDI, 2 = Jog, 3 = Ref
6.0 PROGRAM_NUMBER INT Selected NC program number
8.0 MDI_POSITION REAL Target position in mm (MDI mode)
12.0 MDI_FEEDRATE REAL Feedrate in mm/min
16.0 OVERRIDE_RAPID INT 0–200 %
18.0 OVERRIDE_FEED INT 0–200 %
20.0 M_FUNCTION_AUX BYTE M-code for the next MDI block

Actual-value DB structure (status interface)

Offset Name Type Meaning
0.0 READY BOOL Axis ready to move
1.0 IN_POSITION BOOL Axis at programmed position
2.0 FOLLOWING_ERROR BOOL Following-error limit exceeded
3.0 HW_LIMIT BOOL Positive/negative limit reached
4.0 REFERENCE_SET BOOL Axis has been homed
5.0 M_FUNCTION_DEC BOOL M-function output pending
6.0 M_FUNCTION_NUMBER BYTE Active M-function code
8.0 ACTUAL_POSITION REAL Current axis position (mm)
12.0 ACTUAL_VELOCITY REAL Current velocity (mm/min)
16.0 FOLLOWING_ERROR_VAL REAL Current following error (mm)
Note: The exact byte layout depends on the FM354 firmware version. Always confirm against the data block definition in HW Config and the FM354 manual entry 2110628.

Example: start a program from STEP 7

// FC 50: Start positioning program
// Input: iProgNo (INT), iMode (BYTE)
// Assumes DB100 is the FM354 control DB

FUNCTION FC 50 : VOID
BEGIN
    // Set mode to Auto
    DB100.DBX 4.0 := 0;          // 0 = Automatic

    // Load program number
    DB100.DBW 6.0 := #iProgNo;   // e.g., 5

    // Optional overrides
    DB100.DBW 16.0 := 100;       // 100 % rapid override
    DB100.DBW 18.0 := 100;       // 100 % feed override

    // Trigger START (rising edge)
    DB100.DBX 0.0 := TRUE;
    // Hold START true until READY rises, then clear
    // (Implement timeout / edge detection in real code)
END_FUNCTION

// FC 51: Wait for IN_POSITION with 30 s timeout
FUNCTION FC 51 : VOID
VAR_TEMP
    tStart : TIME;
END_VAR
BEGIN
    tStart := T#30s;
    WHILE NOT DB101.DBX 1.0 AND (#tStart > T#0ms) DO
        #tStart := #tStart - T#100ms;
        // poll cycle delay
    END_WHILE;
END_FUNCTION

Implementing Rough and Finish Speed via MDI

For the common HMI-driven use case "move down to a target position at rough speed, then finish at reduced speed", use MDI mode (G88) with two consecutive blocks. The PLC sets the position and feedrate, triggers MDI, then waits for the M-function handshake. A 1–2 mm approach offset between the rough and finish blocks is typical, matched to the system inertia and following-error window.

// FC 55: Rough + finish approach
// Input: rTarget  (REAL position in mm),
//        rV_Rough (mm/min),
//        rV_Finish (mm/min)

FUNCTION FC 55 : VOID
VAR_TEMP
    rApproach : REAL;
END_VAR
BEGIN
    rApproach := #rTarget - 2.0;   // 2 mm before target

    // Block 1: rough approach (G88 = MDI, G01 = linear)
    DB100.DBX 4.0 := 1;            // Mode = MDI
    DB100.DBB 20.0 := 0;           // M-code = 0
    DB100.MDI.G_FUNCTION := 1;     // G01
    DB100.MDI.POSITION  := rApproach;
    DB100.MDI.FEEDRATE  := #rV_Rough;
    DB100.DBX 0.0 := TRUE;         // Trigger START

    WHILE NOT DB101.DBX 1.0 DO     // wait for IN_POSITION
        ; // implement timeout / delay
    END_WHILE;

    // Block 2: finish approach at reduced feed
    DB100.MDI.POSITION  := #rTarget;
    DB100.MDI.FEEDRATE  := #rV_Finish;
    DB100.DBX 0.0 := TRUE;

    WHILE NOT DB101.DBX 1.0 DO
        ;
    END_WHILE;
END_FUNCTION

Alternatively, program both moves as separate NC programs (one for rough, one for finish) and call them sequentially from the PLC with a single START edge each. This is cleaner for HMI-side recipe handling because the position and feedrate parameters stay in the configuration files instead of the STEP 7 code.

M-Function Handshake via OB 40

The FM354 raises a process interrupt when an M-function is output. Implement OB 40 in the S7 program to decode the M-code number and trigger the corresponding machine action. A typical pattern is:

// OB 40: Process interrupt handler
// Reads the M-code from the FM354 status DB and dispatches

ORGANIZATION_BLOCK OB 40
BEGIN
    IF DB101.DBX 5.0 THEN        // M_FUNCTION_DEC = TRUE
        CASE DB101.DBB 6.0 OF
            0:  // M00 - program stop
                DB100.DBX 1.0 := TRUE;  // STOP
            7:  // M07 - coolant on
                SET_AUX_OUTPUT("Coolant");
            8:  // M08 - coolant off
                RESET_AUX_OUTPUT("Coolant");
            30: // M30 - program end
                SET_FLAG("CycleEnd");
            ELSE
                ; // ignore
        END_CASE;

        // Acknowledge the M-function
        DB100.DBX 3.0 := TRUE;    // MDI_BLOCK_CHANGE
    END_IF;
END_ORGANIZATION_BLOCK

The M-code number is held in DB101.DBB 6.0 until the PLC acknowledges via DB100.DBX 3.0 (MDI block change). If the M-code is not acknowledged, the FM354 holds program execution.

Commissioning, Diagnostics, and Verification

Step-by-step commissioning

  1. Hardware check – power on the rack, verify the FM354 SF (red) LED is off and the DC 5 V / DC 24 V green LEDs are on.
  2. Homing – in HW Config → Configuration, set the homing parameters and run a homing cycle in Jog mode. Confirm the axis finds the reference mark and the actual position matches machine zero.
  3. Software limits – move to each limit, mark the position in the configuration, and re-download.
  4. Following-error window – start with the FM354 default (e.g., 1.0 mm), tighten after observing normal following errors under load.
  5. NC program test – run each M-code program at 10 % rapid and 10 % feed override first.
  6. M-function handshake – verify each M-code triggers the expected machine action and is acknowledged by the PLC.
  7. HMI setpoint – run an end-to-end test from the HMI: enter target, press START, confirm motion and final position.

LED diagnostics

LED State Meaning
SF (red) Off No fault
SF (red) On Group fault – check diagnostic buffer
5 V (green) On Encoder 5 V supply OK
24 V (green) On Load voltage OK
FR (green) Flashing Module is in CPU STOP / parameterization
FR (green) On CPU in RUN, FM354 ready

Diagnostic buffer

The FM354 writes diagnostic interrupts into the CPU diagnostic buffer. Open it in STEP 7 via "PLC → Diagnostics/Setting → Module Information → Diagnostic Buffer". Typical entries:

  • "Encoder wire break" – check A, A*, B, B* continuity and the IBV TTL output.
  • "Following error exceeded" – mechanical binding, drive gain too low, or acceleration too high.
  • "Hardware limit reached" – axis has driven past the configured SW limit; reset and re-home.
  • "Drive not ready" – enable chain open; check controller-enable and drive status word.
  • "Configuration error" – inconsistent machine data (negative velocity, encoder resolution out of range); run the consistency check in the configuration tool.

Troubleshooting Matrix

Symptom Likely cause Action
Actual position does not change when axis moves Encoder wired inverted (A*–B swapped) or 24 V signals fed into 5 V input Verify pinout, check for twisted-pair, confirm IBV output is TTL
Axis runs away at startup Position polarity reversed or setpoint polarity wrong Set MD 11 "Sign of encoder" or MD 13 "Setpoint sign" accordingly
SF LED on after parameter download Inconsistent machine data (e.g., negative velocity, encoder resolution mismatch) Open configuration, run consistency check, correct error
Axis moves but never reaches position Following-error window too tight or Kv too low Increase Kv (MD 51) to 1.5×–2× of current value, observe following error
M-codes not output to machine MFI bit not serviced, or M-code number not assigned in MD 60–75 Implement OB 40 (process interrupt) handler; check M-decoding
Position drifts over long travels Distance-coded reference-mark option disabled, or signal-multiplication factor wrong Enable distance-coded reference marks; set MD 14 = 4 for high-resolution linear scales
HMI setpoint has no effect Wrong DB number, or PLC program writes to local instance, not DB100 Verify HW Config control-DB number matches the DB the FC writes to
Drive enable output stuck OFF Safe-stop relay not closed; READY input from drive missing Check drive status word and READY wiring
Following error present even at standstill Mechanical preload, drive offset, or encoder slip Check coupling, zero the drive analog input, verify encoder mounting
Homing not completing Reference mark missed (travel too short) or wrong homing direction Increase homing travel; verify direction in MD 30–34

Safety Considerations During Migration

An S5-to-S7 retrofit of a positioning module is not just a software exercise — it is a safety-relevant change. Apply the following checks before commissioning:

  • Hard-wired E-STOP — the E-STOP chain must interrupt the drive controller-enable independent of the FM354 output. The FM354's drive-enable relay is not a safety relay.
  • Limit switches — wire the hardware positive and negative limit switches to both the FM354 dedicated inputs (terminals 16–20) and the drive's hardware limit inputs. The FM354 SW limits are a software backup, not a primary safety barrier.
  • Safe stop categories — if the original machine used a category 1 stop via the IP246, replicate it on the FM354 plus a hard-wired contactor on the drive. The FM354 does not implement any STO/SS1 function on its own.
  • Configuration lock — once the FM354 is commissioned, lock the configuration password in the FM353/FM354 Config tool to prevent accidental parameter changes.

Frequently Asked Questions

Is the FM354 a true one-to-one replacement for the IP246?

Not exactly. The FM354 is a single-axis module, while some IP246 variants control up to two axes. For a standard single-axis positioning job, the FM354 is a functionally equivalent drop-in. For two-axis IP246 applications, use two FM354s or a single FM357-2 (up to four axes).

Is there a software tool to convert IP246 programs to FM354 programs?

No automated conversion tool exists. The IP246 machine data, machining programs, and STEP 5 control logic must be manually re-implemented on the FM354. A common approach is to use the IP246 parameters as a reference and develop a fresh STEP 7 program that calls the FM354 via the control and status DBs (DB100/DB101 by default).

The FM354 does not see the Heidenhain linear scale values when I move the axis manually — what is wrong?

The FM354 expects 5 V TTL differential signals (A, A*, B, B*, R, R*) on front connector terminals 33–40. The IP246 typically accepted 24 V incremental. The Heidenhain IBV or EXE box between the scale and the module must output TTL; replace any 24 V output IBV with a TTL-output model (suffix -B or -C) and verify the twisted-pair wiring to FM354 terminals 33–38.

Which DB number does the FM354 use for setpoints?

The DB number is configurable in HW Config under the FM354 object properties. Example projects use DB100 for the control interface and DB101 for the status interface, but the actual numbers depend on the project. The control DB includes the START bit, STOP bit, mode selector, program number, MDI position, MDI feedrate, and overrides; the status DB returns READY, IN_POSITION, actual position, and M-function handshakes.

Can the FM354 output a two-stage approach (rough + finish) velocity from the HMI?

Yes. Use MDI mode (G88) and issue two consecutive blocks: a first block at the rough feedrate to a position 1–2 mm before the target, then a second block at the finish feedrate to the final position. Alternatively, store both moves as NC programs and call them sequentially from the STEP 7 program.

What happens to existing IP246 M-codes during the migration?

The M-code set is largely compatible, but verify each code against the FM354 manual (entry 2110628). M00–M99 are reserved for user M-functions; M17, M30, and others have fixed meanings on the FM354. Re-assign machine-side M-codes in MD 60–75 of the FM354 configuration to match the IP246 numbering used by the existing wiring.

Is the FM354 still orderable for new installations?

Check the current Siemens catalog for product phase. The FM354 has been in product phase "phased out" or "successor" status in some regions — verify availability with your Siemens representative. The FM357-2 is also being phased out. For new designs, consider the SIMATIC ET 200SP with Technology modules or SINAMICS drive-integrated positioning.

Back to blog