M-Code Outputs; Introduction - Omron C200H-MC221 Operation Manual

Motion control unit
Hide thumbs Also See for C200H-MC221:
Table of Contents

Advertisement

M-code Outputs

5-6

M-code Outputs

5-6-1 Introduction

Example Program
Timing Chart
X-axis operation
Outputs from
the MC Unit
Command
from the PC
Explanation
1, 2, 3...
If positioning with incremental specification is interrupted by a pause command,
the axes will be moved to the original end position after the operation is
restarted. Also, if the axes have been moved or an origin search was performed
after the operation was interrupted, the axes will still be moved to the original end
position.
Example 1
Continued operation
Moved
manually
Interruption
M codes consist of information used to interlock with external devices in posi-
tioning operation processes. External devices are devices connected to the PC.
The following program shows a practical example of M code usage.
N000
P100
X
N001
G01
X100
. . . . . . . . . . . . . . .
N002
M100
N003
G01
X0
. . . . . . . . . . . . . . . . .
N004
G79
The following diagram shows the timing of the example program's execution.
The axis being started, M strobe, M code, and M code reset are provided in the
PC data area interface.
Axis being
started
M strobe
M code
M code reset
The following list provides a running explanation of the program's execution.
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 com-
pleted; the M strobe is turned ON at the same time to indicate that the M
code has been set.
Example 2
Origin
. . . . . . . . . . . .
Declares the program number.
.
Moves to 100 mm on the X-axis by linear
F100
interpolation.
Outputs M code 100 to the PC and waits
for OK to perform the next operation.
Proceeds to next block when the M-code
reset is received from the PC.
. . . . . . . . . . .
Moves to 0 mm on the X-axis by linear
interpolation.
Declares the end of the program.
Section 5-6
Interruption
Origin search
Continued operation
107

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents