Mitsubishi Electronics FX Home Theater Server User Manual


 
FX Series Programmable Controllers Points Of Technique 10
10-8
10.11 Creating a User Defined MTR Instruction
For users who want to have the benefits of the MTR
instruction for FX users who want to specif
y
more
than one MTR area, this user defined MTR function
will be ver
y
useful.
Explanation:
The main control of this pro
g
ram rests in the timer
interrupt I620. This interrupt tri
gg
ers ever
y
20msec
re
g
ardless of what the main pro
g
ram is doin
g
. On
each interruption one bank of the user defined
matrix is read. The pro
g
ram simpl
y
consists of
readin
g
the inputs tri
gg
ered b
y
each of the
multiplexed outputs.
The read data is then stored in sequential sets of
auxiliar
y
re
g
isters.
Each MOV instruction reads a new bank of
multiplexed inputs.
The equivalent MTR instruction is shown
immediatel
y
before the 'user defined' MTR.
See the MTR instruction on pa
g
e 5-54 for more
details.
10.12 An Example System
Application Using STL And IST Program Control
The followin
g
illustration shows a simple 'pick and
place' s
y
stem utilizin
g
a small robotic arm. The zero
point has been de-fined as the uppermost and left
most position accessible b
y
the robot arm.
A normal sequence of events
A product is carried from point 'A' to point 'B' b
y
the
robot arm. To achieve this operation the followin
g
sequence of events takes place:
Initial position: the robot arm is at its zero point.
1) The Robots
g
rip is lowered to it lowest limit
- output Y0: ON, input X1: ON, output Y0: OFF.
2) The
g
rip clamped around the product at point A
- output Y1: ON.
On each scan of
this routine a
differentinput
block is read
M8000
EI
FEND
X30
MTR
M8000
Y30
REF
Y31
Y30 M100 K4
I620
K8X30
MOV
K2M100
K2X30
MOV K2M110
K2X30
Y32
Y33
MOV
K2M120K2X30
MOV
K2M130
K2X30
Y33
PLS
M499
Y32
PLS
IRET
Y31
PLS
END
Y30
PLS
Y33
M8000
REF
K8Y30
PLS
Y30
Y30Y31Y32Y33
M499
Y31
Y32
Equivalent
MTR instruction
The interrupt
routine is scanned
every 20 msec
This program
area controls
which input block
will be read
X30-37 is
refreshed at the
start of the
routine while
Y30-37 are
refreshed here
A
B