
MCO 305 Design Guide
__ Software Reference __
MG.33.L4.02 – VLT
®
is a registered Danfoss trademark
99
AXEND
Summary
AXEND reads info on status of program execution.
Syntax
res = AXEND
Return Value
res = axis status with the following meaning:
Value Bit
128
7
1 = Motor is reset, i.e. it is ready to start and is controlling
again, e.g. after ERRCLR, MOTOR STOP, MOTOR ON
64
6
1 = axis controller is OFF, motor is off
4 - 5
not in use
8
3
1 = motor is at STOP status
4
Bit 2
1 = speed mode is active
2
Bit 1
1 = positioning procedure is active
1
Bit 0
1 = target position reached; motor is not in motion
Description
The AXEND command gives the actual status of the axis or the status of the
program execution.
This means for example that you can enquire when the “position is reached” and a
positioning command (POSA, POSR) has actually been completed. When Bit 1 is set
at [0] the positioning process is complete and the position reached.
If, however, the positioning command has been interrupted with MOTOR STOP and
continued later with CONTINUE, then the following bits would be set at [1]:
the Bit 0 for “motor is at a standstill”
the Bit 1 for “positioning process active”
the Bit 3 for “motor is at STOP status”
the Bit 6 for “axis controller switched off”
The AXEND command is especially suitable for determining whether or not a
movement in the NOWAIT ON condition is terminated.
Command Group
I/0
Cross Index
WAITAX, STAT, NOWAIT
Syntax Example
NOWAIT ON
// do not wait until position is reached
POSA 100000
WHILE (AXEND&2) DO
// as long as the positioning process is active, repeat loop
IF IN1 THEN
// if input 01 is set
VEL 100
// increase velocity
POSA
100000
WAIT IN1 OFF
// wait until input (key) is off
ENDIF
ENDWHILE
// position reached
Syntax Example
IF (AXEND&64) THEN
OUT 1 1
// set output 01, when axis controller is switched off
ELSE
OUT 1 0
ENDIF
Program Sample
AXEND_01.M
Содержание MCO 305
Страница 4: ......