Overview
This reference covers connecting a third-party PWM DC motor speed controller to a Siemens SIMATIC S7-1500 PLC and programming the speed reference in TIA Portal. PWM DC motor speed controllers in the hobby and small-industrial class typically accept an external reference signal (0–10 V, 0–5 V, or 4–20 mA) either in parallel with or in place of the on-board potentiometer. The S7-1500 generates this reference through an analog output module, and TIA Portal converts a normalized REAL speed setpoint into the raw 16-bit output word using the SCALE function block.
Resolve one ambiguity before any wiring: the field report describes the speed controller as "controlled with a potentiometer and not with an external PLC." That phrasing means the input stage is almost certainly a resistive divider network on the PCB, not an isolated analog front end. Whether you can parallel an external 0–10 V source with the existing potentiometer, or whether the potentiometer must be removed and the external signal injected at the wiper pad, depends on the specific controller. Do not assume 0–10 V compatibility without measuring the input impedance and confirming the input voltage range against the controller datasheet.
Identifying the PWM Controller Interface
Before running a single wire, classify the controller's speed-reference input into one of three categories. Each requires a different wiring, grounding, and programming strategy.
| Input Type | Behavior | Detection Method | S7-1500 Drive Method |
|---|---|---|---|
| External voltage (0–10 V) | Accepts an analog signal at a dedicated terminal; on-board pot is optional or absent. | Look for terminals labeled "+10V IN", "SPEED IN", "EXT", "REF", or similar. Datasheet lists input impedance ≥ 10 kΩ. | SM 532 analog output in voltage mode. |
| Potentiometer replacement | PCB has three pads (CW, wiper, CCW). External 0–10 V is wired across CW/CCW and the PLC output is tied to the wiper pad. | Open the enclosure. Find three through-holes near the potentiometer footprint. Resistance between end pads reads 5 kΩ or 10 kΩ. | SM 532 analog output in voltage mode, output injected at wiper pad. |
| Digital PWM input | No analog input; speed is set only by the duty cycle of a digital PWM signal at TTL/CMOS levels. | Datasheet specifies PWM input or frequency range. No analog input terminals present. | Not possible from a standard analog output. Use PTO / high-speed counter PWM, or generate PWM on a DQ output and add an RC filter. |
If the controller falls into the third category, the S7-1500 cannot drive it directly through a standard analog output. Use the PTO function on a Technology CPU (CPU 1511T–1518T), or configure a high-speed counter for PWM, or insert a first-order RC filter on a standard DQ output to convert PWM to a slow analog voltage. This article focuses on the analog-output case, which is the most common.
Prerequisites
- SIMATIC S7-1500 CPU (any current firmware variant). Verify the CPU's specific manual for maximum number of supported I/O modules and the firmware version compatible with your TIA Portal release.
- S7-1500 analog output module installed in the same rack as the CPU, or on ET 200MP distributed I/O behind PROFINET.
- 24 V DC load supply (e.g., SIMATIC PS 60 W 120/230 V AC) sufficient for the analog output loop if voltage mode is used and the controller draws significant input current.
- PWM DC motor speed controller with documented external analog input range (0–10 V is by far the most common; ±10 V is rare in this category; 4–20 mA appears on some industrial units).
- DC motor with rated current below the controller's continuous output rating.
- True-RMS multimeter for commissioning.
- TIA Portal V15 or later (matching the CPU firmware generation).
- S7-1500 / ET 200MP system manual and the S7-1500 / ET 200MP analog modules function manual available as references (Siemens Industry Online Support).
S7-1500 Analog Output Module Selection
The S7-1500 family supports multiple analog output modules. Choose based on the number of axes, the required update rate, and whether the application needs current or voltage output.
| Module | Order Number | Outputs | Resolution | Voltage Range | Current Range | Update Time |
|---|---|---|---|---|---|---|
| SM 532 AQ 4xU/I ST | 6ES7532-5HD00-0AB0 | 4 | 16 bit | 0–10 V; ±10 V | 0–20 mA; 4–20 mA; ±20 mA | Standard |
| SM 532 AQ 8xU/I HS | 6ES7532-5HF00-0AB0 | 8 | 16 bit | 0–10 V; ±10 V | 0–20 mA; 4–20 mA; ±20 mA | High speed |
For a single PWM DC motor in unipolar voltage mode (0–10 V), the SM 532 AQ 4xU/I ST is the typical choice. The HS (high-speed) variant is justified only when update time or output bandwidth is critical — uncommon for a motor-speed reference. For details on pin assignments and the supported wiring diagrams (including the page 4038 reference from the field report), consult the S7-1500 / ET 200MP analog modules function manual under Siemens Industry Online Support.
Hardware Topology
The reference architecture for this application is intentionally small. The S7-1500 CPU sits in slot 1 with a system power supply in slot 0; the SM 532 occupies the next free slot. The analog output channel 0 drives the controller's speed reference input through a shielded twisted-pair cable. The DC motor is wired to the controller's power output stage; the PLC does not switch motor current directly.
[S7-1500 CPU] --> [SM 532 AQ] --> shielded U+, M- --> [PWM Controller speed in]
|
[On-board pot]
|
[DC Motor output]
|
[DC Motor]
Wiring Procedure
The analog output uses a 2-wire voltage connection to the PWM controller's speed-reference input. Shielded twisted-pair cable is mandatory for any cable run longer than approximately 0.5 m to reject the noise radiated by the DC motor's commutator.
- Power down the S7-1500 and the PWM controller. Lock and tag the disconnect.
- Identify the analog output channel on the SM 532 (for example, channel 0: terminals U0 and M0 on the front connector).
- Run shielded twisted-pair cable from U0 to the controller's "speed in", "REF", or potentiometer-wiper terminal.
- Connect M0 (analog ground) to the controller's analog ground terminal. Do not tie this conductor to PE or to the motor's high-current power ground.
- Ground the cable shield at the cabinet entry panel only. Leave the controller end floating or terminated through a small (10 nF) capacitor to chassis ground.
- If the controller expects a potentiometer replacement, disconnect the on-board potentiometer's wiper from the PCB pad and inject the PLC signal at that pad instead. Otherwise, leave the pot connected and inject the PLC signal at the external-input terminal if one is provided.
- Verify polarity with a multimeter in continuity mode before applying power.
- Power up the S7-1500 first, then the controller.
TIA Portal Device Configuration
- Open TIA Portal and load the project containing the S7-1500 station.
- In the device view, add the SM 532 AQ module to the rack at the configured slot. The slot is part of the hardware catalog.
- Select the module and open Properties > Analog outputs.
- For the channel in use (for example, channel 0), configure:
- Output type:
Voltage - Output range:
0..10 V - Diagnostics: enable Wire break only if your controller input is current-mode or high-impedance. For typical 0–10 V voltage inputs into a 5 kΩ–10 kΩ resistive divider, leave wire-break disabled to avoid nuisance diagnostics.
- Substitute value: enter a safe value, for example
0(corresponds to 0 V / motor off), so a CPU stop does not command full speed.
- Output type:
- Compile and download the hardware configuration to the CPU.
PLC Programming: The SCALE Block
The S7-1500 analog output accepts a 16-bit integer in the range 0 to 27648 for unipolar 0–10 V. The standard TIA Portal approach is to take a normalized REAL value (0.0–100.0 % speed) from the application logic and convert it through the SCALE function block, available in the "Scaling" library under "Converters." The field report calls this function "scale" and lists the inputs directly: value in REAL, low limit in REAL, high limit in REAL, bipolar BOOL, output address. That description matches the SCALE block shipped with TIA Portal.
// Speed setpoint in percent (REAL, e.g., 0.0 to 100.0)
"DB_Motor".sp_percent := 75.0;
// SCALE: convert REAL percentage to integer raw output word
"SCALE_DB"(
IN := "DB_Motor".sp_percent, // REAL: 0.0 ... 100.0
IN_MIN := 0.0, // REAL low limit of input
IN_MAX := 100.0, // REAL high limit of input
OUT_MIN := 0, // INT low limit of output
OUT_MAX := 27648, // INT high limit of output (0..10 V)
OUT => "DB_Motor".raw_out // INT: raw value written to PAW
);
// Write to peripheral output word of SM 532 channel 0
%QW0 := "DB_Motor".raw_out;
The block's parameters map directly to the S7-1500 / ET 200MP manual's SCALE description:
| Parameter | Direction | Type | Meaning | Example (0–10 V) |
|---|---|---|---|---|
| IN | Input | REAL | Value to be scaled | 75.0 (% speed) |
| IN_MIN | Input | REAL | Low limit of input range | 0.0 |
| IN_MAX | Input | REAL | High limit of input range | 100.0 |
| OUT_MIN | Input | REAL | Low limit of output (raw) | 0 |
| OUT_MAX | Input | REAL | High limit of output (raw) | 27648 |
| bipolar | Input | BOOL | FALSE for 0–10 V; TRUE for ±10 V | FALSE |
| OUT | Output | REAL or INT | Scaled result written to PAW | 20736 (= 75 % of 27648) |
For ±10 V bipolar mode, set bipolar := TRUE and use OUT_MIN := -27648, OUT_MAX := 27648. Most PWM DC motor controllers do not accept bipolar references; stay in unipolar 0–10 V unless the controller datasheet specifies otherwise.
Commissioning and Verification
- With the motor mechanically disconnected (or with the controller's enable input de-energized), force
sp_percent := 0.0and verify the analog output reads 0.00 V DC at the controller terminals with a true-RMS multimeter. - Force
sp_percent := 50.0; verify 5.00 V DC (±0.05 V) at the controller terminals. - Force
sp_percent := 100.0; verify 10.00 V DC (±0.05 V) at the controller terminals. - Restore the field wiring to the motor. Enable the controller only with the PLC in RUN and the setpoint at zero. Then ramp the setpoint from 0 % to 100 % in 10 % steps and observe the motor shaft speed. Confirm a monotonic speed response without oscillation or hunting.
- Remove the force and let the application logic drive the setpoint. Verify substitute-value behavior by stopping the CPU: the output should drop to the configured substitute value (0 V) and the motor should coast to a stop rather than snap to full speed.
- Monitor the analog output channel's status word in TIA Portal online view. A wire-break diagnostic would indicate the input impedance is too high for the selected current mode, or the cable is genuinely open.
Troubleshooting Matrix
| Symptom | Likely Cause | Action |
|---|---|---|
| Output reads 0 V regardless of setpoint | Module not configured; PAW address wrong; substitute value is 0; wrong slot | Check device configuration in TIA Portal; verify the channel is enabled; check substitute-value behavior in CPU STOP |
| Motor runs at full speed with PLC commanded 0 % | Potentiometer wiper still connected in parallel with PLC output; substitute value is 10 V; pot was not disconnected | Disconnect the on-board pot; configure a 0 V substitute value; verify with a multimeter that U0 → wiper reads 0 V when commanded 0 % |
| Motor speed oscillates or jitters | Ground loop; unshielded cable; PWM switching noise coupling into analog reference | Use shielded cable grounded at cabinet only; isolate analog ground from motor power ground; add a 100 nF ceramic in parallel with a 10 µF electrolytic capacitor on the controller input as an RC filter |
| Wire-break diagnostic on a voltage channel | Channel is configured as current; input impedance is too high for the load | Switch channel to voltage mode; if the cable is genuinely broken, repair it |
| Output saturates at 27648 with setpoint below 100 % | IN_MAX set too low in SCALE; upstream REAL is clipped or multiplied | Check IN_MIN/IN_MAX values; trace the upstream calculation in the program |
| No analog output module in the project | SM 532 not added to the rack or to ET 200MP | Add the module in TIA Portal device view, assign the slot, compile, and download |
| SF (system fault) LED on the SM 532 | Channel diagnostic active; configuration mismatch; missing load supply | Open the diagnostic buffer in TIA Portal; correct the configuration or the wiring |
| Motor runs only at one direction despite PLC requesting both | Forward-brake-reverse switch hardwired on the controller; no PLC direction outputs wired | See the section below on PLC-controlled direction |
Forward / Brake / Reverse Considerations
Many PWM DC motor speed controllers include a forward-brake-reverse switch on the front panel. If the application needs PLC-controlled direction, that switch must be replaced or supplemented with two PLC-controlled digital outputs wired to the direction-select terminals on the controller PCB. The S7-1500 digital output modules (for example, DQ 16x24VDC/0.5A ST) are suitable. Implement interlock logic in the PLC to prevent the simultaneous assertion of forward and reverse; that combination effectively short-circuits the H-bridge in the controller and will destroy it within seconds.
Notes on PWM vs. Analog Reference
The phrase "PWM DC motor speed controller" is overloaded in commerce. Three interpretations exist, and the field report does not specify which applies.
- The controller's output stage uses PWM to drive the DC motor, and the speed reference input is an analog voltage. The S7-1500 analog output drives this case directly.
- The controller's speed reference input is a digital PWM signal (duty cycle equals speed). The S7-1500 must generate this signal from a PTO channel on a Technology CPU, from a high-speed counter PWM, or by using a standard DQ output through an RC filter. The analog output cannot produce it.
- The controller has no external reference input at all; speed is set only by the on-board potentiometer. The only PLC-friendly way to drive it is to replace the potentiometer with a digital potentiometer (for example, a 256-tap digital pot controlled via SPI from a third-party module) or to inject an external voltage at the wiper pad on the PCB.
Confirm by inspecting the controller's PCB and the manufacturer's datasheet before wiring. If the controller documentation is unavailable, the safest assumption is that the potentiometer wiper is a direct resistive node; in that case, inject the 0–10 V signal at the wiper pad with the pot removed, and verify the maximum input voltage rating with a multimeter before connecting the PLC.
Selecting Compatible PWM Controllers
When sourcing a PWM DC motor speed controller for PLC integration, prioritize models that explicitly document an external analog input. Industrial-grade units typically expose terminals labeled "0–10 V IN", "4–20 mA IN", or "SPEED REF" and include electrical specifications in the datasheet. Consumer-grade and hobby units frequently omit this documentation and rely on the on-board potentiometer as the only speed-setting mechanism. Searching industrial suppliers and reviewing the datasheet for the input impedance and voltage range is the fastest path to compatibility with the S7-1500 analog output. Refer to the Siemens SIMATIC S7-1500 product page and the S7-1500 / ET 200MP analog modules function manual on Siemens Industry Online Support for the full module specification.
Field-Commissioning Checklist
- Confirm the controller's input voltage range before applying any signal.
- Measure the input impedance with the pot removed (expect 5 kΩ or 10 kΩ typical).
- Verify the wiring polarity and shield grounding before applying 24 V to the controller.
- Configure the SM 532 substitute value to a safe state (0 V).
- Run the S7-1500 in STOP first to confirm substitute behavior; the motor must not move.
- Switch the CPU to RUN, command 0 %, then 10 %, then 50 %, then 100 %; verify each voltage with a multimeter.
- Enable the motor; ramp the setpoint slowly and observe the speed.
- Re-check the controller's heatsink temperature after 30 minutes of full-speed operation.
- Document the final configuration and save the TIA Portal project.
FAQ
Can the S7-1500 CPU's onboard analog outputs drive a PWM motor controller without an SM 532?
The standard S7-1500 CPUs (CPU 1511 through CPU 1518) do not include onboard analog outputs. You must add an SM 532 AQ module to the central rack or to an ET 200MP station. Only certain S7-1500 technology CPUs and compact CPUs include additional onboard I/O; verify against the specific CPU's datasheet.
What raw output value corresponds to 0–10 V on the SM 532?
Unipolar 0–10 V maps to integer range 0 to 27648. Bipolar ±10 V maps to -27648 to +27648. The SCALE block handles the conversion; do not pass 0–100 % percentages directly to the PAW without scaling.
How do I scale a 0–100 % speed setpoint to a 4–20 mA output?
Change the SM 532 channel configuration to current mode 4–20 mA, then set SCALE OUT_MIN = 0 and OUT_MAX = 27648 in the same way as the voltage case. The current output is linear in the same raw value range, with 0 corresponding to 4 mA and 27648 corresponding to 20 mA.
Why does the motor command full speed when the PLC goes into STOP?
The SM 532 substitute value is configured to 100 % (27648) or to "keep last value." Change the substitute value in the device configuration to 0 (0 V). For safety-critical applications, add a hardware interlock that removes power to the controller when the PLC is not in RUN.
Can I use a digital output with PWM from the S7-1500 to drive the controller?
Only if the controller accepts a digital PWM reference. If it does, configure the S7-1500 PWM output on a PTO channel of a Technology CPU or on a high-speed counter, not on a standard DQ. Most low-cost PWM controllers sold for hobby or small-industrial DC motors expect an analog reference rather than a digital PWM reference.