![Mitsubishi Electric MELSEC iQ-R16MTCPU Скачать руководство пользователя страница 428](http://html.mh-extra.com/html/mitsubishi-electric/melsec-iq-r16mtcpu/melsec-iq-r16mtcpu_programming-manual_239141428.webp)
426
7 AUXILIARY AND APPLIED FUNCTIONS
7.1 M-code Output Function
Program example
This program example is explained in the "Q series Motion compatible device assignment" device assignment method.
• The Motion SFC program to read M-codes is shown as the following conditions.
• Motion SFC program with the above conditions are shown below.
Item
Condition of use
Axis used No.
Axis 3
Processing at the positioning start by M-code
M-code No. is output as BCD code to Y10 to Y1F
Processing at the positioning completion by M-code
M-code = 3
Y20 turns on
M-code = 5
Y21 turns on
M-code is except for (3 or 5)
Y22 turns on
System Configuration
Motion SFC program
X0*M2455
D53==3
M-code (3) for axis 3 ?
P0
P0
Reading of M-codes
CPSTART1
Axis 3
Speed 1000 pulse/s
INC-1
Axis 3, 200000 pulse
M-code 3
INC-1
Axis 3, 300000 pulse
M-code 5
INC-1
Axis 3, 400000 pulse
M-code 4
CPEND
SET M2042
#0=BCD(D53)
DOUT Y10, #0
SET Y20
After M-code storage area for axis 3
is changed into BCD code, it is output
to Y10 and Y20 turns on.M
Speed . . . 1000 pulse/s
M-code output . . . 3
Positioning
address
. . . 200000 pulse
(1)
#2=BCD(D53)
DOUT Y10, #2
SET
(D53==3)+(D53==5)
D53==5
!M2003
END
#0=0
#1=0
#2=0
#1=BCD(D53)
DOUT Y10, #1
SET Y21
All axes servo ON command
turns on
1 axis continuous trajectory control
Stand by until X0 and Axis 3
servo ready turns on
Axis used . . . Axis 3
1 axis linear positioning control
1 axis linear positioning control
1 axis linear positioning control
Axis used . . . Axis 3
Positioning
address
. . . 300000 pulse
M-code output . . . 5
Axis used . . . Axis 3
Axis used . . . Axis 3
Positioning
address
. . . 400000 pulse
M-code output . . . 4
[F10]
[F20]
[G10]
[K100]
[G20]
[F30]
[G30]
[F40]
[G40]
[G50]
[F50]
M-code (except 3 or 5) for axis 3 ?
M-code (5) for axis 3 ?
After M-code storage area for
axis 3 is changed into BCD code,
it is output to Y10 and Y21
turns on.
After M-code storage
area for axis 3 is
changed into BCD code,
it is output to Y10 and
Y22 turns on.
(1)
RX40
C7
R61P
R16MT
CPU
X0
to
XF
R04
CPU
RY41
NT2P
Y10
to
Y2F
Содержание MELSEC iQ-R16MTCPU
Страница 1: ...MELSEC iQ R Motion Controller Programming Manual Positioning Control R16MTCPU R32MTCPU R64MTCPU ...
Страница 2: ......
Страница 477: ...APPENDICES Appendix 1 Processing Times of the Motion CPU 475 A MEMO ...
Страница 481: ......