Failed to request image - Integrated Vision

Jamiem
✭
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:
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 0
Categories
- All Categories
- 5.6K RobotStudio
- 398 UpFeed
- 20 Tutorials
- 14 RobotApps
- 300 PowerPacs
- 406 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 336 IRC5
- 67 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 828 RAPID Programming
- 12 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 107 Collaborative Robots
- 5 Job listings