Functions and Subprograms

Started by matthias, July 03, 2015, 04:17:51 PM

Previous topic - Next topic

matthias

Hi Johannes,

is it possible to define and generate subprograms? I know it is possible to write them in the settings window into the KRL template, but from there they cannot be changed using grasshopper.

The reason: I need this for programming interrupts, which are only possible to use with subprograms. In my interrupt routine I need to make some movements based on my program generated by grasshopper/KUKAprc.

Regards
Matthias

Johannes @ Robots in Architecture

Hello Matthias,

Hmm... At the moment I cannot think of a really easy way to do that. First thing that comes into mind is that you expose the filename and save option (by right-clicking the Core component and selecting the option) and then adding the subprograms "manually", i.e. by reading the .src file (via Read File component), adding the relevant lines, and then resaving it.

But do the interrupt subprograms really have to be parametric? I'm mostly curious about the application...!

Best,
Johannes @ Robots in Architecture

matthias

Thanks for your quick reply. One application is described in the KSS manual, chapter 10.10.4 RESUME (at least for KSS version 8.2). If you want to use interrupts to break your current path (e.g. because of a signal coming from outside) and then continue with another movement, you have to use subprograms.

One possible solution for implementing subprograms would be like the "weave" component: inputs for a number of commands, and for a name of the function. Or you could have a component that accepts a CMDS input and a name for the function. In that case the component could be placed behind the weave command. The output of this component could then be feeded into to the KUKA|prc core component and put a the end of the template. The subprograms can't be simulated in the main program, but if you use another KUKA|prc core component, you would be able to simulate them on their own.

Ciao,
Matthias

Johannes @ Robots in Architecture

Hello Matthias,

Let's deal with that directly via eMail, if that's alright for you.
I have some ideas, e.g. an option for the Custom KRL component that puts the code outside the regular KRL...

Best,
Johannes