Skip to main content
Siemens · Level 01 practical guide

SINAMICS G120 Two-Wire Control: Macro 17 and Macro 18

See what a maintained command means, try macro 17 against macro 18 in a live simulator, and wire it from EPLAN-style drawings.

2,500+ engineers trained 4.9/5 Google rating 21+ years, Chinchwad, Pune Next batch: contact for dates
Quick answer

Macros 17 and 18 use maintained commands: DI0 = ON/OFF1 clockwise and DI1 = ON/OFF1 counter-clockwise, DI2 = acknowledge, AI0 = speed. Macro 17 accepts a new direction only at standstill and keeps the first command if both are on. Macro 18 can reverse while moving and stops if both are on.

  • The contact is the run command, so use a maintained selector.
  • Choose 17 or 18 for its both-on and reversing behaviour.
  • Interlock CW/CCW in the PLC.
  • Design restart permission separately.

What Two-Wire Control Means

The drive runs while the command stays on, and stops (OFF1) when it is removed. “Two-wire” describes the command method, not the number of conductors.

Two-wire maintained command animationA maintained selector holds DI0 high and the motor runs; opening it gives OFF1; a spring-return button only runs while held.Maintained selectorDI0r0722.0 = 1Maintained switch closedDI0 = 1 → running CWMaintained selectorDI0r0722.0 = 0Switch openedDI0 = 0 → OFF1, ramps to stopMomentary buttonDI0r0722.0 = 0Spring-return button releasedRun request drops → stops at once
Two-wire = the contact is the run command. For a momentary START, use three-wire control.

The Important Difference: Macro 17 vs Macro 18

BehaviourMacro 17 (method 1)Macro 18 (method 2)
No direction requestedOFF1 stopOFF1 stop
One direction activeRuns that wayRuns that way
New direction while movingAccepted only at standstillAccepted while moving
Both signals onFirst command keeps directionStop request
Typical settingp3334 = 1p3334 = 2

Try it: switch CW and CCW (maintained), change the macro, and watch the speed trace. The demo runs both methods until you click.

+500−50last 20 s →
r0722 bits (DI 0 … 5)
012345
Actual speed
+0.0 Hz
Stopped

Simulator: 30 Hz reference, 15 Hz/s ramp. Real timing follows the firmware timing diagram for your drive.

Test macros 17–20 on real hardware

G120 two-wire and three-wire control with PLC logic and live traces — Pune or online.

Book a Free Demo Class

EPLAN Wiring: Local Selector and PLC

Sheet 1 shows a local panel with a maintained L–0–R selector. Sheet 2 shows a PLC giving interlocked direction outputs and a 4–20 mA speed reference.

Step 1 / 7
G120 two-wire EPLAN wiring with local maintained selectorMaintained L-0-R selector -S1 on DI0 clockwise and DI1 counterclockwise, acknowledge pushbutton on DI2, speed potentiometer on AI0, fault lamp on relay DO0.0123456789ABCDEFSoftwell AutomationIndustrial Automation Training · PuneEPLAN-style training drawing=DRV+CP1 · SINAMICS G120 drive panelTwo-wire · local selectorDrive: PM240-2 + CU240E-2Macro p0015 = 17 / 18Wiring: source (PNP) · PELV 24 VIEC 81346 · IEC 60204-1Rev: B (best practice)Reviewed: B. K. SinghSheet1 / 2L+PELV 24 V, fusedMCU supplyDI COM1 → MGND → M-U1 SINAMICS CU240E-2 · macro 17 / 18macro 17 = method 1 · macro 18 = method 2 · AI0 DIP = U, p0756 = 03124 V IN5DI06DI17DI21+10 V3AI0+4AI0−2GND20DO0 COM320 V IN69DI COM134DI COM219DO0 NO28GNDX1:1-S1CW (R)X1:2-S1CCW (L)-S1 selector L–0–R, maintainedholds the run requestX1:3-S3ack-R2 speed pot4–2CU shield plate-H1faultℹ Restart behaviourA maintained command still ON after a fault resetor power return can restart the motor.Define restart permission in the design.Wire colours · IEC 60204-1AC power L1–L3 / U–W (black)Neutral N (light blue)DC control L+ (dark blue)DC 0 V M (blue-white)PE (green-yellow)G120 two-wire EPLAN wiring with PLC controlPLC outputs DQ0 and DQ1 interlocked for clockwise and counterclockwise, DQ2 acknowledge, PLC 4–20 mA output on AI0, fault relay to PLC input.0123456789ABCDEFSoftwell AutomationIndustrial Automation Training · PuneEPLAN-style training drawing=DRV+CP1 · SINAMICS G120 drive panelTwo-wire · PLC controlDrive: PM240-2 + CU240E-2Macro p0015 = 17 / 18Wiring: source (PNP) · PELV 24 VIEC 81346 · IEC 60204-1Rev: B (best practice)Reviewed: B. K. SinghSheet2 / 2L+PELV 24 V, fusedMCU supplyDI COM1 → MGND → M-A1 PLC I/ODQ0 = CW · DQ1 = CCW (interlocked) · DQ2 = ack · AQ0 = speed · DI = faultDQ0DQ1DQ2AQ0 IAQ0 MDI a.0PLC L+PLC M = drive M-U1 SINAMICS CU240E-2 · macro 17 / 18macro 17 / 18 · AI0 DIP = I · p0756 = 3 (4–20 mA monitored)3124 V IN5DI06DI17DI23AI0+4AI0−19DO0 NO20DO0 COM320 V IN69DI COM134DI COM228GNDX1:1X1:2X1:3PLC logic: never DQ0 and DQ1 together-W2 screened4–20 mACU shield platerelay → PLCℹ PLC restartClear DQ0/DQ1 at PLC start-up and after faults;set them again only with operator permission.Wire colours · IEC 60204-1AC power L1–L3 / U–W (black)Neutral N (light blue)DC control L+ (dark blue)DC 0 V M (blue-white)PE (green-yellow)
  1. Supply and commonsFused PELV L+ goes to 31, and 32 goes to M. DI COM1 (69) and GND (28) go to M for source wiring.
  2. Maintained direction selectorIn two-wire control the run request lasts as long as the contact is closed. -S1 is a maintained L–0–R selector: R → DI0 (ON/OFF1 CW), L → DI1 (ON/OFF1 CCW), and 0 = OFF1. A spring-return button does not fit two-wire control.
  3. Acknowledge and speedPushbutton -S3 → DI2 acknowledges faults. Speed pot -R2 on 1/3/2 (link 4–2), screened, with the shield on the plate. DIP U, p0756 = 0.
  4. Fault relay and restartDO0 relay → -H1. A selector left in R or L restarts the motor once the fault is reset, so define restart permission.
  5. PLC direction outputsPLC DQ0 → DI0 (CW), DQ1 → DI1 (CCW), DQ2 → DI2 (ack). Interlock in the PLC so both outputs are never on together. Their effect differs between macro 17 and macro 18.
  6. 4–20 mA speed from the PLCAQ0 current → AI0 (3/4) on screened -W2. DIP I, p0756 = 3, so a broken loop is detected.
  7. Feedback and PLC restartDO0 relay → PLC DI. At PLC start-up and after a fault reset, clear DQ0/DQ1 and set them again only with permission.
EPLAN-style drawings with IEC 81346 tags and IEC 60204-1 wire colours. Orange marks the circuit being explained.
FromTo CU240E-2SignalCheck
-S1 R / PLC DQ05 (DI0)ON/OFF1 CWr0722.0
-S1 L / PLC DQ16 (DI1)ON/OFF1 CCWr0722.1
-S3 / PLC DQ27 (DI2)Acknowledger0722.2
-R2 pot / PLC AQ01·3·2 (link 4–2) / 3·4Speed referencer0755
20 → 19-H1 / PLC DIFault relayprovoke a fault
M69, 28, 32Commons, 0 V—

Training drawings for a CU240E-2. Check terminals against the manual for your CU and firmware. Power, EMC and STO: G120 wiring guide.

Restart Behaviour: Design It, Don’t Discover It

Two-wire restart after fault reset animationWith a maintained command still active, resetting a fault lets the drive restart without a new operator action.-S1 selectorposition: RDriveRUNRunning CW · selector in R-S1 selectorposition: RDriveFAULTFault → drive trips, selector still in R-S1 selectorposition: RDriveRUN (auto)Fault reset → motor restarts by itself ⚠
Design restart permission: PLC start-up logic, a reset that requires the selector at 0, or three-wire control.

Troubleshoot Start, Reverse and Restart

SymptomAsk
Reverse request seems ignoredMacro 17 waiting for standstill?
Both requests give an odd resultWhich method is active, and which signal came first?
Inputs change, drive stays stoppedCommand source, reference, drive state, permissives?
Runs only while the button is heldMomentary button on two-wire control: use three-wire
Unexpected run after restartMaintained command or retained PLC bit still on?

For momentary START/STOP panels see three-wire control; for the speed reference see analogue scaling.

Practical Lab: Log a Direction-Change Sequence

Hands-on
Before you start
  • A G120 with CU240E-2 on a training rig, macro 17 or 18 applied, motor uncoupled.
  • A watch table: CW request, CCW request, r0722, speed setpoint, actual speed, status word. Estimated time: 40 minutes.
1

Both off, then one direction

Start with both off. Switch CW on, then off, and watch the ramp to standstill. Repeat for CCW.

Each direction runs and stops with OFF1.
2

Change direction while running

Only if the machine is approved for it: switch CW → CCW while moving, first on macro 17 and then on macro 18.

Macro 17 waits for standstill; macro 18 reverses directly.
3

Both on

With motion inhibited or at a low reference, switch both on in both orders.

Macro 17 keeps the first command; macro 18 stops.
4

Record a trace

Use a trace or timestamps, not a screenshot, to show which signal came first.

The order of events is recorded.
5

Restart check

Trip a test fault with a direction still on, then reset under the approved procedure.

The restart behaviour matches the written requirement.
Checkpoint — how to know you did it right

Every sequence matches the selected method and the written requirement, including both-on and restart cases, and the PLC output behaviour is recorded with the drive settings.

Frequently asked questions

Are macros 17 and 18 interchangeable?

No. They handle a new direction request and simultaneous commands differently. Macro 17 (method 1) accepts a new direction only at standstill and keeps the first command if both are on. Macro 18 (method 2) can change direction while moving and treats both-on as stop.

What does two-wire control mean on a G120?

The run request is a maintained contact or PLC output: the drive runs while DI0 (CW) or DI1 (CCW) stays on, and stops with OFF1 when it is removed. It does not mean only two wires are used.

Can I use a spring-return start button with macro 17 or 18?

No. With two-wire control the motor runs only while the button is held. For a momentary start with a latched run, use three-wire control (macro 19 or 20).

Why did my motor restart after a fault reset?

The maintained direction command was still on. Design restart permission: clear the PLC outputs at start-up and after faults, or require the selector at 0 before a new start.

Which parameter sets the two-wire method?

The macro sets it, commonly shown as p3334 = 1 (method 1, macro 17) or 2 (method 2, macro 18). Check the online connections, because a modified project may no longer match its preset.

Will removing a direction request give a safety stop?

No. It gives the configured operational OFF1 stop. A safety stop needs the machine’s separate, validated safety function such as STO.

Technical references

Use the edition that matches your hardware and firmware. The manuals establish the device facts; the simulators, animations and drawings are training examples.

Reviewed by Bhawesh Kumar Singh Industrial Automation Trainer and Industry 4.0 Consultant · Softwell Automation · 21+ years industry experience

Get the full syllabus + free demo class

Share your details — a Softwell training advisor will call you within 24 hours with batch dates, fees and hardware access options.

No spam. Used only to share course details for this enquiry.

Learn with practical industrial examples

Join live online, Pune classroom or corporate in-plant automation training.

Request Course Details
Verified learning pathway

Turn This Concept into a Practical Skill

Apply this topic through PLC, SCADA, networking or Industry 4.0 laboratory exercises.

Content reviewed: 29 October 2026

☎ Call WhatsApp ✉ Email Enquire Now