EasyManua.ls Logo

SEW-Eurodrive IPOS plus - Page 189

SEW-Eurodrive IPOS plus
384 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Manual – IPOSplus®
189
14
Explanation of const.h and io.h / constb.h and iob.h
Compiler – Programming
The io.h header file defines macros that make it easier to query terminal levels. The fol-
lowing example illustrates this point.
The if statement queries terminal DI00, the /CONTROLLER INHIBIT terminal. If the ar-
gument of the if statement is zero, then the statements in the else part are processed
(assuming there is an else part). In this case, IPOS
plus®
variable H1 is set to zero or one
depending on the input level of terminal DI00. Note that it is impossible to query when
the terminal is set to 1 (DI00 == 1) because the macro supplies a binary evaluation. In
practical terms, it is possible to query for zero (DI00 == 0) or not equal to zero (DI00 != 0).
This program extract can be made clearer using the commands which have already
been explained. This is done by introducing additional symbolic identifiers.
The following appears in the variable window:
if( DI00 )
{
H1 = 1; // execute command block, if terminal DI00 has NOT level 0
}
else
{
H1 = 0; // execute command block, if terminal DI00 has level 0
}
#define controller_inhibit H1
#define HI 1
#define LO 0
if( DI00 )
{
controller_inhibit = 1; // execute command block, if terminal DI00 has NOT
//level 0
}
else
{
controller_inhibit = 0; // execute command block, if terminal DI00 has
//level 0
}
499400587
INFORMATION
Note that the io.h header file must be linked using the #include io.h command line be-
fore it can be used.
P
i
f
kVA
Hz
n
P
i
f
kVA
Hz
n

Table of Contents