
72
AX
DRIVE
USER
GUIDE
Sample
Application
and
Commands
Multi-Axis
Interface
Program
Example
Example:
Three
indexers
are
on
an
RS-232C
daisy
chain.
Send
the
following
commands:
Command
MN
AS
V1"
1
064""
20128""
3D
192""
G
Description
Sets unit to Preset mode
Sets acceleration to 5 revs/sec
2
for all three
indexers
Sets velocity to 10 rps for all three indexers
Sets Axis 1 distance to 6,400 steps
Sets Axis 2 distance to 12,800 steps
Sets Axis 3 distance to 19,200 steps
Moves
all axes.
Unit 1 moves
6.400
steps,
unit
2 moves 12.800 steps.
and
unit
3
moves
19.200
steps.
All
three
units
use
the
same
acceleration
and
velocity
rates.
Units 1. 2.
and
3
will
start
at
about
the
same
time (2mS
apart.
due
to
a propagation delay of 2
characters
over
the
RS-232C interface).
The
following
program
is
very
similar
to AX.BAS. except
this
program
controls
2 AX's
on
a
daisy
chain.
This
program
assumes
the
device
address
of 2
AXs
to
be
1
and
2 respectively.
The
program
does
the
following:
• Executes
the
first move
upon
user
input
•
Waits
for a line feed from
the
LX
drive.
which
indicates
the
end
of
the
move.
• Upon
user
input.
executes
the
second move
on
axis
2
• Waits for a line feed from
the
second
AX.
which
indicates
the
end
of
the
move.
It
then
begins
the
process
again.
1 '
2'
3'
AX2.BAS PROGRAM
***********.****
•••
*******
•••
*.**
••••
******
••
***************
4 ' *
5 ' * This program controls the RS232 Communication line
to
execute 2
6 '
* different moves using 2
AX
units.. '
7 ' * *
B ' *
* * * •
..
* * * • • * •
..
* • * * * * * * * * • * * • • •
..
•
..
• *
..
* • * * * * * * * * • * • • * * * * * * * * * • •
15
OPEN
"COM1
:9600,N,B,l,RS,CS,DS,CD"
AS
#1
' Open Communication port
20
V$
= "":
0$
= "": ECHO$ = "-: LF$ = --: ' Initialize variables
90
CLS
1 00 LOCATE 12,15
105
PRINT"
PRESS
ANY
KEY
TO
START
THE
PROGRAM"
107
V$
= INKEY$:
IF
LEN(V$) = 0 THEN 100 • Wait for input from user
120 Z$ = "Z - , Reset the
AX
indexer
122
PRINT
#l,Z$;
124
0$
= INPUT$(2,1)
Komentáře k této Příručce