![SEW-Eurodrive IPOS plus Скачать руководство пользователя страница 235](http://html1.mh-extra.com/html/sew-eurodrive/ipos-plus/ipos-plus_manual_1250042235.webp)
Manual – IPOSplus®
235
17
Standard functions
Compiler – Functions
Example
#include <constb.h>
#define DATA H20
#declare DATE DATA:0
#define INTEL 0x100
#define NUM_BYTES 4
SCTRCYCL Obj1;
main()
{
Obj1.ObjectNo = 1090;
Obj1.CycleTime = 10;
Obj1.Offset = 0;
Obj1.Format = INTEL ¦ ANZ_BYTES // Set high und low byte
Obj1.DPointer = numof(DATA);
DATUM = 0;
_SBusCommDef( SCD_TRCYCL,Obj1 ); // Send obj1 cyclically
_SBusCommState( SCS_START1 ); // Start of the transmission for SBus1
while(1)
{
// Main program task 1
}
}
17.3.21 _SetInterrupt
Syntax
_SetInterrupt( event , function name)
Description
The function is used for specifying a user-defined function as an interrupt routine. The
name of the function is given as an argument. An interrupt may be triggered by various
events. The required event is given as an argument.
Key points
event
Constant expression that can adopt one of the following values:
function name
Name of the interrupt function. (Important: In contrast to a function
call, only the name of the function without () is specified here.)
SI_DISABLE:
Interrupt is inhibited
SI_ERROR:
Triggers an interrupt in case of a system error
SI_TIMER0:
Triggers an interrupt when Timer0 is exceeded
SI_TOUCHP1:
Initiates an interrupt in case of an edge change on a touch probe terminal if touch probe
was activated
P
i
f
kVA
Hz
n
P
i
f
kVA
Hz
n