TwinCat的上电扫描一个周期指令
PROGRAM MAIN
VAR
abc: WSTRING;
END_VAR
//FUNCTION GETCURTASKINDEXEX : DINT 获取任务编号
IF _TaskInfo[GetCurTaskIndexex()].FirstCycle THEN
abc:="TASK";
END_IF
PROGRAM MAIN
VAR
abc: WSTRING;
END_VAR
//FUNCTION GETCURTASKINDEXEX : DINT 获取任务编号
IF _TaskInfo[GetCurTaskIndexex()].FirstCycle THEN
abc:="TASK";
END_IF