Installation guide
Application Examples 285
13.1.2 - Example Description
The example program allows an arbitrary shape to be
taught, printed or executed. Four inputs on the axis card
are used to accomplish this. Axis 1 (A side) Event 1 input
is assigned as the
Teach
input. Axis 1 (A side) Event 2
input is assigned as the
Print
input. Axis 2 (B side) Event
1 is assigned as the
Register
input. Axis 2 (B side) Event
2 input is assigned as the
Execute
input. The
Teach
input
switch must be a toggle switch and the remaining inputs
can be momentary switches.
A two axis Joystick is connected to the designated axes
analog input. This joystick is used to teach the arbitrary
path to the controller. The circuit above should be used if
possible to accomplish this.
The Program is broken into four distinct sections. The
sections are main, execute taught program, print taught
program, and teach program. These sections are described
in detail below.
A sample program is included on the next page of this
manual.
13.1.3 - Main Section
Moves the axes to the mechanical home positions and
scans the Teach, Print and Execute inputs. When an input
becomes active start executing the selected section.
13.1.4 - Teach section
This subroutine allows the user to trace an arbitrary shape
by positioning, under joystick control, points on the
shape’s periphery. With one task running a maximum of
700 points are allows for a PATH command.
First the joystick is used to position the motors to the
starting position for the desired shape. This position is
recorded in NVR(1) and NVR(2) and becomes the start-
ing position for the shape when the Register button is
pressed.
Thereafter, pressing the Register button and then releasing
it records the different points on the arbitrary shape. The
coordinates of each point are automatically recorded into
the MX2000 non-volatile memory. The X coordinates are
captured in the even NVR elements and the Y coordinates
are captured in the odd elements starting at element 4.
NVR (3) contains the ending element of the coordinates
captured.
The recording session is ended when the Teach input
switch is open circuited.
13.1.5 - Print program section
Transmits ASCII text on the Auxiliary serial port that can
be used as the program text to execute the arbitrary shape
profile. Thus, this program will free up the non-volatile
ram for another shape.
13.1.6 - Execute program section
This section allows the arbitrary shape program to be
tested. The program ends after the arbitrary shape pro-
gram is executed. If the shape needs a correction, print out
the program and adjust the data in the appropriate NVR
locations. Then restart the program and execute the arbi-
trary shape again.










