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.
The Important Difference: Macro 17 vs Macro 18
| Behaviour | Macro 17 (method 1) | Macro 18 (method 2) |
|---|---|---|
| No direction requested | OFF1 stop | OFF1 stop |
| One direction active | Runs that way | Runs that way |
| New direction while moving | Accepted only at standstill | Accepted while moving |
| Both signals on | First command keeps direction | Stop request |
| Typical setting | p3334 = 1 | p3334 = 2 |
Try it: switch CW and CCW (maintained), change the macro, and watch the speed trace. The demo runs both methods until you click.
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.
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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 4–20 mA speed from the PLCAQ0 current → AI0 (3/4) on screened -W2. DIP I, p0756 = 3, so a broken loop is detected.
- 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.
| From | To CU240E-2 | Signal | Check |
|---|---|---|---|
| -S1 R / PLC DQ0 | 5 (DI0) | ON/OFF1 CW | r0722.0 |
| -S1 L / PLC DQ1 | 6 (DI1) | ON/OFF1 CCW | r0722.1 |
| -S3 / PLC DQ2 | 7 (DI2) | Acknowledge | r0722.2 |
| -R2 pot / PLC AQ0 | 1·3·2 (link 4–2) / 3·4 | Speed reference | r0755 |
| 20 → 19 | -H1 / PLC DI | Fault relay | provoke a fault |
| M | 69, 28, 32 | Commons, 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
Troubleshoot Start, Reverse and Restart
| Symptom | Ask |
|---|---|
| Reverse request seems ignored | Macro 17 waiting for standstill? |
| Both requests give an odd result | Which method is active, and which signal came first? |
| Inputs change, drive stays stopped | Command source, reference, drive state, permissives? |
| Runs only while the button is held | Momentary button on two-wire control: use three-wire |
| Unexpected run after restart | Maintained 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- 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.
Both off, then one direction
Start with both off. Switch CW on, then off, and watch the ramp to standstill. Repeat for CCW.
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.
Both on
With motion inhibited or at a low reference, switch both on in both orders.
Record a trace
Use a trace or timestamps, not a screenshot, to show which signal came first.
Restart check
Trip a test fault with a direction still on, then reset under the approved procedure.
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.