432
M Code Outputs
Section 7-4
Example 1:
M500
Example 2:
G01 X100 MA000
Example 3:
G01 X200 Y100 M(E00)
Operands
The following table shows the possible settings for the operands.
Programming Example
The following program shows an example of M code usage.
N000
P100
X
. . . . . . . . . . . Declares the program number.
N001
G01
X100
F100
Moves to 100 mm on the X-axis by
linear interpolation.
N002
M100
. . . . . . . . . . . . Outputs M code 100 to the CPU Unit
and waits for OK to perform the next
operation.
Proceeds to next block when the M
code reset is received from the CPU
Unit.
N003
G01
X0
. . . . . . . . . . Moves to 0 mm on the X-axis by lin-
ear interpolation.
N004
G79
. . . . . . . . . . . . Declares the end of the program.
Timing Chart
The following diagram shows the timing of the programming example execu-
tion. The Axis Operating, M Strobe, M Code, and M Code Reset Bits are pro-
vided in the PLC Interface Area.
Description
The following list provides a running description of the program execution.
1,2,3...
1.
In block N001, the X-axis is moved to 100 mm by linear interpolation.
2.
In block N002, M code 100 is output after the X-axis positioning is complet-
ed; the M strobe is turned ON at the same time to indicate that the M code
has been set.
3.
In the CPU Unit, the processes corresponding to M code 100 are per-
formed when the M strobe goes ON. The CPU Unit turns ON the M Code
Reset Bit when these processes are completed.
4.
In the MC Unit, the M code is cleared to 0 and the M strobe is turned OFF
when the CPU Unit turns ON the M Code Reset Bit.
5.
When the M Code Reset Bit from the CPU Unit goes OFF, block N003 is
executed, moving the X-axis to 0 mm.
Operand
Possible settings
M code
00 to 999
(E00) to (E32)
A0000 to A1999
X-axis operation (speed reference)
Outputs from
the MC Unit
M Strobe
M Code
Command
from the
CPU Unit
M Code Reset
Axis Operating
Содержание CS1W-MC221 -
Страница 1: ...Motion Control Units Cat No W359 E1 04 CS1W MC221 V1 421 V1 OPERATION MANUAL ...
Страница 2: ...CS1W MC221 V1 421 V1 Motion Control Units Operation Manual Revised February 2008 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 11: ...xii ...
Страница 15: ...xvi ...
Страница 19: ...xx ...
Страница 27: ...xxviii Conformance to EC Directives 6 ...
Страница 133: ...106 Installation Section 2 2 2 2 4 Dimensions CS1W MC421 CS1W MC221 ...
Страница 173: ...146 Connecting Peripheral Devices Section 2 7 ...
Страница 227: ...200 Command Area Section 3 6 ...
Страница 351: ...324 Interface Specifics Section 5 4 ...
Страница 513: ...486 Absolute Encoder Interface Specifications Section 9 7 ...
Страница 575: ...548 Error Log Section 12 6 ...
Страница 589: ...562 Performance Appendix A ...
Страница 655: ...628 Control Bit Flag Timing Charts Appendix E ...
Страница 683: ...656 Origin Search Patterns Appendix F ...
Страница 685: ...658 Encoder Divider Rate and Rotation Speed for OMRON Servo Drivers Appendix G ...