APPENDICES
APP
−
43
4.3 Reading
M-Codes
An example of a program for reading an M-code on completion of positioning start
or on completion of positioning is shown here.
The distinction between positioning start completion and positioning completion is
made with the following signals.
•
Positioning start completed .........M1600+20n (positioning start completed signal)
•
Positioning completed..................M1601+20n (positioning completed signal)
[Program Example]
(1) A program that outputs the M-code for axis 1 from Y000 to Y00F to an external
destination on completion of positioning start and after conversion to BCD
code, is shown here.
Y0000
BCD
Axis 1 positioning start completed signal
M1600
CIRCUIT END
0
K4
D813
P
A172SHCPUN
A172B
A
172S
ENC
A1S
X10
A1S
Y40
Y000
to
Y00F
P
o
we
r s
u
pp
ly
mo
d
u
le
Y000 to Y00F designation
M-code storage area for axis 1
BCD conversion instruction
System configuration
Sequence program
(2) A program that outputs the M-code for axis 1 from Y000 to Y00F to an external
destination on completion of positioning and after conversion to BCD code, is
shown here.
Y0000
BCD
Axis 1 positioning start completed signal
M1600
CIRCUIT END
0
K4
D813
P
A172SHCPUN
A172B
A
172S
ENC
A1S
X10
A1S
Y40
Y000
to
Y00F
P
o
wer
s
u
p
p
ly
mo
d
u
le
Y000 to Y00F designation
M-code storage area for axis 1
BCD conversion instruction
Sequence program
System configuration
Downloaded from