Manual – IPOSplus®
243
17
Standard functions
Compiler – Functions
Example main()
{
_TouchProbe( TP_EN1 ); // Enables the touch probe input DI02
}
17.3.28 _Wait
Syntax
_Wait( time )
Description Waits for the period (in milliseconds (ms)) specified in a constant.
Key points time Constant that specifies the wait time in milliseconds; no variable possible.
Example
Timer_0 = 20000; // start value 20 s
while( Timer_0 ){} // wait 20 s
17.3.29 _WaitInput
Syntax
_WaitInput ( level, mask )
Description The function waits until a specific level is present at specific input terminals. The re-
quired polarity of the input level and the relevant terminals are given as arguments. The
function waits until all input terminals marked with a one in mask have a "1" level or a
"0" level.
Key points level Constant expression that specifies which signal level the terminals should be
tested for. It can adopt one of the following values:
mask Constant binary expression which specifies the terminals to be tested. The bits
in the expression have the following meaning
INFORMATION
If the waiting time is to be variable, you will have to initialize a timer (H487 ...H489)
instead of a WAIT command and program a loop until the timer has expired.
1: HIGH level ("1" level)
0: LOW level ("0" level)
Bit 0: DI00, mask = 0b1
Bit 1: DI01, mask = 0b10
Bit 2: DI02, mask = 0b100
Bit 3: DI03, mask = 0b1000
Bit 4: DI04, mask = 0b10000
Bit 5: DI05, mask = 0b100000
Bit 6: DI10, mask = 0b1000000
Bit 7: DI11, mask = 0b10000000
Bit 8: DI12, mask = 0b100000000
Bit 9: DI13, mask = 0b1000000000
Bit 10: DI14, mask = 0b10000000000
Bit 11: DI15, mask = 0b100000000000
Bit 12: DI16, mask = 0b1000000000000
Bit 13: DI17, mask = 0b10000000000000
Bit 14-31: Reserved