Mitsubishi Electric R16MTCPU Programming Manual page 342

Hide thumbs Also See for R16MTCPU:
Table of Contents

Advertisement

■No.150: Programming operation
Programming operation
[G150]
//(OFF to ON)detection of X3.
//X3 turns on M0 in on when M1 (last time
//condition of X3) is off.
RST M0
SET M0=X3 * !M1
//Condition was stored in M1 last time
//of X3.
RST M1
SET M1=X3
//When M0 is ON(OFF to ON of X3 is
//detected.), it transition to the next steps.
M0
[K150:Real]
1 INC-1
Axis
1, 1000000 pulse
Speed
500000 pulse/s
[G153]
//It waits 1000[ms] after the motion control
//completion.TIME K1000
[K152:Real]
1 INC-1
Axis
2,
2000000 pulse
Speed
1000000 pulse/s
[G155]
NOP //Waits for the motion control
//completion.
When OFF to ON of
X3 is detected,
1000[ms] after 1 axis
positioning completion
stands by, and the
positioning of 2 axes
is executed, and
stands by to the
positioning completion
of 2 axes.
APPENDICES APPENDIX
340
Appendix 2 Sample Program
P0
[G151]
//Did you turn on X4?
X4
Detection for
leading edge of bit
device (X3).
Condition was
memorized in M1
last time, and OFF
to ON of X3 was
detected.
[F150]
#0L=1000000//1 axis positioning address
//set
#2L=2000000//2 axes positioning address
//set
#4L=500000//Positioning speed
[K151:Real]
1 INC-2
Axis
Axis
Vector speed
[G154]
//Did you turned on 1 axis and 2 axis
//in-position?
M2402*M2422
[F151]
#0L=-#0L //1 axis positioning address sign
//inversion
#2L=-#2L //2 axes positioning address sign
//inversion
#4L= #4L*2 //Positioning speed *2
[K151:Real]
1 INC-2
Axis
Axis
Vector speed
[G156]
//Did you turn on X4?
!X4
P0
When X4 is on, the linear interpolation control of the 1 axis and 2 axis is
executed at a double speed in the action, the opposition direction after
the linear interpolation control of the 1 axis and 2 axis in-position check.
And stands by to X4 is OFF.
[G152]
//Did you finish a programming operation
//mode?
!(X2*X1)
Positioning address, the indirect
designation of the speed.
1, # 0 pulse
2, # 2 pulse
# 4 pulse/s
Positioning address, the indirect
designation of the speed.
1, # 0 pulse
2, # 2 pulse
# 4 pulse/s
END

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

R64mtcpuMelsec iq-r seriesR32mtcpu

Table of Contents