EasyManua.ls Logo

Omron C200H-MC221 - M-Code Data; M-Code Examples

Omron C200H-MC221
305 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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

Table of Contents

Other manuals for Omron C200H-MC221

Related product manuals