FX Series Positioning Controllers
Program format 5
5-4
Processing of subtasks
The subtask is processed one line at a time in the same way as
a positioning program. When the START signal is entered, the
subtask is processed from the first line, and finishes at "m102
(END)" then waits for the next START signal.
For cyclic operation, use a jump instruction such as FNC04
(JMP) as shown in the example on the left. However, jumping
from the subtask to a positioning program (main program) is
impossible.
Inside a subtask, all the sequence and application instructions (described in Section 5) and the
following cod instructions are valid.
cod 04 (TIM)
Dwell
cod 73 (MOVC)
Travel compensation
cod 74 (CNTC)
Center point compensation
cod 75 (RADC)
Radius compensation
cod 76 (CANC)
Compensation cancel
cod 92 (SET)
Present position change
m code outputs are not available. The m100 (WAIT) and the m102 (END) only are valid instruc-
tions.
The subtask processing speed is approximately 1 to 3 msec per line. It is recommended to
restrict the number of lines to approximately 100 when the subtask is processed repeatedly so
that the operation time does not become too long.
Program examples
Two examples of subtask programs are shown below. Note that processes which would take a
long time if performed in a positioning program and controls other than positioning control are
best handled by the subtask.
Fetching the digital switch data
The example on the left displays the lower 4 digits of the X-axis
current position.
In a similar manner anything not directly connected to positioning
operations can be programmed in the subtask program.
Error detection output
The program above turns OFF the normal output Y00 when detecting an error in either the X or Y axes.
O100
P0;
LD X00;
AND X01;
SET Y0;
FNC 04 (JMP)
P0;
m102;
Unconditional
jump
O100, N0;
N00 P255;
N01 FNC 74 ([D]SEGL)
D9004 Y00 K4 K0
N02 FNC 04 (JMP) P255;
N03 m102 (END);
O100, N0;
N00 P255;
N01 LDI M9050;
N02 ANI M9082;
N03 FNC 90 (OUT) Y00;
N04 FNC 04 (JMP) P255;
N05 m102 (END);
M9050
M9082
P255
Y00
JMP
P255
END
X axis
error
detection
Y axis
error
detection
N00
N01
N04
N05
Due to the jump
instruction, the
END instruction
is not executed.
Содержание FX2N-10GM
Страница 1: ...HARDWARE PROGRAMMING MANUAL FX2N 10GM FX2N 20GM ...
Страница 4: ...FX Series Positioning Controllers ii ...
Страница 6: ...FX Series Positioning Controllers iv ...
Страница 46: ...FX Series Positioning Controllers Introduction 1 1 34 MEMO ...
Страница 76: ...FX Series Positioning Controllers Wiring 3 3 24 MEMO ...
Страница 222: ...FX Series Positioning Controllers Operation Maintenance and Inspection 8 8 18 MEMO ...
Страница 256: ...FX Series Positioning Controllers Program Examples 9 9 34 MEMO ...