For single-axis/simple scenarios, pulse control (hardwiring) is selected; for multi-axis/high-precision linkage, bus communication (such as EtherCAT) is used. The key lies in signal matching, parameter consistency, and strict grounding. A stable connection can be quickly achieved by following the four-step debugging process: 'wiring → configuration → no-load → load'.
There are two main methods for connecting servo drives to PLCs: pulse control (hardwiring) and bus control (communication). The choice depends on the number of axes, synchronization accuracy, and wiring complexity-pulse control is used for single-axis/simple scenarios, while bus control is used for multi-axis/high-precision linkage. The following are detailed connection steps, parameter configurations, and practical points, balancing ease of understanding for beginners with industrial practicality:
I. Overview of Core Connection Methods (Choose the Right Solution First)
| Connection method | Core features | Applicable Scenarios | Wiring complexity | Synchronization accuracy |
|---|---|---|---|---|
| Pulse control (wiring) | Using pulse/direction hard transmission commands requires separate enable and limit connections. | Single-axis/dual-axis, low-speed, simple motion (such as the ejector pin shaft of an injection molding machine). | Higher (4-6 wires per axis) | Medium (±0.1mm) |
| Bus control (communication) | A single bus connects all axes, integrating command/feedback/safety signals. | Multi-axis linkage and high-precision scenarios (such as multi-axis collaboration in injection molding machines) | Extremely low (all axes share 1 bus) | Extremely high (±μm level) |
Quick selection: 1-2 axes, no synchronization requirement → pulse control; 3 axes or more, multi-axis synchronization required → bus control (such as EtherCAT/Profinet).,
II. Option 1: Pulse Control (Hardwiring, the most common introductory option)
This method sends position/speed commands to the servo driver via the PLC's high-speed pulse output terminals, combined with hardwiring to transmit enable, limit, and other signals, eliminating the need for complex communication configurations.
(1)Hardware Wiring (Core Terminal Correspondence)
The servo driver requires connection to three types of signals: pulse/direction signals, enable signals, and limit/origin signals (some can be omitted, such as connecting the origin signal to the driver). Before wiring, it is necessary to confirm that the PLC output type (NPN/PNP) matches the driver input type.
| Signal Type | PLC side terminals | Servo driver side terminals (general markings) | Wiring instructions |
|---|---|---|---|
| Pulse command (PULSE) | High-speed output terminal (e.g., Q0.0) | PUL+ (positive terminal), PUL- (negative terminal) | Connect using shielded twisted-pair cable, with PUL connected to PLC signal ground (M) to avoid interference |
| Direction command (DIR) | High-speed output terminal (e.g., Q0.1) | DIR+ (positive terminal), DIR- (negative terminal) | The pulse line is wired in pairs, and DIR is also connected to the PLC signal ground |
| Servo enable (ENABLE) | General output terminal (e.g., Q0.2) | EN+ (positive terminal), EN- (negative terminal) | Active low / Active high requires matching driver parameters. |
| Emergency stop / Safety signal | General input terminal (e.g., I0.0) | STO1/STO2 (Safety Related) | Normally closed contact, disconnects motor torque when open (hard wiring optional) |
| Limit signal (positive / negative) | General input terminal (e.g., I0.1/I0.2) | EL+/EL- (positive/negative limit) | Protects the motor from overtravel; can be connected to a PLC or driver |
| Origin signal (ORG) | General input terminal (e.g., I0.3) | ORG+/ORG- (enter at origin) | Connect to the origin switch; it can be connected to a PLC (complex logic) or a driver (simple logic) |
Wiring Notes:
Pulse/direction lines must use shielded twisted-pair cable, with the shield grounded at one end (grounding resistance < 4Ω), and a distance ≥ 20cm from the power line;
If the PLC output is NPN type (active low), the driver must be set to "sinking input" (parameters such as Panasonic Pr057 = 0); for PNP type, it should be set to "source input".
(2) Core Parameter Configuration (PLC + Driver)
Servo Driver Parameters (3 Key Steps)
- Control Mode: Set to "Position Mode" (e.g., Huichuan SV660N parameter P2-00=1, pulse position mode);
- Pulse Input Type: Select "Pulse + Direction" mode (e.g., Panasonic Pr056=0), matching the PLC output logic;
- Electronic Gear Ratio (EGR): Calculated according to mechanical requirements, ensuring that the number of pulses sent by the PLC matches the actual motor speed;
Example: Motor encoder resolution 2500 lines (10000 pulses/revolution), mechanical transmission ratio 1:1, requires 10000 pulses per motor revolution → EGR=1 (10000×1/10000).
PLC Parameter Configuration
- Enable High-Speed Pulse Output: Configure Q0.0/Q0.1 as "High-Speed Counter Output" in TIAPortal, and select "Pulse + Direction" mode;
- Set Pulse Frequency/Quantity: Send position commands via the instruction `PLS_MOVE` (e.g., sending 10000 pulses = 1 motor revolution), or send speed commands via `PLS_SPEED`;
- Enable Logic: After the PLC outputs Q0.2 (enable signal) at a high level and the servo driver is ready (panel displays "Ready"), then send pulse commands.
(3) Debugging and Verification Steps
- Wiring Check: Use a multimeter to measure whether the enable signal is valid (e.g., when Q0.2 is on, there should be voltage between the driver's EN+ and EN-).
- No-Load Test: Disconnect the motor from the load, send a 1000-pulse command from the PLC, and observe whether the motor moves slightly (no jamming, no alarm).
- Load Test: After connecting the load, send continuous pulses to verify whether the motor movement is consistent with the command (e.g., the position feedback deviation from the command is < ±10 pulses).
III. Option 2: Bus Control (Communication, Optimal Multi-Axis Solution)
The PLC and all servo drives are connected in series via an industrial bus (such as EtherCAT/Profinet). All signals (commands, feedback, alarms, safety functions) are transmitted through the bus, simplifying wiring.
1. Hardware Wiring (Core 3 Steps)
- Bus Topology: Use a linear topology (PLC master → Servo drive 1 → Servo drive 2 → ... → terminating resistor). EtherCAT/Profinet supports up to 65535 slave stations.
- Cable Selection: Use dedicated bus cables (such as EtherCAT cables with a characteristic impedance of 100Ω, Profinet cables CAT5e and above). Both ends must be connected to terminating resistors (120Ω).
- Grounding and Wiring: The bus cable shield is grounded at one end. Avoid running the cable parallel to the power lines to reduce packet loss caused by electromagnetic interference.
| Equipment Role | Terminal blocks (using EtherCAT as an example) | Illustrate |
|---|---|---|
| PLC Master Station | EtherCAT IN/OUT | No terminating resistor is needed at the start of the bus cable |
| Intermediate Servo Drivers | EtherCAT IN/OUT | Connect in series, with IN connected to the OUT of the previous device |
| Last Servo Driver | EtherCAT OUT | Insert a terminating resistor (120Ω) to seal off the end of the bus |
2. Core Parameter Configuration (Taking EtherCAT as an example)
(1) PLC Master Configuration (e.g., Beckhoff TwinCAT)
- Enable Bus Master: Install the EtherCAT master plugin and set the communication cycle (e.g., 1ms; the shorter the cycle, the higher the real-time performance);
- Scan Slave Stations: The PLC searches for bus slave stations, confirms that all servo drives are online normally (no "slave lost" alarm), and assigns slave addresses (e.g., drive 1 = address 1, drive 2 = address 2);
- Map PDO Data: Map the servo's "control words" (enable, run instructions), "status words" (ready, alarm), "position instructions," and "position feedback" to the PLC's process data objects (PDOs) to achieve real-time read and write.
(2) Servo Driver Configuration
- Communication Parameters: Set the bus type (e.g., EtherCAT), slave address (consistent with PLC configuration), and communication cycle (must be synchronized with PLC);
- Control Mode: Set to "Bus Position Mode" (e.g., Huichuan SV660N parameter P2-00=6, EtherCAT position mode);
- Safety Functions: If STO (Safe Torque Off) is required, configure the bus safety protocol (e.g., FSOE) and associate it with the PLC's emergency stop and safety door signals (no additional hardwiring required).
3. Debugging and Verification Steps
- Bus Connection Test: The PLC scans the slave stations; all servo drives display "Online," and there are no communication alarms (such as "0x8010" indicating slave station loss).
- Data Interaction Test: The PLC sends "Control Word = 0x0001" (Enable), and the servo status word returns "0x0008" (Ready), indicating normal communication.
- Multi-Axis Synchronization Test: The PLC sends multi-axis linkage commands (such as electronic cams and interpolation motion), and the position feedback of each axis is measured with an oscilloscope. The synchronization error is <±1μs.
IV. Key Differences Between the Two Approaches and Selection Recommendations
| Comparison Dimensions | Pulse Control (Hardwiring) | Bus Control (Communication) |
|---|---|---|
| Wiring Quantity | Requires 4-6 wires per axis, resulting in messy multi-axis operation | All axes share a single bus, reducing wiring by 80% |
| Synchronization Accuracy | Poor performance (inconsistent pulse delays across multiple axes, error > 1ms) | Extremely High (distributed clock synchronization, error in μs) |
| Functional Scalability | Supports only basic motion commands; expansion requires additional wiring | Supports remote parameter modification, fault diagnosis, and integrated safety functions |
| Programming Difficulty | Low performance (requires only PLC pulse commands, simple driver parameters) | Medium (requires bus mapping configuration and PDO read/write program writing) |
| Cost | Low performance (no bus module required, only high-speed pulse output terminals needed) | Medium (requires PLC bus module and servo bus functionality) |
Selection Recommendations:
Small equipment (1-2 axes), cost-sensitive, no synchronization requirements → pulse control (e.g., ejector pin axis of a small injection molding machine);
Medium-to-large equipment (3 axes or more), multi-axis linkage (e.g., mold closing + injection + feeding axes of an injection molding machine), high precision requirements → bus control (EtherCAT preferred, strong compatibility; Profinet for Siemens PLC).
V. Troubleshooting Common Problems (Must-Read for Beginners)
1. Common Pulse Control Faults
Servo not responding to pulses:
① Enable signal not activated (PLC Q0.2 not conducting);
② Pulse input type mismatch (e.g., driver set to "Dual Pulse", PLC output "Pulse + Direction");
③ Pulse lines reversed (PUL+ and PUL- reversed);
Motor jitter/step loss:
① Pulse lines not shielded, electromagnetic interference;
② Incorrect electronic gear ratio calculation;
③ Gain parameter too low (e.g., position proportional gain Kp too small).
2. Common Bus Control Faults
Slave station unable to connect: ① Bus cable reversed (A/B lines reversed); ② Termination resistor not installed; ③ Slave address inconsistent with PLC configuration;
Communication timeout/packet loss: ① Bus cable length exceeds standard (EtherCAT single segment maximum 100m); ② Shielding layer not grounded or poorly grounded; ③ Communication cycle set too short (exceeds driver support range).
3. Common Faults
Servo Alarm "Overload":
① Overload;
② Pulse sent before enable signal is stable;
③ Incorrect motor power line wiring (U/V/W phase sequence reversed);
Origin Return Failure:
① Origin signal not connected (or signal type mismatch);
② Limit signal triggered (motor cannot reach the origin area).
The core of connecting the servo drive to the PLC is "selecting the right control method": use pulse control for simple single-axis scenarios (hardwiring, easy to learn), and use bus control for complex multi-axis scenarios (communication, simple wiring, high precision). In practice, focus on "signal type matching" (NPN/PNP), "parameter consistency" (control mode, bus cycle), and "electromagnetic compatibility" (shielding grounding). Follow the steps of "wiring → configuration → no-load → load" for debugging to quickly achieve a stable connection.
