Controlling MICROMASTER 4 Drives via STEP 7 FC14 and PROFIBUS

David Krause16 min read
SiemensTutorial / How-toVFD / Drives
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

Overview

This reference describes how to control Siemens MICROMASTER 4 (MM4) drives from a SIMATIC S7-300 or S7-400 PLC over PROFIBUS-DP using the FC14 / FC15 wrappers shipped in the official Siemens application example. The most common beginner question is whether one UDT must be created per drive when multiple MM4 units share the bus. The answer is unambiguous: define a single UDT, then instantiate it once per drive inside a data block. A nine-drive system therefore requires one send UDT and one receive UDT, plus a single DB that holds nine send instances and another DB that holds nine receive instances. Renumbering to UDT18, UDT22, UDT33 … is unnecessary and obscures the relationship between template and storage.

The pattern below matches the Siemens Industry Online Support entry 22078757 — STEP 7 function block to control a MICROMASTER 4 or SINAMICS G120 via PROFIBUS-DP, document v3.2. The same FC14 / FC15 wrapper applies to SINAMICS G120 and G120C as long as the cyclic PPO telegram is identical, which is true for PPO1 and PPO3 on MM4 firmware V1.5+ and G120 firmware V3.x / V4.x.

MICROMASTER 4 Hardware and PROFIBUS-DP Communication

The MICROMASTER 4 inverter family covers three load profiles:

Drive Power range Typical use PROFIBUS option module
MM420 0.37 – 11 kW Low-cost pumps, fans, conveyors 6SE6400-1PB00-0AA0
MM430 7.5 – 250 kW Pumps, fans, building services 6SE6430-1PB00-0AA0
MM440 0.37 – 250 kW General-purpose, high-dynamic loads 6SE6400-1PB00-0AA0

All three accept the same PROFIBUS-DP option module and use the same Parameter Process Object (PPO) telegram structure. They differ only in firmware capability: MM440 supports free function blocks (FFB) and BICO technology, MM430 is locked to fan / pump profiles, MM420 is the simplified variant. PROFIBUS-DP is RS-485 based and runs at 9.6 kbit/s to 12 Mbit/s. Each MM4 acts as a Class 1 slave; the S7-CPU acts as a Class 1 master; STARTER or DriveMonitor acts as a Class 2 master for commissioning. Valid slave addresses are 1 to 126; addresses 0 and 127 are reserved.

Note: Older MM4 units must run firmware V1.5 or later to support the standard PPO1 / PPO3 mapping expected by FC14. The MM440 with order-number suffix -1AD or higher ships with V2.x firmware, which is fully compatible. Always read the firmware version on the operator panel (P0018 / r0018) before downloading a project that expects a specific PPO type.

UDT vs DB Instance: The Core Misconception

A UDT (User-Defined Type) is a custom datatype definition in STEP 7, structurally identical to a STRUCT in C or a RECORD in Pascal. A UDT is not a memory area; no process data lives in the UDT itself. The UDT only defines the layout — order, names, and types of fields — that any block instantiated from it will contain.

To hold actual data, the UDT must be instantiated inside a data block (DB). The DB allocates RAM in load memory and work memory, and each instance of the UDT inside the DB becomes a separate set of variables that the program can read or write. Define UDT "UDT11" with two WORDs and one INT. Create DB11, and inside DB11 declare nine elements of type UDT11 named Drive1 through Drive9. The result is nine independent copies of the UDT structure sharing the same internal layout. Memory is consumed only in DB11; the UDT itself occupies no runtime memory.

This is exactly how the Siemens example project (article 22078757) organises its send and receive structures. The example UDTs are numbered 11 and 33 by convention only. The numbers carry no semantic meaning in STEP 7; they are simply identifiers chosen by the project author. There is no implicit ordering or relationship between UDT11 and UDT33 other than what the programmer assigns.

Element Role Memory allocation Number needed for 9 drives
UDT11 (send) Datatype template: STW1, NSOLL, optional PKW None 1
UDT33 (receive) Datatype template: ZSW1, NIST, optional PKW None 1
DB11 Holds 9 instances of UDT11 (send) 9 × sizeof(UDT11) 1
DB33 Holds 9 instances of UDT33 (receive) 9 × sizeof(UDT33) 1

Renumbering the UDTs to UDT18, UDT22, UDT33, UDT44 … has no functional effect and is discouraged because it obscures the relationship between UDT and DB.

FC14 / FC15 and PPO Telegram Structure

FC14 and FC15 are user-defined FCs from the Siemens application example (article 22078757). They wrap the operating-system blocks SFC14 (DPRD_DAT) and SFC15 (DPWR_DAT) and add drive-specific scaling and bit-handling for MM4 / G120. The actual byte copy is performed by SFC14 / SFC15 inside the CPU; the FC wrapper only prepares the data and the slave address.

Simplified interface of FC14 — read drive → PLC:

FUNCTION FC14 : VOID
VAR_INPUT
  REQ     : BOOL;     // Edge-triggered start
  DP_ADDR : BYTE;     // PROFIBUS slave address (1-126)
  M_Bit   : BOOL;     // Trigger bit for the SFC14 call
  DW_Addr : ANY;      // Pointer to receive DB and offset
END_VAR
VAR_OUTPUT
  RET_VAL : INT;      // SFC14 return code
  BUSY    : BOOL;     // Active
END_VAR

FC15 mirrors this interface but calls SFC15 (DPWR_DAT) for the send direction. Because the wrapper is a normal FC, call it once per drive per cycle. There is no concept of a shared instance — the slave address and the DB offset are explicit inputs and must differ for every drive.

Note: SFC14 / SFC15 require consistency over the full length of the DP I/O image. If the configured PPO1 telegram is 12 bytes, the receive DB must hold 6 words and the destination pointer must be word-aligned. Misalignment produces an SF (system fault) and the CPU goes to STOP.

PPO types and telegram length:

PPO PKW words PZD words out / in Bytes out / in Use case
PPO1 4 2 / 2 12 / 12 MM4 / G120 — most common
PPO2 4 6 / 6 20 / 20 MM440 with extended setpoints
PPO3 0 2 / 2 4 / 4 MM4 fast-only, no parameter channel
PPO4 0 6 / 6 12 / 12 Reserved / motion
PPO5 4 10 / 10 28 / 28 MM440 with torque + ramp + extras

Select the PPO type in HW Config under the slave properties. The slot configuration must match the PPO selected on the drive via P0922 (older firmware) or P0921 / P0922 (V3.x). A mismatch produces diagnostic interrupt 0x0A (invalid configuration) and the slave does not enter data exchange. For nine identical drives, configure all nine with the same PPO type so one UDT layout is valid for all nine instances.

Control Word, Status Word, and PKW Parameter Channel

The drive is controlled by the control word STW1 (16-bit, bit-coded). Setting specific bit patterns corresponds to PROFIdrive state transitions:

STW1 bit Function Value for "Run forward"
0 ON / OFF1 (rising edge starts, falling edge ramps down) 1
1 OFF2 (0 = coast stop, 1 = allow) 1
2 OFF3 (0 = quick stop, 1 = allow) 1
3 Inverter enable (0 = pulse inhibit, 1 = enable) 1
4 Ramp generator enable 1
5 Reserved / ramp freeze 1
6 Setpoint enable (0 = freeze setpoint) 1
7 Fault acknowledge (rising edge clears faults) 0 (1 to ack)
8-9 Reserved / jog 1-2 0
10 Control by PLC (1 = PLC owns control) 1
11-15 Direction reversal / reserved 0

The standard "Run forward" word is 0x047F. The standard "Run reverse" word is 0x0C7F. The standard "Coast stop" word is 0x047E. The standard "Fault acknowledge" pattern is 0x047F → 0x04FF for one cycle → 0x047F.

The status word ZSW1 reports the current drive state:

ZSW1 bit Function
0 Ready to switch on
1 Ready to operate
2 Operation enabled
3 Fault present
4 OFF2 active
5 OFF3 active
6 Switch-on inhibited
7 Alarm present
8 Speed setpoint / actual deviation within tolerance
9 Control requested (PLC must take control)
10 f or n reached (setpoint reached)
11-15 Reserved / direction / reserved

State machine: ZSW1 bit 6 + bit 0 + bit 1 = "Ready to switch on". ZSW1 bit 6 + bit 0 + bit 1 + bit 2 = "Operation enabled" (motor running). The PLC should never set STW1 bit 0 unless the drive is in the matching ZSW1 state — premature start commands are ignored but generate the diagnostic event 0x0010 (start inhibit).

The PKW channel is acyclic and processes one parameter per bus cycle. PPO1 / PPO2 / PPO5 carry four PKW words per direction:

Word Name Meaning
1 PKE Bits 0-10: parameter number. Bit 11: reserved. Bits 12-13: reserved. Bits 14-15: AK (Auftrags-Kennung, request / response identifier).
2 IND Bits 0-7: parameter index. Bits 8-15: parameter page (relevant on SINAMICS S / G).
3-4 PWE Parameter value (DWORD), scaled by the parameter's data type.

Common AK values for a master (PLC) request:

AK (hex) Meaning
0x0 No request
0x1 Read parameter value (word)
0x2 Write parameter value (word, 16 bit)
0x3 Read parameter value (DWORD)
0x4 Write parameter value (DWORD)
0x5 Read parameter value (array of WORD)
0x6 Write parameter value (array of WORD)
0x7 Read parameter value (array of DWORD)

To read P0700 (command source) of an MM4: PKE = 0x11BC (P0700 = 0xBC, AK = 0x1 → 0x1BC; with the read-bit 11 set per profile 0x1000 → 0x11BC), IND = 0x0000, PWE = 0x00000000. The response carries the same PKE with the matching response AK and PWE holds the value. To write P1120 (ramp-up time) to 5 s: PKE = 0x2460 (P1120 = 0x460, AK = 0x2 → 0x2460), IND = 0x0000, PWE = 5 as DWORD (0x00000005 little-endian).

Note: Several parameters are write-protected while the drive is in "Operation enabled" (motor data P0340 et al.). Always issue parameter writes in the "Ready to switch on" state, never while running. The FC14 / FC15 wrappers in the Siemens example check ZSW1 bit 2 and only update parameters when the drive is idle.

Programming Pattern: FC14 in OB1 for Nine Drives

The recommended data layout is two data blocks, one for the send direction and one for the receive direction, mirroring the UDTs in the official example. STEP 7 V5.x construction sequence:

  1. Open the S7 project in SIMATIC Manager.
  2. In the Blocks container, insert a new type (UDT) named UDT11 with the PPO1 send structure: PKE (WORD), IND (WORD), PWE (DWORD), STW1 (WORD), NSOLL (INT).
  3. Insert UDT33 with the PPO1 receive structure: PKE (WORD), IND (WORD), PWE (DWORD), ZSW1 (WORD), NIST (INT).
  4. Insert a new DB11 referring to UDT11 and declare nine elements Drive1 … Drive9 of type UDT11.
  5. Insert DB33 referring to UDT33 and declare nine elements Drive1 … Drive9 of type UDT33.
  6. Save and download the blocks to the CPU.

For PPO3 (process data only), simplify the UDTs to STW1 / NSOLL and ZSW1 / NIST and skip the PKW words. The same UDT template is reused; only the HW Config slot for each slave changes.

A representative OB1 network for Drive 1 (PPO1, DB instance offset 0):

Network 10 — Drive 1: read receive data
   A   M    100.0       // one-shot trigger
   =   L     0.0
   CALL  FC 14
        REQ     := M100.0
        DP_ADDR := B#16#3        // PROFIBUS address 3
        M_Bit   := M100.0
        DW_Addr := P#DB33.DBX0.0 BYTE 12
        RET_VAL := MW 200
        BUSY    := M 100.1
Network 11 — Drive 1: write send data
   CALL  FC 15
        REQ     := M100.2
        DP_ADDR := B#16#3
        M_Bit   := M100.2
        DW_Addr := P#DB11.DBX0.0 BYTE 12
        RET_VAL := MW 202
        BUSY    := M 100.3

For drives 2 through 9, increment DP_ADDR by 1 and increment DW_Addr by 12 bytes (P#DB11.DBX12.0 BYTE 12, P#DB11.DBX24.0 BYTE 12, …). Use a unique M-bit per drive as the one-shot edge for REQ, typically toggled by a clock bit or a state machine in a separate FB. If the application does not require parameter access from the PLC, skip FC14 / FC15 and call SFC14 / SFC15 directly to save code size; the example is intended for users who do want online parameter access.

Commissioning with STARTER and Cycle Time

Commissioning an MM4 with STARTER (or DriveMonitor for legacy units) is independent of the PLC program. Recommended sequence:

  1. Connect STARTER via PROFIBUS (Class 2 master) at the bus baud rate (1.5 Mbit/s or 12 Mbit/s typical).
  2. Online → Select drive, confirm firmware version on the Identification tab (P0018 / r0018).
  3. In Configuration, set the PROFIBUS address P0918 to the value planned in HW Config (e.g. 3 for Drive 1).
  4. In Communication, set P0922 to 1 (PPO1) or 3 (PPO3). Save to EEPROM.
  5. Set P0700 = 6 (PROFIBUS) and P1000 = 6 (PROFIBUS setpoint) so the drive obeys the cyclic control word.
  6. Configure ramp times, motor data, and encoder if used. Run the motor briefly in STARTER's Control panel to verify hardware.
  7. Release STARTER's master control before connecting STEP 7, otherwise the drive will reject PLC commands.
  8. In HW Config, place the MM4 from the catalog (SIMOVERT → MICROMASTER 4, or SINAMICS → G120) and assign the planned PROFIBUS address. Compile and download HW Config.
  9. Write the OB1 networks calling FC14 / FC15 for each drive and download the program.
  10. Go online and monitor DB33. ZSW1 should read 0x4B31 in the "Ready to switch on" state.

For a 9-drive system on a single PROFIBUS segment, the minimum cycle time is bounded by bus round-trip. A standard approximation for DP-V0 cyclic I/O:

T_cycle >= (N_slaves x T_byte) + T_idle + T_react
T_byte  = 11 bits / baud_rate   per user-data byte
T_react ~= 3 ms                 (typical MM4)
T_idle  ~= 1 ms                 (token rotation margin)

At 1.5 Mbit/s with PPO1 (12 bytes per direction = 24 bytes total = 264 bit times = 176 µs per drive) and 9 drives plus 1 ms idle and 3 ms reaction:

T_cycle ~= 9 x 0.176 ms + 1 ms + 3 ms ~= 5.6 ms

This is well within the 4-10 ms envelope the MM4 tolerates before triggering a communication timeout (F0070 / F0072). At 500 kbit/s the per-byte time rises to 528 µs and the cycle time grows to ~8.8 ms. Reducing the PZD count by switching to PPO3 (4 bytes per direction) is the easiest way to halve the bus load.

Migration to SINAMICS G120 and Safety Notes

The same UDT and FC14 / FC15 structure is portable to SINAMICS G120 with the standard CU240S-2 or CU240E-2 control unit. The PPO type becomes the PROFIdrive Standard Telegram 1 or Standard Telegram 3, the conceptual successor to PPO1 / PPO3. The control word (STW1) and status word (ZSW1) bit assignments are identical for bits 0-10; bits 11-15 gained new meanings on SINAMICS (ramp generator, motor potentiometer, fault buffer). The example article 22078757 covers both MM4 and G120 with a single project.

For the CU250S control unit with Safety Integrated, the safety functions are configured separately and do not flow through the PROFIdrive channel. STO is wired separately; PROFIsafe on PROFINET is the recommended path, not PROFIBUS-DP with this generation.

EMC and wiring:

  • Route the PROFIBUS cable in a dedicated trunk, separated from power cables by at least 200 mm. Crossings at 90°.
  • Use PROFIBUS connectors with integrated termination and diagnostic LEDs (e.g. 6GK1500-0FC10, 6GK1500-0EA02). Termination ON at the first and last device, OFF elsewhere.
  • Maintain shield continuity through every connector. Ground the shield at the cabinet entry using EMC clamps.
  • Bond the MM4 enclosure to the cabinet PE bus with a short, low-impedance link. Floating grounds produce HF interference that may corrupt the PROFIBUS signal.
  • Stop functions: STW1 bit 0 (OFF1) and bit 1 (OFF2) are control-level only. For category 1 / 3 stops per EN 60204-1, use a hardwired safety contactor or the PROFIsafe channel.

Troubleshooting Matrix

Symptom Likely cause Diagnostic step Fix
SF on CPU, "Slave not found" in buffer Wrong PROFIBUS address on drive or in HW Config Read P0918 from PMU; compare with HW Config slot Match the address; power-cycle the drive
SF on CPU, "Invalid configuration" PPO type mismatch Check HW Config slot and P0922 Set P0922 to match HW Config
ZSW1 reads 0x0000 DW_Addr misaligned, or SFC14 service not running Check DW_Addr alignment and SFC14 RET_VAL Re-align pointer on word boundary
Drive acknowledges but does not run (ZSW1 bit 2 not set) STW1 bit pattern wrong, or P0700 not 6 Read ZSW1 bits; read P0700 and P1000 Set STW1 to 0x047F and command source to PROFIBUS
PKW request times out Drive in "Operation enabled" state Read ZSW1 bit 2 Bring drive to "Ready to switch on" before parameter write
Bus fault at 12 Mbit/s with long cable Reflection, missing termination Measure with BT200 bus tester Enable terminator on first and last device
One drive in the group is intermittent Loose connector or duplicate address Disconnect other drives, observe single drive Re-seat D-sub connector; reassign address
Speed setpoint not respected P1000 not on PROFIBUS Read P1000 Set P1000 = 6
Drive trips with F0001 (overvoltage) on start Ramp time too short for load Read P1120, P1121 Increase ramp time; check brake resistor
Drive trips F0002 / F0003 on start Motor data incorrect (P0304, P0305) Compare to motor nameplate Re-enter motor data; run auto-calibration (P1910)

Specifications and Limits

Parameter Value
Maximum MM4 slaves per PROFIBUS segment 32 without repeater; 126 with repeaters
Valid slave addresses 1-126 (0, 127 reserved)
Supported baud rates 9.6, 19.2, 45.45, 93.75, 187.5, 500 kbit/s; 1.5, 3, 6, 12 Mbit/s
Maximum cable length per segment 1200 m at 9.6 kbit/s; 100 m at 12 Mbit/s
PPO types supported by MM4 PPO1, PPO2, PPO3, PPO5 (PPO4 reserved)
PPO1 telegram length 12 bytes per direction (4 PKW + 2 PZD)
PKW update rate (PPO1) Approximately one parameter per cycle, cycle 4-20 ms
PZD cycle time (MM4) 4 ms minimum at 1.5 Mbit/s
Control word size 16 bits (STW1); optional 16 bits (STW2) for PPO5
Status word size 16 bits (ZSW1); optional 16 bits (ZSW2) for PPO5
Setpoint scaling (NSOLL) 0x4000 = 100% of P2000 reference speed
Actual value scaling (NIST) 0x4000 = 100% of P2000 reference speed
Standard firmware for full PPO1 support V1.5+ (MM440); V1.0+ (MM420, MM430)
PROFIBUS option module order number 6SE6400-1PB00-0AA0 (MM4); 6SL3244-0BA00-1PA0 (G120 CU240S/D)

FAQ

Do I need a new UDT for each MICROMASTER 4 drive, e.g. UDT18, UDT22, UDT33?

No. A UDT is a datatype template and occupies no runtime memory. Define one UDT for the send direction and one for the receive direction, then instantiate each UDT multiple times inside a data block. For nine drives you need UDT11 (send) and UDT33 (receive) plus one DB containing nine elements of each UDT, not nine UDTs.

Why does the Siemens example use UDT11 and UDT33 instead of UDT1 and UDT3?

UDT numbers are arbitrary identifiers in STEP 7 and carry no semantic meaning. The original example author chose 11 and 33 by convention. Renaming them has no effect on behaviour as long as the UDT and any DB that references it are updated together.

Can I call FC14 once for nine drives in OB1?

No. FC14 and FC15 operate on a single PROFIBUS slave per call, the DP_ADDR input selects the target. Call FC14 nine times in OB1, once per drive, each with its own DP_ADDR, M_Bit, and DW_Addr offset. The Siemens example project uses one network per drive.

What is the difference between FC14 and SFC14?

SFC14 (DPRD_DAT) is a system function block in the CPU operating system that performs a single DP read of a consistent data block. FC14 is a user-defined wrapper from the Siemens example project that calls SFC14 internally and adds drive-specific scaling and bit-handling for MM4 / G120. For pure process data without scaling, SFC14 alone is sufficient.

Which PPO type should I select for a basic speed-control application?

PPO1 is the most common choice: 4 PKW words for occasional parameter access and 2 PZD words for cyclic control and status. If the application does not require online parameter access, PPO3 is faster and uses only 2 PZD words per direction, halving the bus load.

Back to blog