Failed to request image - Integrated Vision

Hello,
I am having an issue triggering the integrated vision camera when i use the optional argument \AwaitComplete. I understand that the trigger mode in the camera has to be set to External which it is but i still get the error. The reason i am using this command is because occasionally old image data will stay in the camera and the next robot pick will use old image data. I'm also using the Camflush command but it doesn't seem to work. Does anyone have any insight as to why the await complete isn't working?

Below is my code:
 !Clear Old Data From Camera
        CamFlush EOATCamera;

        !Change the camera name if expected job is not loaded
        IF CamGetLoadedJob(EOATCamera)<>CamJobUpper THEN
            CamSetProgramMode EOATCamera;
            CamLoadJob EOATCamera,CamJobUpper;
            CamSetRunMode EOATCamera;
            WaitUntil CamGetLoadedJob(EOATCamera)=CamJobUpper;
        ENDIF

        CamSetRunMode EOATCamera;

        Clear CaptureNum;

        WHILE CaptureNum<=3 AND UpperCameraTarget.Val1=0 DO
            CamReqImage EOATCamera\AwaitComplete;
            CamGetResult EOATCamera,UpperCameraTarget;
            Wobj_Upper.oframe:=UpperCameraTarget.cframe;
        ENDWHILE   
Sign In or Register to comment.