57
Appendix
A4
➔
Jump-in address for sequence 2
LPC500
➔
Set peak current to 500 mA...
(continuous current
≤
peak
current)
LA1000000
NP
TIMEOUT500
➔
After 5 seconds delay the
program will start even if
the given position has not yet
been reached.
M
V0
LR0
M
➔
Stops motor
JMP1
➔
Jumps to continuous loop
A5
➔
Jump-in address for sequence 3
SETA1000
➔
Define variable A
A6
LR10000
NP
M
DELAY100
LR-5000
NP
M
DELAY50
DAJNZ6
➔
Repeat the loop 1000 times
JMP1
➔
Jump to continuous loop
Commentary:
■
The homing sequence is called up by sending
the JMP2 command from the RS-232.
The other routines are called up in a similar
manner.
■
The NP command without an arguement
makes sure that the sequence stops at the
M command until the command position has
been achieved.
Program:
Sequence Controlled by the Digital Input
Goals:
■
After power on the motor should run first
to the limiter switch and then the Hall index
zero.
■
At a rising edge at the digital input (fault pin
has been reprogrammed) the motor will make
5 forward revolutions. (Then stop if the logic
level is then low).
■
If the logic level is still high after 5 revolutions
then the motor should run to position 0.
Configuration:
SOR0
➔
Switches to speed control over
the RS-232
LR0
➔
No motion
M
➔
Switches to position control
REFIN
➔
Reprograms fault output as an
input
HA1
HL1
➔
Analog input is limiter switch
HN1
CAHOSEQ
➔
Saves homing sequence
to the intermediate memory
POHOSEQ1
➔
Activates power on homing
sequence