RobotStudio event

Integrated vision for multi parts indentification

Hello,

I am currently using the integrated vision to identify parts based on size. For example, I put 6 parts of 3 different sizes: 2 part_A, 2 part_B, 2 part_C. 
I use the following codes to get the coordinates of these parts:

    CamReqImage Mycamera;
    CamGetResult Mycamera, Mytarget;    

Then I copy the vision coordinates from the camera to the object frame by:

    myWobj.oframe := Mytarget.cframe;   
    MoveL PickPoint, v200, fine, Servo \WObj:=myWobj;

But the codes above can only copy one coordinate each time.  I have to require another image to pick the second object.
Is there a way to export all the 6 coordinates from 'Mytarget'?  In this case, I can run the vision task only once then the robot can pick these parts one by one.

Many thanks in advance!
Ran

Comments

  • Hi Ran

    Have you sorted this issue already?

    If not:
    Your code seems (in principle) ok.
    The issue will be in the Camera Job, not Rapid.
    - What version of RS are you using?
    - What tool(s) are you using for this job?

    In your job, you may have to identify and count the Patterns (one tool) before you extract the coordinates (another tool).
    Hope this helps.

    Regards,
    Rui
  • Hi Ran

    Have you sorted this issue already?

    If not:
    Your code seems (in principle) ok.
    The issue will be in the Camera Job, not Rapid.
    - What version of RS are you using?
    - What tool(s) are you using for this job?

    In your job, you may have to identify and count the Patterns (one tool) before you extract the coordinates (another tool).
    Hope this helps.

    Regards,
    Rui
    Hi Rui,

    Thank you for your reply. I have sorted this issue by using a DO...WHILE loop.
    The code will read Mytarget until there is no coordinate. :)

    Cheers,
    Ran