How to attach a component when performing pick and place operation

Hi

I want to attach the component on another component as shown in the picture below

As u can see i want to attach the black plate on to the white block in the program so that they become one but in the program i cannot find any attach statement
i want to do this because in the next station when i want to pick and place these two component together it misses the top one and grasps only the block for some reason i tried with grasping volume and multi grasp but still the problem remains so i thought i would attach them in the program if that is possible

please let me know if there is way to this

Just came up with an interesting solution, try it to see if this helps.

Hi, @idkfa
Thankyou for the solution
I see that you have used an attach statement which seems to be there in the program editor of yours but it is not there in my case see picture below
image
there is no attach statement here
i dont understand how you got it in the program editor, did u write a separate code for it?
also what are those documents you attached, are those codes if so what are those codes for ?
Just so know i have zero knowledge in coding :sweat_smile:
so please suggest something other than coding
Thank you

The file given by chungmin is a plug-in developed based on Visual Components. Usually you only need to unzip it to “My Computer-Document-Visual Components-4.X-My Commands” to use it.

At the same time, I noticed that the picture you provided shows that the tool you are using is a robot, which means that you do not need additional functions, you only need to release the component. If it cannot be attached to the correct location, please check the Actions Configuration Under Signal Actions, select the Output[1] you are using, and adjust the Gravity direction attribute under Release. The function of this attribute is that when the falling edge of the signal is triggered, the robot will check the components at this distance by default and attach the release component to Check the component.
Hope this helps and have a nice day!

@BAD

I did as you instructed after unzipping it in VC my command what next ?
how do i use it ?

Just restart VC. When VC starts, it will automatically read the init.py added in the file for initialization. Generally speaking, the init.py file will contain information such as the called script, the name and identifier of the script, and the location where the script is placed. :melting_face:

1 Like

@BAD and @idkfa Thank you so much, now it is working how i wanted
Thanks a lot, have a lovely day :smiling_face:

1 Like

Guys I really need help. I tried to do this and after restarting I still dont have attach statement in robot program tab. Please help how to solve it?

Hi, please help I still dont see this option in program tab.
After I add a command script manualy to robot. It is creating this new command every time I restart the simulation and it works only once
vc

ImportError: No module named vcCommand

What version are you using, at the moment it looks like 4.8 and above, they have a new program editor that makes it possible for them all to fail to run, the solution is to modify the corresponding init.py.

I am using 4.9 premium. Could you please tell me how to modify the init.py?