MELSEC iQ-R Series Motion Module (RD78G) - Homing from the PLC side
It is the article from the series
Melsec iQ-R Series Motion Module (RD78G) Quick Start Guide.
In this part you will learn how to:
- connect sensor to the DOG signal
- set sensor polarity
- choose homing method
- set all homing parameters
- start homing using MC_Home function block
1. Homing method choosing and setting of the homing parameters
In this section you will learn which homing method you should choose regarding application type. After selecting the appropriate method, you will be guided through setting the parameters needed for homing.
Connecting sensor to the DOG signal
To use sensor as a DOG signal you have to connect it to the CN3 connector of the servo amplifier.
The illustration above shows the placement of the CN3 connector's pin of MR-J5W3 servo amplifiers.
The initially assigned device of the CN3 connector are as shown on the list below:
The details of the CN3 connector assignment for all MR-J5 servo amplifiers are to be found in the "Connectors and pin assignment" in "SIGNALS AND WIRING" chapter of the Hardware MR-J5 User's Manual
The sensor can be connected in sink or source logic. It should be remembered that all devices plugged into CN3 connector must work in the same logic.
CN3 input wiring diagram for a 3 axis servo amplifier in Sink logic
CN3 input wiring diagram for a 3 axis servo amplifier in Source logic
In the figures shown above, NO (normally open) sensors are used.
The full wiring diagram of I/O signals for each of MR-J5 servo amplifier can be found in "Example I/O signal connections" in "SIGNALS AND WIRING" chapter of the Hardware MR-J5 User's Manual
The initial settings of DOG signal is to detect it when signal goes from logical signal "1" to logical "0". This setting can be changed with parameter PT29.0.
The value of Pr. PT29.0 correspond with the type of sensor connected to the DOG signal. When sensor type is NO, PT29.0 should be set to "1". In case of NC (normally closed) sensors value of PT29.0 should be set to "1".
Selecting the homing method
The method of homing is to be selected from servo amplifier's parameters available from MR Configurator2.
As how to set up the project and connect to the servo amplifier was described in the previous part of the articles in the series MELSEC iQ-R Series Motion Module (RD78G) - Drive configuration and programming from the PLC side
After opening the MR Configurator2 project and connecting to servo amplifier unfold tab for specific axis from project tree to the left and select
Parameter. When new window
Parameter Setting will open find and open
Positioning from the list:
On the newly opened window find headline named
Homing. Below it are listed all parameters regarding homin operation. We can you simple application which are implemented in MR Configurator2 to easily set the required parameters. To enter it left-click on
Setting button of axis you want to paramatrize:
This will open a new window with homing settings.
The first field of this window that we will pay attention to is
Homing method.
We can select from two group of methods - Manufacturer-specific and CiA 402. CiA 402 is compatible with the CANopen communication protocol.
In this article, only Manufacturer-specific methods will be described. A detailed description of the methods available in CiA 402 is available in "Homing mode (hm) and homing" in the "CONTROL MODE [G]" chapter of the MR-J5 User's Manual (Function). Description of each method is in the Homing method list - methods compatible with CiA 402 are listed by positive numbers.
Available homing methods and their description
- Dog type homing (Rear end detection - Z-phase reference) - Forward (CCW)/Reverse (CW) direction
Performs homing using the Z-phase pulse after a moving part has moved past the proximity dog. Deceleration starts from end of the proximity dog. After the rear end is passed, the position specified by the first Z-phase signal or the position of the first Z-phase signal shifted by the specified home position shift distance is used as the home position.
When the homing is started from the proximity dog the homing start position is automatically moved back to the position just before the proximity dog and homing starts from here. When the homing starts after the proximity dog and servo reaches the stroke end of the limit switch the direction of the motor rotation is reversed and homing starts once again from this position.
The following figure shows the operation in forward (CCW) homing direction.
2. Count type homing (Front end detection - Z-phase reference) - Forward rotation (CCW) / Reverse rotation (CW)
Performs homing using the encoder pulse count after a moving part came into contact with the proximity dog.
Deceleration starts from the front end of the proximity dog. After the front end is passed, the position specified by the first Z-phase signal after the set distance or the position of the Z-phase signal shifted by the set home position shift distance is set as the home position.
When the homing is started from the proximity dog the homing start position is automatically moved back to the position just before the proximity dog and homing starts from here. When the homing starts after the proximity dog and servo reaches the stroke end of the limit switch the direction of the motor rotation is reversed and homing starts once again from this position.
The following figure shows the operation in forward (CCW) homing direction.
3. Data set type
Homing is performed without use of DOG sensor. The current position is set as the home position.
4. Stopper type homing (Stopper position reference) - Forward rotation (CCW) / Reverse rotation (CW)
Performs homing with a workpiece pressed against a mechanical stopper. A workpiece is pressed against a mechanical stopper, and the stop position is set as the home position. When the stroke end is detected servo motor stops with AL.090.
The following figure shows the operation in forward (CCW) homing direction.
5. Dog type homing (Rear end detection - rear end reference) - Forward rotation (CCW) / Reverse rotation (CW)
Performs homing with reference to the rear end of the proximity dog.
Deceleration starts from the front end of the proximity dog. After the rear end is passed, the position is shifted by the travel distance after proximity dog and the home position shift distance. The position after the shifts is set as the home position. Since we do not detect Z-phase in this method it is recommended for applications with limited baseline space. The method is less accurate than the method in (1).
When the homing is started from the proximity dog the homing start position is automatically moved back to the position just before the proximity dog and homing starts from here. When the homing starts after the proximity dog and servo reaches the stroke end of the limit switch the direction of the motor rotation is reversed and homing starts once again from this position.
The following figure shows the operation in forward (CCW) homing direction.
6. Count type homing (Front end detection - front end reference) - Forward rotation (CCW) / Reverse rotation (CW)
Performs homing with reference to the front end of the proximity dog.
Deceleration starts from the front end of the proximity dog. The position is shifted by the travel distance after the proximity dog and the home position shift distance. The position after the shifts is set as the home position.
Since we do not detect Z-phase in this method it is recommended for applications with limited baseline space. The method is less accurate than the method in (2).
When the homing is started from the proximity dog the homing start position is automatically moved back to the position just before the proximity dog and homing starts from here. When the homing starts after the proximity dog and servo reaches the stroke end of the limit switch the direction of the motor rotation is reversed and homing starts once again from this position.
The following figure shows the operation in forward (CCW) homing direction.
7. Dog cradle type homing - Forward rotation (CCW) / Reverse rotation (CW)
Performs homing using the first Z-phase pulse with reference to the front end of the proximity dog.
A position, which is specified by the first Z-phase signal after the front end of the proximity dog is detected, is set as the home position.
When the homing is started from the proximity dog the homing start position is automatically moved back to the position just before the proximity dog and homing starts from here. When the homing starts after the proximity dog and servo reaches the stroke end of the limit switch the direction of the motor rotation is reversed and homing starts once again from this position.
The following figure shows the operation in forward (CCW) homing direction.
8. Dog type last Z-phase reference homing - Forward rotation (CCW) / Reverse rotation (CW)
Performs homing using the last Z-phase pulse with reference to the front end of the proximity dog.
After the front end of the proximity dog is detected, the position is shifted away from the proximity dog in the reverse direction. Then, the position specified by the first Z-phase signal or the position of the first Z-phase signal shifted by the home position shift distance is used as the home position.
When the homing is started from the proximity dog the homing start position is automatically moved back to the position just before the proximity dog and homing starts from here. When the homing starts after the proximity dog and servo reaches the stroke end of the limit switch the direction of the motor rotation is reversed and homing starts once again from this position.
The following figure shows the operation in forward (CCW) homing direction.
9. Dog type front end reference homing - Forward rotation / Reverse rotation
Performs homing with reference to the front end of the proximity dog in the direction of the front end.
Starting from the front end of the proximity dog, the position is shifted by the travel distance after the proximity dog and the home position shift distance. The position after the shifts is set as the home position.
When the homing is started from the proximity dog the homing start position is automatically moved back to the position just before the proximity dog and homing starts from here. When the homing starts after the proximity dog and servo reaches the stroke end of the limit switch the direction of the motor rotation is reversed and homing starts once again from this position.
The following figure shows the operation in forward (CCW) homing direction.
10. Dogless Z-phase reference homing
Performs homing with reference to the first Z-phase in the direction of the dog front end.
The position specified by the first Z-phase signal or the position of the first Z-phase signal shifted by the home position shift distance is used as the home position.
When the stroke end is detected servo motor stops with AL.090.
The following figure shows the operation in forward (CCW) homing direction.
Setting the homing parameters
After selecting the proper homing method we have to set the homing movement parameters available from the Homing window.
On
Homing detalied settings we can specify home position shift distance, travel distance after detecting proximity dog, polarity of the sensor used to homing, stopping time and torque limit value.
All of these parameters are described in the figure of homing operation methods placed on chapter 1.2 of this article.
Below is a description of each of the parameters:
Home position shift distance - this parameter determines the distance (in encoder pulses) that the motor will travel when Z-phase is detected
Travel distance after proximity dog - this parameter determines the distance (in encoder pulses) that the motor will travel after detecting DOG sensor
at homing for the count type and dog reference
((5), (6) and (9) method from this article).
Stopping time
- determines the time from a moving part touches the stopper and torques reach to the torque limit of
Torque limit value
to a home position is set for the stopper type homing.
Torque limit value
is given in % of the motor rated torque.
On
Homing operation basic settings 1 we can specify homing speed, homing acceleration and deceleration time and creep speed.
All of these parameters are described in the figure of homing operation methods placed on chapter 1.2 of this article.
Below is a description of each of the parameters:
Homing speed - this parameter determines the servo motor speed during homing.
Homing acceleration time constant - determines acceleration time constant for the homing. This parameter is used as the deceleration time constant when
Homing deceleration time constant selection is set as
Pr. PT56 Homing acceleration time constant.
Homing deceleration time constant - determines deceleration time constant for the homing. This parameter is enabled when
Homing deceleration time constant selection is set as
Pr. PT57 Homing deceleration time constant.
Creep speed - this parameter determines the servo motor speed during homing after detecting DOG sensor.
After setting all basing parameters, accept the changes made in the
Homing window with the
OK button and write the set parameters to the servo amplifier.
2. Initiating a homing operation from the PLC controller
This section requires an established and pre-configured project. For a description of how to do this, see the first and second article in the Melsec iQ-R Series Motion Module (RD78G) Quick Start Guide series - System start-up and Drives configuration and programming from the PLC side.
To initiate the homing procedure we will use the MC_Home function block from the PLCopen library. It can be found in
Operation-Individual catalog.
To add MC_Power FB drag it over worksheet and drop it.
After dropping FB you have to assign the corresponding variables to inputs and outputs of the FB. I
t is useful to create variables on which we will operate. The most effective way to do this is to use structures.
The method of creating the structure is shown in the other article from the
MELSEC iQ-R Series Motion Module (RD78G) series -
Drive configuration and programming from the PLC side.
Below the created structure with variables that operate the MC_Home function block - stHPR.
On the input side:
-
Execute - While is TRUE, the FB is executed (BOOL).
-
Position - Sets the home position address (LREAL).
-
AbsSwitch - Sets the proximity dog signal that is transmitted to the slave device in the driver homing method. When DOG sensor is connected to the servo amplifier directly this inputs is to be not connected.
-
Axis
- Axis information available from AxisRef structure (AxisRef).
On the output side:
-
Done- Indicates that the homing is completed (BOOL).
- Busy - Indicates that the FB is in execution (
BOOL
).
- Active - Indicates that the FB is controlling the axis (BOOL).
- Command Aborted - Indicates that execution has been aborted because of other FBs (BOOL).
-
Error - When TRUE, it indicaes that and error has occured in the FB (BOOL).
-
ErrorID - The error code generated in the FB is returned (WORD).
For the details description of MC_Home FB refer to MELSEC iQ-R Motion Module User's Manual (
Motion Control Function Blocks).
Example of a FB with defined I/O
To start homing operation define value of i_lePosition and set the i_bExcecute. During operation o_bBusy will be in a high state. If the homing is successful, the u_bDone is set high. If an error occurs, o_bBusy will be set high. The error code can be read from the o_uErrorID.
After successful or unsuccessful homing operation i_bExecute will be set in low state by RST function block.