244
Manual – IPOSplus®
17
Standard functions
Compiler – Functions
An input combination can be selected by setting the appropriate bits in the mask to 1.
For example, to query DI00 and DI03, mask must be: 0b1001
Example
#include <constb.h>
main()
{
_WaitInput( 1,0b100 );
// as long as terminal DI02 == HIGH ("1"), wait
}
17.3.30 _WaitSystem
Syntax
_WaitSystem( event )
Description The function waits for as long as a system-related event is present. The required event
is given as an argument.
Key points event Constant expression that specifies when the function waits. This expression
can adopt one of the following values:
Example
main()
{
_WaitSystem( SC_N0 ); // as long as speed == zero, wait
}
17.3.31 _WdOff
Syntax
_WdOff()
Description The watchdog is switched off.
Argument The command does not have an argument.
Example
main()
{
WdOFF();
}
SC_UC: Unconditional
SC_N0: When the speed is zero
SC_N: When the speed is not zero
SC_NOTPOS: If not in position
SC_TP1: If there is an edge change at touch probe terminal DI02
SC_NTP1: If there is no edge change at touch probe terminal DI02
SC_TP2: If there is an edge change at touch probe terminal DI03
SC_NTP2: If there is no edge change at touch probe terminal DI03