CASE nStateXPU OF 0: // init environment IF fbEnvironment.Init(TRUE) THEN ipXpu:=fbEnvironment.XpuTcIo(1); nStateXPU:=1; END_IF
1: //check if MoverDetection is done and the Identification process should be started IF bStartMoverIdentification AND (ipXpu.GetMoverDetectionInfos().TotalDetected = ipXpu.GetMoverDetectionInfos().TotalExpected) THEN ipXpu.SetStartMoverIdentification(): nStateXpu:=2; END_IF 2://check and wait if the Identification process has succeded successfully IF ipXpu.GetMoverDetectionInfos = MoverIdentificationStatus.IdentificationSuccessful THEN //MoverIdentification Successful nStateXPU:=3 END IF END_CASE