
Manual – IPOSplus®
239
17
Standard functions
Compiler – Functions
Example
#include <constb.h>
MyTask3 ()
{
// Statements of task 3
}
main()
{
// Inform system of task 3 and start
_SetTask ( ST3_START,MyTask3 );
while(1)
{
// Main program
}
}
17.3.24 _SetTask2
Syntax
_SetTask2( control word, function name )
Description
This function is used to determine a user-defined function as task 2 and to start or stop
this task. The name of the function and the control word are given as arguments. The
control word and start address are both set to 0 when the power is switched on, i.e.
Task2 is deactivated.
In MOVIDRIVE
®
B, the command has been replaced by _SetTask. However, due to
downward compatibility, it is still available with MOVIDRIVE
®
B.
Key points
control word
Constant expression that can adopt one of the following values:
function name
Name of the Task2 function. (Important: In contrast to a function call,
only the name of the function without () is specified here.)
Example
#include <constb.h>
MeineTask2 ()
{
// Statements of task 2
}
main()
{
// Inform system of task 2 and start
_SetTask2( T2_START,MyTask2 );
while(1)
{
// Main program
}
}
T2_STOP: Stop task 2
T2_START: Start task 2
P
i
f
kVA
Hz
n
P
i
f
kVA
Hz
n