Danfoss VLT5000 SyncPos Operating Instructions Manual page 147

Motion controller for danfoss vlt5000 series; danfoss vlt 5000flux series
Table of Contents

Advertisement

■ ■ ■ ■ ■ STAT
The STAT command reports the actual status of the
axis control unit as well as that of the axis. For
example, whether the axis controller shuts down,
ends the motion or the end switch is active. The
status of the program execution cannot be called up
with STAT, but only with AXEND.
The status consists of a total of four bytes.
Summary
Query axis and control status
Syntax
res = STAT
Return value
res = Axis- and Control status (4-Byte value):
Byte 3
MSB
Bit 0
1 = MOVING
Bit 1
1 = OVERFLOW Slave Encoder
Bit 2
1 = OVERFLOW Master Encoder
Bit 3
1 = POSFLOAT active *)
Byte 2
Status byte of axis control
Bit 7
1 = axis control switched off
Bit 2
1 = position reached
Bit 0,1,3-6
has no meaning
Byte 1
not used
Byte 0
LSB
Bit 7
1 = limit switch active
Bit 6
1 = Reference switch active
Bit 2
1 = axis control switched off
Bit 0,1,3,4
not in use
*) Explanation: i.e. the axis is within the tolerance
range of the control window REGWINMAX /
REGWINMIN. As soon as the control window is set,
the axis controller is switched on again.
Command group
I /O
Cross Index
AXE N D
Syntax-Example
PRINT STAT
Program sample
STAT_01.M
146
/* print status word */
Programmable SyncPos motion controller
■ ■ ■ ■ ■ SUBMAINPROG .. ENDPROG
The code word SUBMAINPROG begins the sub-
routine section, and the code word ENDPROG
ends this specific program. The term subroutine
means command sequences that, via the GOSUB
instructions, can be called up and executed from
various program positions.
All necessary subroutines must be contained within
the subroutine section. It is possible to insert a sub-
routine anywhere within a main program; however,
for reasons of clarity, it is advisable to insert it either
at the beginning or end of a program.
Summary
Subroutine section definition
Syntax
SUBMAINPROG
ENDPROG
NB!
Only one subroutine area may be inserted
within a program.
Command group
CON
Cross Index
SUBPROG ...RETURN,
GOSUB, ON ERROR GOSUB, ON INT n GOSUB
Syntax-Example
SUBMAINPROG
/* Begin the subroutine section */
subroutine 1
subroutine n
ENDPROG/* End the subroutine section */
Program sample
G OSU B_01.M
AXE ND_01.M, ERROR_01.M, INCL_01.M,
STAT_01.M
MG. 1 0.J8.02 – VLT is a registered Danfoss trade mark

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents