Mitsubishi Electronics Q173HCPU Baby Accessories User Manual


 
7 - 3
7 AUXILIARY AND APPLIED FUNCTIONS
(4) Program example
(a) The Motion SFC program to read M-codes is shown as the following
conditions.
1) Axis used No. ......................................... Axis 3
2) Processing at the positioning start by M-code
.................... M-code No. is output as BCD
code to Y110 to Y11F
3) Processing at the positioning completion by M-code
a) M-code = 3......................................... Y120 turns on
b) M-code = 5......................................... Y121 turns on
c) M-code is except for (3 or 5) ............. Y122 turns on
(b) Motion SFC program with the above conditions are shown below.
QY40
System Configuration
Motion SFC program
Q61P
- A
Q172
LX
Q172H
CPU
PX000*M2455
D53==3
M-code (3) for axis 3 ?
P0
P0
Reading of M-codes
CPSTART1
Axis 3
Speed 1000PLS/s
INC-1
Axis 3, 200000PLS
M-code 3
INC-1
Axis 3, 300000PLS
M-code 5
INC-1
Axis 3, 400000PLS
M-code 4
CPEND
PY000
to
PY00F
SET M2042
#0=BCD(D53)
DOUT Y110, #0
SET Y120
After M-code storage area for axis 3
is changed into BCD code, it is output
to Y110 and Y120 turns on.
Speed . . . 1000PLS/s
M-code output . . . 3
Positioning . . . 200000PLS
address
1
)
#2=BCD(D53)
DOUT Y110, #2
SET Y122
(D53==3)+(D53==5)
D53==5
!M2003
END
#0=0
#1=0
#2=0
#1=BCD(D53)
DOUT Y110, #1
SET Y121
All axes servo ON command
turns on
1 axis constant-speed control
Stand by until PX000 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 . . . 300000PLS
address
M-code output . . . 5
Axis used . . . Axis 3
Axis used . . . Axis 3
Positioning . . . 400000PLS
address
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 Y110 and Y121
turns on.
After M-code storage
area for axis 3 is
changed into BCD code,
it is output to Y110 and
Y122 turns on.
1)
Q02H
CPU