deluxe79 - 2007-11-29

I'm trying to get SysTaskCreate to work, but it returns 16#FFFFFFFF (TASKID_INVALID).

Here is my code:

PROGRAM PLC_PRG
VAR
Β  handle : UDINT;
Β  dwParam : DWORD;
END_VAR
handle := SysTaskCreate('Task_1', 32, 100, SysIECGetFctPointer(INDEXOF(CallbackTest)), ADR(dwParam));
WHILE TRUE DO
Β  SysTaskSleep(1000);
END_WHILE
PROGRAM CallbackTest
VAR_INPUT
Β  dwParam : DWORD;
END_VAR
{some code...}

What am I doing wrong here?

Best regards,

Frank