Manual – IPOSplus®
177
14
Preprocessor statements
Compiler – Programming
#define T0_Reload H485
#define Reserve4 H486
#define Timer_2 H487
#define Timer_1 H488
#define Timer_0 H489
#define WdogTimer H490
#define SetpointPos H491
#define TargetPos H492
#define PosWindow H493
#define LagWindow H494
#define LagDistance H495
#define SLS_right H496
#define SLS_left H497
#define RefOffset H498
#define SetpPosBus H499
#define Reserve6 H500
#define Reserve7 H501
#define TpPos2_Abs H502
#define TpPos1_Abs H503
#define TpPos2_Ext H504
#define TpPos2_Mot H505
#define TpPos1_Ext H506
#define TpPos1_Mot H507
#define Reserve8 H508
#define ActPos_Abs H509
#define ActPos_Ext H510
#define ActPos_Mot H511
#endif
The actual structure of the header file starts with '#ifndef _CONST_H' after a general re-
mark section. This "#ifndef" instruction is at least always accompanied by an '#endif'.
You can find this '#endif' instruction in the last program line of the header file. The task
of this '#ifndef' and '#endif' construction is to prevent the file being linked more than
once.
The statements within this construction are only performed if a macro identifier, here
‘_CONST_H’, has not yet been defined (
ifn
ot
def
ined). A '#define _CONST_H' is posi-
tioned in the next line of the program to define this macro identifier. Therefore, if the
header file is processed during compilation by the '#include <const.h>' command, the
'#ifndef _CONST_H' query is initially answered in the affirmative because the
"_CONST_H" macro identifier has not yet been encountered. It is then identified imme-
diately with '#define _CONST_H'. Then, if the 'const.h' header file is linked elsewhere in
the program, the '_CONST_H' macro identifier has already been identified and the '#if-
ndef _CONST_H' query is answered in the negative. As a result, processing immedi-
ately jumps to the "#endif" statement. This prevents the file from being incorporated un-
necessarily more than once, which would lead to an error message.
P
i
f
kVA
Hz
n
P
i
f
kVA
Hz
n