ProcessModelling to RobotMovement

Hy,

I’m struggeling by get the magic link from a ProcessModelling PROCESS to the assoziated Robot which will move the product.

I am in the OnStatementExecute-Event which provides the executor and statement…

image

From this I try to get the assoziated robot for manipulate the transportation over python!

Could it be that the link I’m searching for do not exist?

Thx & Regards
Feature

Transport links (vcTransportLink) are between transport nodes (vcTransportNode) and are defined in vcTransportSystem.

Each transport link has an associated transport controller (vcTransportController) and any number of custom properties added by that transport controller.

Process executor behaviour (vcProcessExecutor) is associated to a transport node via property.

Multiple valid paths of transport links (transport solutions, vcTransportSolution) can exist between transport nodes, so in general case you can’t know how the product will get from process to process. The transport solution is decided by the sending side (usually TransportOut statement) and assigned into the product (vcProduct). Then the product is given to the starting transport node to send out, which gets the first transport link from the solution and calls the corresponding transport controller to come get the product and move it to the next node in the solution.

Along the way, the transport solution can be altered if necessary as long as it reaches the original destination node eventually. In practice layouts are not really modeled this way, instead preferring simple single-link solutions between processes.

Hy,

thx for the detailed answer but I really try hard to get the assozated robotcontroller over the Event from a PM-Process like thes:

image

May you can give tipps for the entrypoint.

Regards
Feature

First you would need to know the product instance(s) (vcProduct) and from there you can get the current transport solution (vcTransportSolution) which contains transport links. From the transport links you can get the transport controller.

Then you would need to assume it is a PythonTransportController and that the robot transport controller is modeled such that it is a base component onto which the controlled robot is attached. The processes are not meant to know or care about any of these things, as these are internals of the transport system.

However, using those process handler statements with PM is a very hacky way of doing things and especially if you going to mess with the transport system too. You would need to somehow communicate about the products to your script, and there aren’t really any good ways to do that. Assigning value to a “known” component property before calling the process handler could work.

Hy,

the only reason why I have to go the hacky way is that the ProcessModelling Statement “Start Robot Routine” is not really useable:

image

Who want to control the robot when it has nothing todo, interesting is control the robot when it has something todo!!

I hope in future there will be come an elegant and useable solution…

In the meantime I hope I can solve my hacky solution.

Thx & Regards
Feature

Well, you can’t just override the robot’s movements at random point in its program, all users of the robot must collaborate so everybody gets a turn to control the robot. The only really generic way to achieve this is to let the robot go idle (leave main program), and then the next user can do something with it.

There is Python API (idle event) for this kind of collaborative use of a robot between Python scripts and PM run robot routine calls.

Hy,

I dig me through the objects and find the assoziated vcTransportLink. → This holds a property “Implementer” which is:

image

I think I’m I on the right way but how get the attached robotController?

transportController.Component.ComponentChildren holds nothing… -_-

Thx & Regards
Feature

I don’t know what you are trying to achieve exactly, but sounds like it would be easier if you just copy the robot transport controller component and add some features to its scripts. You could then give it custom commands from processes by e.g. sending string signals.

Hy,

it’s not possible to let the robot go idle with a grabbed product but I have to make a custom (generic) producthandling during the transportation! → Do you know what I mean?

How can I get the attached (robot)controller?

Thx & Regards
Feature

I have to make a custom (generic) producthandling during the transportation!

If you want the robot to do something special while handling transport requests, then I think you will need to either:

  1. Use the existing functionality in the robot transport controller to record and modify the robot programs used for transport.
  2. If that is not enough, modify the transport controller’s code to include your custom stuff when it commands the robot to pick, move, place etc.

The robot transport controller could probably also be modified such that it will let the robot executor idle (clear the executor stack) at certain points of transport and then continues (jump the executor to next statement before idle), which would allow injecting some routine calls with the run robot routine statement.

Hy,

ok I tried your advice… → But the second “driveJoints” is not finished and get interruped by the PM-Transport! -_-

I just want to do my stuff COMPLETLY before the product gets to the next processNode! :disappointed_relieved:

I want that when the robot have picked the product over the PM-Magic after TransportOut do some custom movements over pythonScript (with the picked product) and when I’m finished the transport should be finished over PM-Magic!

@TSy any ideas?

Thx & Regards
Feature

Hy @TSy,

you have a small example?

Thx & Regards
Feature

Do you want to do something like, pick part, let camera take a picture, then place part?
Take a shot

If yes, you could use “Execute Routine” in flow definition.

You will need to create two routines with specfic subfix, _PICK and _PLACE
Signal 200 is for pick and place, signal 300 is simply for light effect.
Sample layout as attached.
Take a shot.vcmx (1.3 MB)

Hy,

jes but I want it in mode “Automatic”… I don’t want to lose the comfortable pick and place calculated form process modelling.

Thx & Regards
Feature

I think it can be done, you will need to modify code.
Robot Transport Controller → ResourceLogic

In “def pick”, add some code after pick
or
In “def place”, add some code before place

I believe these will be the start point.