108
3. In the PC, the processes corresponding to M code 100 are performed when
the M strobe goes ON. The PC turns ON the M code reset when these pro-
cesses are completed.
4. In the MC Unit, the M code is cleared to 0 and the M strobe is turned OFF
when the PC turns ON the M code reset.
5. When the M code reset from the PC goes OFF, block N003 is executed,
moving the X-axis to 0 mm.
6. The program ends in block N004.
5-6-2 M-code Data
There are some M codes that interlock as explained on the previous page, and
others that don’t interlock. These differences are explained below.
When an M code is specified in a register or position data address, the specified
value will be rounded to the nearest integer value. An error will occur if the result
isn’t an acceptable M code value (0 to 999).
M Codes 0 to 499
M codes 0 to 499 are used to interlock with external devices. Execution of the
program is paused when there isn’t an M code reset input.
M Codes 500 to 999
Use M codes 500 to 999 when it isn’t necessary to interlock. These M codes are
just output and the program is executed without waiting for an M code reset
input.
These M codes are cleared when the PROGRAM END function (G79) is
executed.
5-6-3 M-code Examples
M codes can be used independently or in conjunction with “G codes” such as
G00 and G01 which execute axis operations.
Example 1
The following program outputs M code 496.
N000
P000
X
N001
G01
X100
F100
M496
N002
G01
X200
F100
N003
G79
When the M code reset of the
PC is turned OFF, the next block
N002 will be executed.
X-axis operation
Outputs from
the MC Unit
M strobe
M code
Command
from the PC
M code reset
M-code Outputs
Section 5-6
Summary of Contents for C200H-MC221 -
Page 1: ...Cat No W315 E1 03 Motion Control Unit C200H MC221 OPERATION MANUAL ...
Page 2: ......
Page 3: ...C200H MC221 Motion Control Unit Operation Manual Details Revised June 2010 ...
Page 4: ...iv ...
Page 6: ...vi ...
Page 10: ......
Page 12: ......
Page 16: ...xvi ...
Page 42: ......
Page 48: ......
Page 196: ......
Page 212: ......
Page 242: ......
Page 258: ......
Page 304: ......