Target behavior
Home the electric actuator with the homing button, and move to each position with the P1 to P3 buttons
What you will learn
This time, let's learn how to control an electric actuator!
Along with pneumatic control, electric actuators are drive devices used in almost every machine.
First, let's learn how an electric actuator moves from a video.
An electric actuator combines a servo motor and a ball screw to move a stage to any position.
A servo motor is a high-precision motor, frequently used where precise positioning is required in equipment.
To control an electric actuator, a dedicated unit called a positioning unit is used instead of the I/O units so far.
Examples are the KV-XH series from KEYENCE and the RD77MS series from Mitsubishi Electric.
The control circuit of the electric actuator is as follows.
The positioning unit communicates with the PLC through relay (R) devices.
The positioning method in this simulator follows the method used with the KEYENCE KV-XH16ML.
Turn ON the "output" relays that send commands from the PLC to the positioning unit with ladder coils, and control the axis while checking the "input" relays returned from the unit with contacts.
The relays used for axis 1 are as follows.
| Relay | Name | Direction | Description |
|---|---|---|---|
| R0 | Operation enable | Output | When ON, the positioning unit is ready to operate. |
| R2 | Forced stop | Output | When ON, the axes are forcibly stopped. Normally keep it OFF. |
| R6600 | Operable | Input | ON when operation enable is ON and forced stop is OFF. |
| R305 | Servo ON | Output | While ON, current flows to the servo motor and it holds its position. |
| R6905 | Servo ready | Input | Turns ON shortly after servo ON. Move the axis only after it turns ON. |
| R310 | Homing request | Output | Homing starts on the OFF → ON rising edge. |
| R6910 | Homing complete | Input | Turns ON when homing finishes. Turns OFF when the homing request is turned OFF. |
| R200 | Positioning start | Output | On the OFF → ON rising edge, starts moving to the point written with U_WRPPNT. |
| R6800 | Positioning start acknowledged | Input | Turns ON when the start request is accepted. Turns OFF when positioning start is turned OFF. |
| R6903 | Axis busy | Input | ON during homing and while moving. |
| R6802 | Positioning complete | Input | Turns ON when the target point is reached. |
| R202 | Positioning complete clear | Output | When ON, turns positioning complete OFF. |
| R6900 | Axis error | Input | Turns ON when an axis error occurs. |
| R300 | Axis error clear | Output | Turning it OFF → ON while stopped clears the axis error. |
* For axis 2 and later, add 400 to each per-axis relay number (e.g. servo ON for axis 2 is R705). R0, R2, and R6600 are shared by all axes.
The positioning unit has the target position, speed, and acceleration registered in advance as points.
The following points are registered for the electric actuator.
| Axis | Point No. | Position [mm] | Speed [mm/s] | Acceleration [mm/s²] |
|---|---|---|---|---|
| Axis 1 | 1 | 50 | 100 | 400 |
| 2 | 100 | 100 | 400 | |
| 3 | 150 | 100 | 400 |
U_WRPPNT 1 point instruction (e.g. U_WRPPNT 1 3 for point 3).If you turn on positioning start while the servo is not ready or before homing, axis error (R6900) turns ON and the axis does not move.
You can check the cause of an axis error by reading the error code into a DM with the U_RDAERC 1 DM10 instruction. Remove the cause, then clear it with axis error clear (R300).
| Relay | Direction | Meaning |
|---|---|---|
R0 | PLC → Unit | Operation enable (all axes). Axes do not move unless this is ON |
R305 | PLC → Unit | Servo ON request |
R310 | PLC → Unit | Homing request (starts on the rising edge) |
R200 | PLC → Unit | Positioning start (starts on the rising edge) |
R6905 | Unit → PLC | Servo ready |
R6910 | Unit → PLC | Homing complete (clears when the homing request turns OFF) |
R6800 | Unit → PLC | Positioning start acknowledged (clears when the start request turns OFF) |
R6802 | Unit → PLC | Positioning complete (remains until the next start) |
Points: P1 = 50 mm, P2 = 100 mm, P3 = 150 mm
| Step | Description | Condition to advance | Main outputs |
|---|---|---|---|
MR1 | Homing | R6910 homing complete | R310 ON, Y0 ON |
MR2 | Moving to P1 | R6800 and R6802 | U_WRPPNT 1 1, R200 ON, Y1 ON |
MR3 | Moving to P2 | R6800 and R6802 | U_WRPPNT 1 2, R200 ON, Y2 ON |
MR4 | Moving to P3 | R6800 and R6802 | U_WRPPNT 1 3, R200 ON, Y3 ON |
Based on this approach, try writing the ladder yourself first.
In the simulator, you can create the wiring and ladder and actually run the 3D equipment model.
| Device | Comment |
|---|---|
| Inputs | |
X0 | Homing button |
X1 | P1 button |
X2 | P2 button |
X3 | P3 button |
| Outputs | |
Y0 | Homing lamp |
Y1 | Moving to P1 lamp |
Y2 | Moving to P2 lamp |
Y3 | Moving to P3 lamp |
| Internal relays | |
MR0 | Busy |
MR1 | Homing |
MR2 | Moving to P1 |
MR3 | Moving to P2 |
MR4 | Moving to P3 |
MR10 | Homed |
| Positioning unit | |
R0 | Operation enable |
R200 | Axis 1 Positioning start |
R305 | Axis 1 Servo ON |
R310 | Axis 1 Homing request |
R6800 | Axis 1 Positioning start acknowledged |
R6802 | Axis 1 Positioning complete |
R6905 | Axis 1 Servo ready |
R6910 | Axis 1 Homing complete |
| Special relays | |
CR2002 | Always ON |
The row numbers in the figures match the row numbers in the simulator's ladder window.
CR2002 (always ON) keeps operation enable R0 and servo ON R305 ON at all times. Shortly after servo ON, the unit returns servo ready R6905.
MR0 is ON while any step is ON, so other buttons are not accepted during operation.
X0, if not busy and servo ready, SET MR1MR1 is ON, turn the homing request R310 ONR6910 turns ON, RES MR1 and SET MR10 (homed)When MR1 is RESet, R310 turns OFF and R6910 on the unit side clears too. That is why "homed" is remembered separately in MR10.
U_WRPPNT 1 n sets the start point number of axis 1 to nR200 ONAn axis that has not been homed cannot do point operation (it causes an axis error), so MR10 is included in the start condition.
When both R6800 (start acknowledged) and R6802 (positioning complete) are ON, RES the move step.
R6802 from the previous move remains until the next start. If you judged by R6802 alone, the step would end right after starting by seeing the previous completion, so it is combined with R6800, which shows that this start has been accepted.
During each step, the corresponding lamp is lit.
The sample wiring and ladder data can be downloaded fromGitHuband loaded with "Load wiring" and "Load ladder" in the simulator.
Key points