Danfoss VLT 5000 Series Manual page 84

Synchronizing and positioning option onizing and positioning option
Hide thumbs Also See for VLT 5000 Series:
Table of Contents

Advertisement

Command group
INI
Cross Index
INDEX
Parameter: HOME_VEL (7), HOME_RAMP (41),
HOME_TYPE (40), HOME_FORCE (3)
Syntax-Example
HOME
/* move to reference switch and index */
Program sample
HOME_01.M
I I I I I IF ..THEN .., ELSEIF .. THEN .. ELSE .. ENDIF
Conditional program branching can be realized
with the IF..ENDIF construction.
When the conditions following IF or ELSEIF are
fulfilled, then the commands leading to the next
ELSEIF, ELSE or ENDIF are carried out – and the
program will be continued after the ENDIF in-
struction.
When the conditions are not fulfilled, then the
following ELSEIF branching will be checked and,
in as much as the conditions are fulfilled, the
corresponding program part will be carried out,
and the program continued after ENDIF.
The branching conditions that are checked after IF
or ELSEIF can be made up of one or more com-
parison operations.
Any number of ELSEIF branching can occur within
an IF...ENDIF construction – however, only one
ELSE instruction should be available. Following the
ELSE instruction is a program part that must be
carried out, in as much as none of the conditions
are fulfilled.
The ELSEIF and ELSE instructions can, but do not
have to be, contained within an IF ENDIF
construction.
Summary
Conditional single or multiple program branching.
(When the conditions are fulfilled, then ... ... ... ... ..., else ... ... ... ... ...)
84
VLT
®
5000 SyncPos option
Syntax
IF condition THEN command
ELSEIF condition THEN command
ELSE command
ENDIF
Parameter
condition = Branching criteria
command = one or mor program commands
NB!
After a condition has been fulfilled, the
appropriate program part will be carried out
and the program following the ENDIF instruction
continued. Further conditions will no longer be
checked.
Command group
CON
Cross Index
REPEAT .. .. .. .. .. UNTIL, WHILE ..ENDWHILE
Syntax-Example
/* simple branch */
IF (a == 1) THEN
/* Variable a = 1, then */
command line 1
command line n
ENDIF
/* multiple branch */
IF (a == 1 AND b != 1) THEN
command lines
ELSEIF (a == 2 AND b != 1) THEN
command lines
ELSEIF (a == 3) THEN
command lines
ELSE
command lines
ENDIF
Program sample
IF_01.M; ERROR_01.M, EXIT_01.M, HOME_01.M,
IN_01.M, ...
MG.10.J4.02 – VLT is a registered Danfoss trade mark

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents