RobotStudio event

Asyril Communication & Integration

Setting up a C30/CRB 15000 with an Asyril AsyCube240 and EYE+ controller. I have the basic communication and commands all working (ethernet established, successfully transferring coordinates to pick parts, etc.)

However, in order to streamline production, I want to query the EYE+ controller to determine the number of "pickable" parts found when it takes an image. I'll feed that into a PERS NUM value to control whether the robot keeps picking and placing parts, or moves clear for the camera to take another image.

Asyril Support gave me the following advice...
What I would use instead is the n_parts_prepared command. After sending the prepare part command (which takes a picture and gets all of the good part coordinates ready on the EYE+ side but doesn’t send any of them yet), then you can send a RAW_COMMAND like Connor said. That raw command would be get_parameter n_parts_prepared. The response from EYE+ will tell you exactly how many times to send the get_part command before you know to keep the robot out of the way and send another prepare_part and n_parts_prepared
In the example below there were 6 good parts available after the prepare_part image was taken. So after asking for the number of parts prepared, you could store the answer (6 in this case) as a variable in your robot program for how many times you will send the get_part command (x6) before having your robot wait off to the side and repeating the process:
                $: start production 12345
                $: prepare_part
                $: get_parameter n_parts_prepared
                200 6

The RAW command mentioned above is included in a read-only module as part of the EYE+ plugin. See below.
<div>&nbsp; &nbsp; FUNC num EYE_RAW_COMMAND(string command, INOUT string response{*})</div><div>&nbsp; &nbsp; &nbsp; &nbsp; VAR num number_of_response := 0;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; number_of_response := EYE_INTERNAL_CMD(command, EYEClient, response);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; RETURN number_of_response;</div><div>&nbsp; &nbsp; ENDFUNC</div>
I am still waiting for a reply from ABB. But in the meantime, I am trying to figure out how to utilize this FUNC to obtain the data I need (number of parts found/prepared). I've done a lot of RAPID programming in the past, but never really messed with direct communication stuff like this. Any input would be greatly appreciated!