Define SetBase to call the same SubRoutines for new positions

Hi everyone, English is not my first language but I’ll try to make everything clear. I also hope my screenshots show up here or else I don’t know what to do :sweat_smile:

I have an a robot which should grab 8 cylinders and place them in 8 different compartments. I have made two Sub Routines, one to pick up the part and one to release it. Now the instructions say to use the “SetBase” statement as follows in the screenshot.

I followed the instructions up to this point and my two bases are in the same places as the example one, but when my robot has placed the first part it doesn’t go to the second part, it misses all of the remaining parts before moving to the correct release point, without gripping a part.

It doesn’t help that the instructions are in 4.5 and I’m working in 4.7. If anyone has any input, I’d be incredibly grateful!

Hi eng,

SetBase is the way to go if you want to teach the robot here, could you send us the layout so we can check it?

In this case having either 4.5 or 4.7 shouldn’t matter.


Inl_Lab2_D.vcmx (1.2 MB)
Hi Lefa, I hope this file works as it does for me. I tried to use Setbase, but don’t really understand how it works or why I should use it, as the instructions (screenshots) have no comments whatsoever.


You’re on the right track, just opposite way.
Set BASE_1 X = -200.0 instead of 200.0


As chungmin replied, you got the correct idea. Based on your first reply it would probably be a good idea to at the very least explain what bases do here. Generally speaking, when you create a motion statement (PTP/LIN) you should be able to see the frame somewhere in 3d space. Now how does the robot know where that frame is?

The location of the frame is based off of the robot’s own origin if the base is set to “Null”. You can also set the frame’s location to be based off of robot’s own bases, but if you do not shift the bases nothing really happens. This is because the bases are also located at the robot origin. So the reason you want to tell the movement statements to use base_1 or base_2 and then shift them is because motion statements’ frame will move relatively as much as you have shifted them.

You can think of that every single motion statement is “tied” to either the robot’s origin, some node or a base you have set and the relative distance should always stay the same in a very similar manner as “parent - child” relationship within the software. Moving the parent, will move all of its children.

If parent has world coordinates of <0, 0, 0> and its child has coordinates <0, 0, 100> and then we move the parent (base) by x = 150, then the new coordinates are:
parent = <150, 0, 0> and child = <150, 0, 100>. Now replace the parent = base_# and child = all PTP/LIN statements that have the same base


1 Like

Thank you for your amazing help! Sorry for not answering here yesterday, I didn’t have access to visual components at home.

Quick question, how can I know what to coordinates to change to in my next “Setbase” statements? Right now I’m mostly just winging it, that is definitely not the most efficient way to go