Integrated Vision emulator

Hello,

I have problem with CamGetResult instruction. I connecteed virtual system with virtual camera, then I created a job and load a image and properly set Output To Rapid settings.I want get result from the image and display it to the FlexPendant, but my ProgramPointer always stops on CamGetResut instruction.
Here is my Code:
PROC proc1()
CamSetProgramMode mycamera;
CamLoadJob mycamera,myjob;
CamSetRunMode mycamera;
CamReqImage mycamera;
CamGetResult mycamera, mycameratarget;TPWrite "position on X axis: "+NumToStr(mycameratarget.cframe.trans.x,2);
ENDPROC

Best Regards,
Piotr

Comments

  • Hi Piotr

    Have you sorted this issue already?
    I have the same issue and I am in the process of solving it.

    In the mean time you can use the [\MaxTime] option so the the program ends nicely instead of hanging forever.
    It may also be useful to use the Error handling capability.

    Check page 104 of 3HAC044251-001 Rev:D [Application manual - Integrated Vision] for more information.

    Hope this helps,

    Rui

  • Henrik BerlinHenrik Berlin Sweden admin

    Using RAPID code against a camera emulator would probably not work. The reason for this is because the instruction "CamReqImage" will trigger the camera to take a new picture and this is a functionality that Cognex is not supporting in their emulators as emulators are built around the manual trigger type.

    We know that some customers have been able to get their code working with trigger type set to manual and then by manually loading an image (using RS) while the RAPID pointer is currently running the “CamGetResult”. However, this doesn’t reflect on how IV is supposed to work in production, so please consider this to be a non-supported work around.

Sign In or Register to comment.