RobotStudio event

[Integrated Vision] CamGetResult problems

I'm having a problem with getting info from the camera to RAPID using CamGetResult. The problem is that it doesn't work.

1. So a client is trying to use an ABB Integrated Vision camera. Robot moves a product in front of the camera, it takes an image using CamReqImage and then when it reaches the CamGetResult instruction, it instantly generates the error ERR_CAM_NO_MORE_DATA. However, parameters from the camera could be read just fine using CamGetParameter.

2. When trying the same thing on a different camera connected to a different controller, the result is quite the opposite. CamGetResult just hanged forever, as if there was no data to get from the camera.
Note: when CamGetResult was preceded by acquiring a new image (using CamReqImage), then CamGetResult would work and produce a camtarget with the right data in it. It's just that I was using an image sent by the client to test this on our own camera, so the image comes from my PC and I cannot request a new image. So it seems that CamGetResult doesn't produce a camtarget when a new image has not been taken. Is this true? Yet this doesn't explain the problem on the client setup.

Why does CamGetResult behave in such a way? Does anyone experienced with Integrated Vision have an idea what could be the underlying cause here?

Thanks!

Comments

  • ERR_CAM_NO_MORE_DATA is generated if there is no result from the camera. CamGetParameter only reads the parameters of the camera, not the result. This means you have established a connection to the camera, but there is no object that passes, or you have cycled through all available objects. Try using CamNumberOfResults as condition for fetching the result, or handle the above error in the error handle. I.e.

    CamReqImage Name_of_your_cameradev\AwaitComplete;
    IF CamNumberOfResults(Name_of_your_cameradev) > 0 CamGetResult;
  • Alright, but why could it be that the camera has no result or no available object after the instructions CamReqImage, CamGetResult? Yes, CamNumberOfResults could be used as a condition, but it's going to tell me what I already know (that it's 0 and it's gonna generate the error) and it doesn't really solve the question here.

    It also turned out that using CamGetParameter instructions instead of CamGetResult is not good, because every instruction takes more than 3 seconds to process, which is way too slow if there's ~5 different parameters needed. Why could this be?
  • hje said:
    Alright, but why could it be that the camera has no result or no available object after the instructions CamReqImage, CamGetResult? Yes, CamNumberOfResults could be used as a condition, but it's going to tell me what I already know (that it's 0 and it's gonna generate the error) and it doesn't really solve the question here.

    It also turned out that using CamGetParameter instructions instead of CamGetResult is not good, because every instruction takes more than 3 seconds to process, which is way too slow if there's ~5 different parameters needed. Why could this be?
    If there is no result, it simply means that the object doesn't pass the tools setup in the job. Therefor, after you have requested an image, the error will be generated. You will need to check the job and see why it doesn't pass. It could be anything that needs to be adjusted, really. It might be that the tool they are using is not optimal, accept threshold, wrong exposure, filter etc.

    CamGetParameter has nothing to do with the results from an aquired image. It is simply used to read your setup parameters from the current job, i.e. whether a certain tool is enabled or not.
  • After reading your questions again I'm not sure that it is really a target you're looking for. If you want to read values that has been set up to be outputted to rapid they are being stored in your declared cameratarget when CamReqImage has been completed. CamGetResult gives you the coordinates of a found object.