S7-1200 PTO Output Configuration: SM 1222 vs SB 1222 Stepper Motor Workarounds
When commissioning a SIMATIC S7-1200 CPU 1215C DC/DC/RLY for pulse train output (PTO) motion control, engineers frequently discover that an attached SM 1222 DQ 8×24V signal module cannot be assigned to a PTO channel, while a compact SB 1222 DQ 4×24V signal board works immediately. This is not a software defect or a TIA Portal project error: it is a fundamental hardware constraint of the S7-1200 system architecture. The CPU and the Signal Board share an internal backplane that exposes the high-speed output generator, whereas standard SM 1222 modules connect through the asynchronous I/O bus and do not expose PTO-capable output drivers. This article documents the underlying limitation, the TIA Portal configuration path, the supported PTO modes, and the engineering workarounds required to drive four stepper motors from one CPU 1215C.
1. Problem Description
A typical field report reads: "CPU 1215C DC/DC/RLY with attached SM 1222 DQ 8×24V cannot configure hardware outputs for PTO. The SB 1222 DQ 4×24V signal board configures automatically." The symptoms in TIA Portal are:
- The PTO/PWM output selection in the CPU Properties shows only the onboard CPU outputs (Q0.0, Q0.1, etc.) and SB 1222 outputs as assignable. SM 1222 outputs are greyed out.
- When adding a TO_PositioningAxis or TO_StepperAxis technology object, the available output assignment list does not include any SM 1222 channel.
- The TIA Portal compile or hardware detection does not create the pulse generator (PTO) resource for SM 1222 outputs.
- Manual assignment via the CTRL_PTO instruction's
AXIS0_PULSE/AXIS0_DIRtag group shows that only CPU and SB outputs are valid.
The root cause is architectural: the S7-1200 PTO pulse generators are implemented in the CPU silicon and are routed only to the onboard transistor outputs and to the Signal Board slot. Signal Modules on the right-side I/O bus do not have a hardware path back to the PTO generator, so they cannot source a pulse train regardless of TIA Portal configuration.
2. Root Cause Analysis
2.1 PTO Hardware Routing in the S7-1200
The S7-1200 PTO generator consists of a hardware counter/timer block inside the CPU package that can drive one or two physical output pins per axis in pulse/direction or CW/CCW mode. The routed output pairs are hard-wired to specific terminals depending on the CPU variant:
| CPU Model | Onboard PTO Outputs | Max PTO Axes (Onboard) | SB 1222 PTO Capable? |
|---|---|---|---|
| CPU 1211C | Q0.0, Q0.1, Q0.2, Q0.3 | 2 (using Q0.0/Q0.1 or Q0.2/Q0.3) | Yes (1 axis on SB) |
| CPU 1212C | Q0.0, Q0.1, Q0.2, Q0.3 | 2 | Yes (1 axis on SB) |
| CPU 1214C | Q0.0, Q0.1, Q0.2, Q0.3 | 4 (using all four) | Yes (1 axis on SB) |
| CPU 1215C | Q0.0, Q0.1, Q0.2, Q0.3, Q0.4, Q0.5 (Q0.0–Q0.5 transistor) | 4 (using Q0.0–Q0.7 paired) | Yes (1–2 axes on SB) |
| CPU 1217C | Q0.0–Q0.7 + Q1.0, Q1.1 (10 high-speed) | 4 | Yes |
2.2 Why the Signal Board Works
The Signal Board (SB 1222) plugs into a dedicated socket on the front of the CPU. The CPU ASIC routes the high-speed pulse generator signals directly to the SB output drivers through the SB connector. This is why TIA Portal can mark the SB outputs as PTO-capable and why the Hardware Output dropdown populates automatically. The SB does not sit on the SM I/O bus; it is part of the CPU's local high-speed bus.
2.3 Why the Signal Module Fails
The SM 1222 is a standard 24V sink/source output module on the S7-1200 right-side I/O bus. Its output transistors are not connected to the CPU's high-speed pulse generator. Attempting to write a 100 kHz or 1 MHz pulse train to an SM output would require the CPU's general-purpose I/O image bus to toggle at that rate, which is physically impossible. Hence the SM 1222 is deliberately excluded from the PTO list in TIA Portal and from the AXISx_PULSE tag drop-down.
3. PTO Mode Selection and Hardware Mapping
Before commissioning, decide the PTO output mode. TIA Portal supports two PTO output modes per axis, both available on the CPU and the SB 1222:
| Mode | Output Pair Used | Signal Behavior | Typical Stepper Drive Wiring |
|---|---|---|---|
| Pulse / Direction | Pulse on PULSE, direction on DIR
|
PULSE toggles at the configured rate; DIR is high for one rotation direction, low for the other | STEP+ to PULSE, DIR+ to DIR, EN+ to a normal digital output |
| CW / CCW (A/B quadrature equivalent) | One pulse stream for CW, one for CCW | Each stepper pulse stream is on its own output; drives accept a pulse on either input | STEP+ CW to PULSE, STEP+ CCW to second PULSE pin |
The mode is set in the Properties > Pulse generators (PTO/PWM) section of the device configuration. For pulse/direction mode, the CPU automatically reserves two adjacent outputs. The pairing cannot be split across the CPU and the SB; each axis must use outputs that are physically present on the same hardware block.
4. Solution: Step-by-Step TIA Portal Configuration
4.1 Prerequisites
- TIA Portal V17, V18, V19, V20, or V21 (the Connecting PTO-Outputs documentation on the official Siemens TIA Portal help portal is published for V21).
- CPU 1215C DC/DC/DC or DC/DC/RLY firmware V4.2 or higher (PTO 4-axis support requires firmware ≥ V4.2; verify in Online & Diagnostics > CPU Information).
- SB 1222 DQ 4×24V (6ES7222-1AD30-0XB0) or SB 1222 DQ 4×5V (6ES7222-1AD50-0XB0) for axis 4 if Q0.0–Q0.7 are consumed.
- Stepper drives with opto-isolated step/direction inputs (5V or 24V compatible) such as the Siemens SIMATIC Micro-Drive (F-TM Stepper) family or third-party drives (Applied Motion, Leadshine, Sanyo Denki).
4.2 Procedure
- Add the device and the Signal Board. In the project tree, double-click Devices & networks and add the CPU 1215C. Drag an SB 1222 DQ 4×24V into the SB slot. The signal board automatically appears in the device view with outputs Qx.0–Qx.3.
- Open the CPU Properties and select Pulse generators (PTO/PWM). Enable the required PTO channels. For four axes, enable PTO1, PTO2, PTO3 on the onboard outputs and PTO4 on the SB 1222 outputs. Select Pulse and direction as the output mode for each axis.
-
Verify the output pin assignment. The dropdown will display valid pin pairs. Typical default for CPU 1215C with the SB 1222 installed is:
- PTO1: Q0.0 (PULSE) + Q0.1 (DIR)
- PTO2: Q0.2 (PULSE) + Q0.3 (DIR)
- PTO3: Q0.4 (PULSE) + Q0.5 (DIR)
- PTO4: SB Qx.0 (PULSE) + SB Qx.1 (DIR)
- Add technology objects. For each axis, insert a Motion Control > TO_PositioningAxis (or TO_StepperAxis if the user program uses that variant). Under Hardware interface > Drive, select the PTO output that was just enabled. Set the maximum pulse rate, the acceleration, the jerk limit, and the homing configuration per the mechanical axis.
-
Wire the program blocks. The TIA Portal help portal at docs.tia.siemens.cloud/.../connecting-pto-outputs provides a reference snippet for connecting a PTO output to a TO_PositioningAxis:
// Create an instance of the axis "MyAxis"(AxisType := TO_PositioningAxis, AxisHardware := PTO_PulseDir, AxisName := 'Axis1'); // Power and enable the axis MC_Power(Axis := "MyAxis", Enable := TRUE, StartMode := IMMEDIATE); // Issue a relative move MC_MoveRelative(Axis := "MyAxis", Distance := 1000.0, Velocity := 50.0, Acceleration:= 100.0, Deceleration:= 100.0, Execute := "StartButton"); - Compile and download the hardware configuration and the program to the CPU. Use Online & Diagnostics > Pulse generators to verify that each PTO channel reports RUN and the expected output frequency.
5. Verification
After download, perform these checks in order:
- Online PTO status. Open the CPU's Online & Diagnostics > Pulse generators view. Each enabled channel must show status RUN or STOPPED, never ERROR. If a channel reports ERROR, see Section 8 for fault-code interpretation.
- Output frequency check with an oscilloscope or logic analyzer. Connect a scope probe to the assigned PULSE output (e.g., Q0.0 for axis 1) with the axis commanded to a constant velocity. Confirm a square wave at the configured frequency, 50% duty cycle, and 24V swing.
- Motion test. Issue a relative move of 1000 pulses with a velocity of 50 pulses/s through the watch table. The stepper motor must complete the move in 20 seconds ±5%. If the motor runs in the wrong direction, invert the DIR signal or toggle the Invert direction checkbox in the technology object.
- Homing test. Run the configured homing sequence. Verify that the homing output (Z-pulse or reference-cam input) is wired to a fast onboard CPU input (I0.0–I0.5 for HSC, or any input for MC_Home with digital input).
- Fault latching test. Force the drive's error output true and verify that MC_Power reports Error and stops the axis safely.
6. Engineering Workarounds for Four-Axis Control
When the application genuinely needs four stepper axes but the rack already carries SM 1222 modules for digital outputs unrelated to motion, the following solutions are field-proven.
6.1 Workaround A — Use the CPU + Signal Board Only
The CPU 1215C provides up to four onboard PTO axes using Q0.0–Q0.7. If the application needs only four axes, drop the SM 1222 PTO attempt entirely and reserve the SM 1222 for non-motion digital outputs (solenoids, lamps, indicators). The SB 1222 is not required if the four onboard axes are sufficient.
Mapping for four axes without the SB 1222:
| Axis | PULSE | DIR |
|---|---|---|
| Axis 1 | Q0.0 | Q0.1 |
| Axis 2 | Q0.2 | Q0.3 |
| Axis 3 | Q0.4 | Q0.5 |
| Axis 4 | Q0.6 | Q0.7 |
This consumes all eight transistor outputs of the CPU 1215C DC/DC/RLY, so plan the digital I/O budget accordingly.
6.2 Workaround B — Use a Signal Board + Fewer SM 1222 Outputs
If the application needs more digital outputs than the onboard Q1.x relay group can provide, retain a smaller SM 1222 (e.g., SM 1222 DQ 8×24V with 6ES7222-1BF22-0XA0) for non-PTO I/O and add the SB 1222 (6ES7222-1AD30-0XB0) to bring axis 4 onto a separate high-speed bus segment. This is the configuration the source thread observed: the SB auto-configures for PTO, the SM 1222 is used for non-motion output only.
6.3 Workaround C — Multi-CPU Distributed Setup
For larger machines that need six, eight, or more stepper axes, deploy multiple S7-1200 CPUs on PROFINET and assign each CPU its own PTO bank. A CPU 1214C or 1215C with an SB 1222 can serve two to four axes per station. Coordinate motion through PROFINET IRT or through user-programmed MC_MoveAbsolute blocks triggered by a global clock. Each CPU retains full TIA Portal motion control and diagnostic capability.
6.4 Workaround D — External Stepper Driver with Fieldbus Interface
Replace direct PTO control with a fieldbus stepper drive. The SIMATIC Micro-Drive F-TM Stepper (article number 6BK1900-0BA00-0AA0) accepts PROFINET IRT commands and the F-TM Servo / F-TM Stepper technology object can run motion over PROFINET instead of PTO. This expands the axis count beyond the CPU's PTO limit and centralizes motion in the drive's closed-loop controller.
7. PWM Use on the Same CPU
The same hardware limitation applies to PWM (pulse-width modulation) outputs. PWM is generated by the same CPU hardware block as PTO and is routed only to the onboard outputs and the Signal Board. SM 1222 cannot be a PWM source. This is why the source thread was originally posted in a PWM discussion; the answer for PWM is identical to PTO — use CPU or SB outputs only.
8. Troubleshooting Matrix
| Symptom | Likely Cause | Action |
|---|---|---|
| SM 1222 output greyed out in PTO assignment | SM 1222 has no PTO path | Use CPU or SB output; see Section 6 workarounds |
| SB 1222 output missing from PTO assignment | SB not inserted in device view, or wrong SB catalog number | Insert SB 1222 DQ 4×24V (6ES7222-1AD30-0XB0) |
| Compile error: PTO output not assigned to valid pin | Axis configured before PTO was enabled | Re-open TO_PositioningAxis > Hardware interface > Drive and re-select the PTO output |
| Axis reports Configuration error at run-time | Output frequency exceeds 100 kHz (CPU) or 200 kHz (CPU 1217C) | Reduce Maximum velocity in the technology object |
| Motor does not turn; PULSE output toggles at correct rate | DIR polarity inverted, or drive not enabled | Toggle Invert direction; verify drive EN input |
| Motor runs rough at low speed | Pulse rate too low for the drive's microstep filter | Increase starting velocity, reduce acceleration, or change microstep setting |
| One axis works, second axis is stuck low | Outputs of axis 1 and axis 2 share a transistor group; check pin pairing | Confirm adjacent pairing (Q0.0/Q0.1, Q0.2/Q0.3, etc.) |
| Fieldbus stepper drive not detected | PROFINET device name or IP not assigned | Assign PROFINET name from TIA Portal, then download |
9. Cross-Platform Reference Notes
Engineers familiar with non-Siemens controllers will recognise the same architectural rule. On Schneider Electric's Modicon M241, the M241 PTO configuration documentation states that a PTO channel uses one or two physical outputs of the controller's transistor bank, with no provision to use a remote TM3 module. ABB AC500 also restricts PTO to the onboard high-speed outputs, as documented in the ABB PLC Help configuration of PTO outputs article. AutomationDirect's CLICK PLUS PLC similarly routes pulse train output to the CPU's high-speed I/O. This pattern — PTO locked to onboard or local-slot outputs — is industry-wide, not a Siemens peculiarity. The Schneider FAQ 363046 on M241 PTO generation is a useful parallel reference.
10. Commissioning Checklist
- CPU firmware version ≥ V4.2 verified in Online & Diagnostics.
- SB 1222 catalog number matches the variant in the device configuration.
- Every PTO channel is assigned a valid (CPU or SB) output pair.
- No SM 1222 output is referenced in any technology object.
- Stepper drive EN input is driven from a non-PTO digital output (CPU Q1.x relay, SB output not used for PTO, or SM 1222 output).
- Reference switch wired to a fast CPU input (I0.0–I0.5).
- Scope probe on each PULSE pin confirms clean 24V square wave at the configured rate.
- Homing sequence completed successfully for every axis.
- EMERGENCY STOP chain tested — the S7-1200 PTO does not implement STO; STO must be wired at the drive and at the contactor.
11. Key Engineering Caveats
- The S7-1200 PTO maximum pulse rate is 100 kHz on CPU 1211C/1212C/1214C/1215C and 1 MHz on CPU 1217C. The configured maximum velocity (in user units per second) times the load revolutions per motor revolution times the encoder resolution must not exceed this limit.
- CPU 1215C DC/DC/RLY has eight transistor outputs (Q0.0–Q0.7) and eight relay outputs (Q1.0–Q1.7). The relay group cannot generate PTO and cannot be high-speed counted.
- The Signal Board is mutually exclusive with a battery board on the same slot. Adding a battery board (BB 1297) removes PTO axis 4 from the SB. Plan the slot for BB or SB, not both.
- PTO and PWM share the same hardware generator. Enabling a PTO channel disables PWM on the same pin pair, and vice versa. TIA Portal prevents double-assignment at compile time.
- CPU 1215C supports four PTO axes maximum; do not attempt to configure a fifth axis by reusing outputs.
12. Frequently Asked Questions
Can the SM 1222 DQ 8×24V be assigned as a PTO output on a CPU 1215C?
No. The S7-1200 PTO pulse generator is implemented inside the CPU silicon and is wired only to the onboard transistor outputs (Q0.0–Q0.7 on a 1215C) and to the Signal Board outputs. SM 1222 modules sit on the asynchronous I/O bus and have no hardware path to the PTO generator, so TIA Portal will not list any SM 1222 output in the PTO assignment dropdown. Use the onboard outputs and an SB 1222 for the fourth axis, or move to a multi-CPU / fieldbus stepper drive architecture.
Why does the SB 1222 configure PTO automatically while the SM 1222 does not?
The Signal Board plugs into a dedicated connector on the front of the CPU and shares the CPU's high-speed output bus, so the PTO generator signals are routed directly to the SB output drivers. TIA Portal recognises this hardware path and populates the SB pins in the PTO list automatically. The SM 1222 sits on the right-side I/O bus, which is a general-purpose bus not connected to the PTO generator, so no PTO path exists.
How many stepper motors can one CPU 1215C control via PTO?
Up to four. The CPU 1215C exposes up to four PTO channels (PTO1–PTO4), with the first three typically mapped to Q0.0/Q0.1, Q0.2/Q0.3, and Q0.4/Q0.5. The fourth axis is mapped to Q0.6/Q0.7 by default, or to the SB 1222 outputs if an SB is installed and the first three onboard pairs are in use. Maximum pulse rate is 100 kHz per channel on the 1215C.
What SB 1222 catalog number is required for PTO axis 4?
Use the SB 1222 DQ 4×24V (Siemens article 6ES7222-1AD30-0XB0) for 24V stepper drives, or the SB 1222 DQ 4×5V (6ES7222-1AD50-0XB0) for 5V TTL stepper drives. Both provide four 0.5A outputs sourced from the high-speed bus. The SB 1223 (mixed DI/DO) and the SB 1221 (input-only) variants are not PTO-capable.
Can PWM be used on the SM 1222 instead of PTO?
No. The PWM generator shares the same hardware block and bus as the PTO generator and is similarly restricted to the CPU onboard transistor outputs and the Signal Board. The SM 1222 cannot source a PWM signal. If a slow PWM is acceptable (period ≥ 1 ms), emulate it with a regular digital output toggled by a cyclic OB.
Where can I find the official TIA Portal reference for connecting PTO outputs to a positioning axis?
The official Siemens TIA Portal help portal publishes the technology-object wiring reference at docs.tia.siemens.cloud under Technology objects > S7-1200 Motion Control > Connecting PTO outputs. Use this in combination with the S7-1200 System Manual and the CPU 1215C datasheet on the Siemens Industry Online Support portal.