11 Check the operation of the reverse rotation limit switch
2. DOG search function
6.3 Zero Return (ZRN Instruction)
6.3.3 Function and operation
For details on the maximum speed, bias speed, acceleration time and deceleration time, refer to Subsection 4.2.5 to Subsection 4.2.8.
*1. Within 1 ms when X000 to X007 in the main unit (X000 to X005 in the FX3S PLC) is used, and within
“1 ms + 1 scan time” when X010 or later (X006 or later in the FX3S PLC) is used.
1) For , specify the zero return speed.
If the set zero return speed value is more than the maximum speed value, the operation will be performed at the maximum speed.
Note that the zero return speeds shown in the following table will not apply.
2) For , specify the creep speed.
Setting range: 10 to 32,767 Hz
Setting range
16-bit operation 10 to 32,767(Hz)
32-bit operation
When a high-speed output special
adapter is used 10 to 200,000(Hz) When a transistor output from the
main unit is used 10 to 100,000(Hz)
Pulse output destination device Zero return speed
= Y000 D8347,D8346
= Y001 D8357,D8356
= Y002 D8367,D8366
= Y003 D8377,D8376
Command
input FNC156
ZRN S1• S2• S3• D•
Maximum speed
Zero return speed Deceleration
time
Bias speed Acceleration
time
DOG Creep speed
CLEAR signal Rear end Front end
*1
20 ms + 1 scan time (ms) S3 S2
ON
"Instruction execution complete" flag M8029
When the instruction is turned off, M8029 is turned off.
S1
S1
D1 D1 D1 D1 S2
FX /FX /FX /FX /FX PLC User's Manual - Positioning Control Edition
Built-in Positioning Functions 6.3 Zero Return (ZRN Instruction)
A
Common Items
Functions Positioning
B
Built-inApx.
Connection Example3) For , specify the near-point signal (DOG) input device number (NO contact).
Turning on the near-point signal will reduce the speed to the creep speed. Turning off the near-point signal will complete the zero return operation.
For details, refer to "1. Zero return operation".
• If an input X000 to X007 (X000 to X005 for FX3S PLC) of the main unit is specified for the near-point signal (DOG), the PLC interruption function will be used to stop the operation. (To output the CLEAR signal, turn on the "CLEAR signal output function enable" relay.)
Under the following condition, however, operation may be affected by the input filter or the scan time of the sequence program, and the operation, therefore, may not be stopped exactly at the origin.
- An input number of X010 or higher (or other device (auxiliary relay, etc.)) is specified.
If an input relay X010 or higher (X006 or higher for FX3S PLC) is specified for the near-point signal (DOG), the input filter will be applied.
4) For , specify a pulse output number in the range of Y000 to Y003.
5) Zero return direction
For this instruction, the zero return direction is set to the reverse rotation direction.
(During zero return operation, the value indicated in the current value register will be decreased.) To perform zero return in the forward rotation direction, follow the example program below to control the direction output.
For programming details, refer to Section 4.7.
To use the main unit (transistor output), refer to Section 4.8.
To use a high-speed output special adapter, refer to Section 4.9.
a) Turn on Y (rotational direction signal).
b) Refresh Y output using the REF (FNC 50) instruction.
c) Execute the ZRN instruction (zero return instruction).
d) With the execution completion flag (M8029) of the ZRN instruction (zero return instruction), reset Y (rotational direction signal).
Example program:
In the program shown below, Y004 is specified as the rotation direction signal output device for Y000.
S3
D
Command input
Turns on (sets) Y004 as the rotational direction signal of Y000 (pulse output destination).
M12
K8 Y000
Y000
Y004 RST
Refreshes Y000 to Y007.
Executes ZRN instruction.
Resets the rotational direction signal (Y004) using the instruction execution complete flag.
Y004 SET
FNC 50 REFP FNC156
DZRN S1• S2• S3•
M8029
M11 RST
M12 SET
M10 RST
M10 SET
M12 RST
M12 RST
Origin data reading completion flag
Y004 M8329 RST
M11
SET Abnormal end of zero return a)
b)
c) d)
Resets the rotational direction signal (Y004) using the instruction execution abnormal end flag.
FX /FX /FX /FX /FX PLC User's Manual - Positioning Control Edition
Built-in Positioning Functions 6.3 Zero Return (ZRN Instruction)
6) CLEAR signal output
This instruction can output the CLEAR signal after stopping at the origin. If it is necessary to output the CLEAR signal at the completion of zero return, turn on the "CLEAR signal output function enable" relay (see the following table). Use an FX3UC PLC Ver. 2.20 or later and FX3S/FX3G/FX3GC/FX3U PLC to specify the CLEAR signal output device.
a) If it is not necessary to use the CLEAR signal device specification function, or if an FX3UC PLC of below Ver. 2.20 is used:
b) If it is necessary to use the CLEAR signal device specification function:
Turn on the "CLEAR signal device specification
function enable" relay to specify the CLEAR signal output device (output Y) for the pulse output destination device using the CLEAR signal device specification register.
For the example of a program, refer to Subsection 4.3.4 or Subsection 4.5.1.
Pulse output destination device
Status of "CLEAR signal output function
enable" relay
Status of "CLEAR signal device specification function enable" relay
CLEAR signal device number
= Y000 M8341=ON M8464=OFF Y004
= Y001 M8351=ON M8465=OFF Y005
= Y002 M8361=ON M8466=OFF Y006
= Y003 M8371=ON M8467=OFF Y007
Pulse output destination device
Status of "CLEAR signal output function
enable" relay
Status of "CLEAR signal device specification function enable" relay
CLEAR signal device specification register
= Y000 M8341=ON M8464=ON D 8464
= Y001 M8351=ON M8465=ON D 8465
= Y002 M8361=ON M8466=ON D 8466
= Y003 M8371=ON M8467=ON D 8467
D1 D1 D1 D1
D1 D1 D1 D1
FX /FX /FX /FX /FX PLC User's Manual - Positioning Control Edition
Built-in Positioning Functions 6.3 Zero Return (ZRN Instruction)
A
Common Items
Functions Positioning
B
Built-inApx.
Connection Example1. Zero return operation
Zero return operation is described below assuming that Y000 is specified as the pulse output destination device . If Y001, Y002, and Y003 are specified, it is necessary to change the output number of each related relay (special auxiliary relay, special data register) below.
For details on related flags, refer to Section 4.1 to Section 4.4, or Subsection 6.2.2.
1) Execute the ZRN instruction to carry out zero return.
2) Transfer operation will be performed at the zero return speed specified by .
3) If the near-point signal (DOG) specified by is turned on, the speed will be reduced to the creep speed specified by .
4) If the near-point signal (DOG) specified by is turned off, the pulse outputting operation will be immediately stopped.
5) If the CLEAR signal output function (M8341) is enabled (set to ON), the CLEAR signal (Y004) will be turned on within 1 ms*1 after the near-point signal (DOG) is turns from ON to OFF, and will be kept ON for
"20 ms + 1 scan time (ms)".*2
6) The current value register (D8341, D8340) will be reset to "0" (will be cleared).
7) "Instruction execution complete" flag will be turned on, and the zero return operation will be completed.
For details on "Instruction execution complete" flag, refer to Subsection 4.7.4.
*1. Within 1 ms when an input X000 to X007 (X000 to X005 in the FX3S PLC) is used for the near-point signal (DOG), and within “1 ms + 1 scan time” when an input X010 or later (X006 or later in the FX3S
PLC) is used for the near-point signal (DOG).
*2. FX3S/FX3G/FX3GC PLCs operate in the sequence "CLEAR signal output Pulse output stop".
Set the CLEAR signal detection to "While on, droop pulses are always cleared" for connected amplifiers (drivers).
The stop position may deviate if it is set to "Droop pulses are cleared on the leading edge".
D
S1 S3
S2
S3
Maximum speed (D8344,D8343)
Zero return speed Deceleration
(D8349)time
Bias speed (D8342)
Acceleration (D8348)time
DOG Creep speed
CLEAR signal Y004
Front end Rear end
*1*2
20 ms + 1scan time (ms) S2
ON
"Instruction execution complete" flag M8029
When the instruction is turned off, M8029 is turned off.
S1
S3
FX /FX /FX /FX /FX PLC User's Manual - Positioning Control Edition
Built-in Positioning Functions 6.3 Zero Return (ZRN Instruction)