Appendix4 Example Programs; Reading M-Codes - Mitsubishi Electric A173UHCPU Programming Manual

Motion controller
Hide thumbs Also See for A173UHCPU:
Table of Contents

Advertisement

APPENDICES

APPENDIX4 EXAMPLE PROGRAMS

4.1
Reading M Codes
[Program Example]
System configuration
A61P
A273UH
A278
CPU
LX
AY40
Y000
to
Y00F
System configuration
A273UH
A61P
A278
LX
CPU
AY40
Y000
to
Y00F
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 .........M2400+20n (positioning start completed signal)
• Positioning completed..................M2401+20n (positioning completed signal)
(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.
Sequence program
Axis 1 positioning start completed signal
M2400
0
CIRCUIT END
(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.
Sequence program
Axis 1 positioning completed signal
M2400
0
CIRCUIT END
P
BCD
D13
P
BCD
D13
APP − 53
K4
Y0000
Y000 to Y00F designation
M code storage area for axis 1
(Refer to Section 3.2.1.)
BCD conversion instruction
K4
Y0000
Y000 to Y00F designation
M code storage area for axis 1
(Refer to Section 3.2.1.)
BCD conversion instruction

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

A273uhcpu

Table of Contents