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
more
than one MTR area, this user defined MTR function
will be ver
useful.
Explanation:
The main control of this pro
ram rests in the timer
interrupt I620. This interrupt tri
ers ever
20msec
re
ardless of what the main pro
ram is doin
. On
each interruption one bank of the user defined
matrix is read. The pro
ram simpl
consists of
readin
the inputs tri
ered b
each of the
multiplexed outputs.
The read data is then stored in sequential sets of
auxiliar
re
isters.
Each MOV instruction reads a new bank of
multiplexed inputs.
The equivalent MTR instruction is shown
immediatel
before the 'user defined' MTR.
See the MTR instruction on pa
e 5-54 for more
details.
10.12 An Example System
Application Using STL And IST Program Control
The followin
illustration shows a simple 'pick and
place' s
stem utilizin
a small robotic arm. The zero
point has been de-fined as the uppermost and left
most position accessible b
the robot arm.
A normal sequence of events
A product is carried from point 'A' to point 'B' b
the
robot arm. To achieve this operation the followin
sequence of events takes place:
Initial position: the robot arm is at its zero point.
1) The Robots
rip is lowered to it lowest limit
- output Y0: ON, input X1: ON, output Y0: OFF.
2) The
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