I try to find out how I can use the PM-command “RunRobotSubroutine” efficient for my belongings…

My target is to call a subroutine directly after the robot have picked a part but it behaves a bit strange I think…

The Layout is attached.

HowCallTheRoutineClean.vcmx (2.2 MB)

For recommendations or a working exampleI would be happy!


The robot routine executions get “scheduled” to run when the robot executor is idle, i.e. has finished its program. I think the statement reference in help explains this.


I read the help and without an working example I try hard to understand the usage of the command…

It is also a bit strange for me what happens if the move the RunRobotSubroutine is moved like this:

For what is this command usually used for?

Thx & Regards

OK, I didn’t look at your layout. To me it seems that implementation of the robot transport controller is either buggy or it doesn’t support cooperation with these RunRobotRoutine statements.


It seems the routine called by RunRobotRoutine will only be executed when the robot is currently idle, but in your case it is still busy until it has placed the part in the Sink process.

I’m not sure which of those two options you want the robot to do:
Pick part from Feeder → Run Routine → Place part on Sink
Pick part form Feeder → Place part on Sink → Run Routine

If it is the first one, you should use “Record Routine” and then “Execute Routine” and call the sequence in the created programs.

If it is the second one, you could send a signal from the Sink to the Feeder once it is done with its TransportIn:

(The delay is there because of the robot moving back to the Approach Location after it placed the part)
EDIT: I just realized that this will only run once, because the “TransportIn” on the Feeder comes AFTER the Feeder has created a new part already.
I think the better option to this would be to use the “Execute Routine” option and call the sequence at the end of the T1_PICK subprogram.

Hope this helps, surely there are better ways to do this too :slight_smile:

I often use RunRobotRoutine when I have a separate robot with a tool (e.g. camera, laser sensor) that only does one thing like scanning a part or taking measurements, but won’t move the part itself.
The robot doesn’t need to be connected to a RobotController for RunRobotRoutine to work.

Hy @xILukasIx,

thank you for your detailed answer! :metal:t2:

That’s exactly what I wanna do! → The thing is that in the past I always do this by “Record Routine” and “Execute Routine”. → It was a try to replace using “Record Routine” and “Execute Routine” with the “RunRobotSubroutine”-command because I find that would be beautiful! :slight_smile:

Unfortunately it doesn’t work as I expected… → After your answer I think I must stay by this way…

Thx & Regars

I take it from current eCat! → With this RobotController an the GenerateRoutine creates 2 Subroutines T1Pick & T1Place (StandardNames)… → In my current Simulationlayout the RobotControllers create instead of this 2 Subroutines just 1 SubRoutine with the StandardName “MyRoutine” → Why???

And when I call my selfmade Subroutine from the ExecuteRoutine created Subroutine the TransportPatternIn of the following Process doesn’t work!? :frowning: → Thats one of the reason I try RunRobotSubroutine, which also does strange things!

EDIT: I think a got a RobotController from this new legacy-eCat thing or so… → I deactivate it and take the last RC then it worked again with 2 Subroutines and the TransportPatterin as well!


Hy @TSy & @xILukasIx ,

what should I do if the robot has to execute two different Routines in one FlowGroup. → That’s also not possible with the “Record Routine” and “Execute Routine”-method!

There is no “ExecuteRoutines”…


I hope that the RunRobotSubroutine getting improved so that the possibilies with PM in combination mit custom subRroutines will work because the “Record Routine” and “Execute Routine” is limited to multiple movements in one FlowGroup… → If a PM-Process call the improved RunRobotSubroutine the robot should do this immediatly till the end and not when he is idle…

Thx & Regards

Hey Feature,

do you mean like in this layout?
routines.vcmx (158.6 KB)
Parts going to the Sink Process make the robot execute the routine “T1” which calls “doSomething”:

Parts going to Sink Process #2 run “T2” which calls “doSomethingElse”.

Hope this helps.


Are you trying to avoid robot collide with the machine?

Would the subroutine only goes with linear motion statement or joint motion statement?

If both answers are yes, add Approach_* frames to the machine, you can add more than 1 approach frame, * is filled with numbers.


jes your example works well and fits perfect, thank you!

It would be wonderful if exactly this behave could also be achieved by call the SubProgramms from PM with RunRobotSubroutine… :slight_smile: