FollowNode - Place Part on moving item

Hi,

this are my first tries to program robots in VC. I have the issue that i need to pick up a moving part and place it on another moving part. To pick up the moving part is no problem, therefor i use the jointMoveToComponent method. But so far i have not find a satisfying solution to place it on another moving part, for example a carrier.

 

In my Layout i have two conveyor. Each one has a feeder. A robot is placed between both conveyor. First the robot grip one cylinder from conveyor#1. Then he turns around and should place the grabbed cylinder on another moving cylinder.

if i use the jointMoveToComponent-method the robot use the actual place of the target-cylinder and don’t calculate the Position after moving.

So my idea was to use the follownode-method. First i would move near the second cylinder, then i would to follow the node and at least to place the first cylinder on the second.

It doesnt work… moreover i receive always an error-message. Can anyone help me ?

 

Script:

from vcScript import *
from vcHelpers.Robot2 import *

 

def OnRun():
while sim.IsRunning == True:

if app.findComponent(“Conveyor”).findBehaviour(“Path__HIDE__”).ComponentCount !=0:
BOX = app.findComponent(“Conveyor”).findBehaviour(“Path__HIDE__”).Components[0]

Robo.pickMovingPart(BOX)
Robo.jointMoveToComponent(app.findComponent(“Conveyor #2”).findBehaviour(“Path__HIDE__”).Components[0].findNode(“Cylinder”))
Robo.followNode(app.findComponent(“Conveyor #2”).findBehaviour(“Path__HIDE__”).Components[0].findNode(“Cylinder”),20.0)
Robo.place(app.findComponent(“Conveyor #2”).findBehaviour(“Path__HIDE__”).Components[0])

delay(1)

 

 

app = getApplication()
comp = getComponent()
sim = getSimulation()

Robo = getRobot(app.findComponent(“GenericRobot #2”))

PlacePlace = app.findComponent(“Ablageplatz”)


Error-Message:

Traceback (most recent call last):
File “IRB6400_24::PythonScript”, line 26, in OnRun
File “C:\Program Files\Visual Components\Visual Components Professional 4.0\Python\Commands\vcHelpers\Robot2.py”, line 408, in followNode
self.Executor.deleteSubRoutine(‘vcHelperMove’)
NameError: Attribut oder Methode ‘deleteSubRoutine’ nicht gefunden.

If you are using vcHelpers.Robot2 you can use the method linearMoveToMtx_ExternalBase(Basenode, ToMtx) to move the robot to a moving node/component.

Basenode… the component that is moving

ToMtx… the target position based on the Basenode origin

The linearMoveToMtx_ExternalBase() method refers to the active tool. So you have to care about a realive rotation of ToMtx of 180° around X or Y…

Afterwards executing linearMoveToMtx_ExternalBase() you can use the method releaseComponent() to place the part.