int startPLC(int argc,char **argv) { if(__init(argc,argv) == 0){ PLC_SetTimer(0, common_ticktime__); return 0; }else{ return 1; } }
void PLC_task_proc(void *arg) { PLC_SetTimer(common_ticktime__, common_ticktime__); while (!PLC_shutdown) { PLC_GetTime(&__CURRENT_TIME); __run(); if (PLC_shutdown) break; rt_task_wait_period(NULL); } }