Robots in Architecture Forum

KUKA|prc - parametric robot control for Grasshopper => Support => Topic started by: Jianyou on July 25, 2022, 03:58:09 PM

Title: How to add digital output for extruder on 3D Printing path?
Post by: Jianyou on July 25, 2022, 03:58:09 PM
Hi,
    I am new to PRC and use a Kuka KR6 R900 for 3D printing.
Ihave a customized extruder, and how can I give a true/false signal into the comand codes to activate the extruder at a specific point on the printing path?
Thanks!
Title: Re: How to add digital output for extruder on 3D Printing path?
Post by: Johannes @ Robots in Architecture on July 25, 2022, 05:46:11 PM
Hello,

There is a specific component for digital outputs in KUKA|prc, alternatively you can use the Custom KRL component to enter any command to execute.
Where you place the component in your toolpath is mostly a Grasshopper thing - there are components for inserting objects into a list, splitting lists etc. Or you can use Merge List to combine the movement with the IO commands.
Is there any particular pattern you would like to achieve?
I've attached a generic example where the extruder is only on during the toolpath, but not during the approach and retract motion.

BEst,
Johannes
Title: Re: How to add digital output for extruder on 3D Printing path?
Post by: luigipachecoFIU on August 09, 2022, 11:32:25 PM
It looks like  I have the beckoff module, but I am not sure where to connect to get access to the signals made in the GH file. wich connector is this mapped to?
Title: Re: How to add digital output for extruder on 3D Printing path?
Post by: Johannes @ Robots in Architecture on August 10, 2022, 09:02:01 AM
Hello Luigi,

There really is no standard way. The Beckhoff module has got LEDs, so if you think that the IOs are configured, then just try out the first 30 or so and see if any LED goes on. Of course make sure that there is nothing else connected to the robot that could cause shorts or activate external machinery.
The proper way would be to start up WorkVisual, load the current project off the controller and then check how the physical and virtual IOs are mapped, or to map them yourself.
I've attached a screenshot below, in that case you can see that toggling $OUT[1] from KRL or KUKA|prc will toggle the physical output 9 on the IO module.

Best,
Johannes
Title: Re: How to add digital output for extruder on 3D Printing path?
Post by: luigipachecoFIU on August 10, 2022, 07:21:25 PM
Thank you!

I will try this!

Title: Re: How to add digital output for extruder on 3D Printing path?
Post by: luigipachecoFIU on September 08, 2022, 04:27:30 PM
Hello Johannes!

Looks like we have the beckoff installed and wired to the X12 connector.

Also, it seems like everything is mapped correctly as we were able to make a manual KRL file that turns on and off the digital output 1.


However we get this error in KUKA//PRC most likely i am doing something wrong.
1. Solution exception:Object reference not set to an instance of an object.

Finally, when connecting to an external output is there a ground in the beckoff?
Title: Re: How to add digital output for extruder on 3D Printing path?
Post by: Johannes @ Robots in Architecture on September 08, 2022, 04:58:25 PM
Hello Luigi,

Can you please send me the file that is causing the exception via eMail?
Take electronics advice from me with care, but Beckhoff IO units have got many different configurations, I don't know if yours have got a separate ground port. But if you are e.g. switching an electronic gripper, then I would personally try to either power them from the same power supply or alternatively connect the grounds. But again, don't trust me with electronics ;)

Best,
Johannes
Title: Re: How to add digital output for extruder on 3D Printing path?
Post by: Johannes @ Robots in Architecture on September 08, 2022, 05:42:34 PM
Hello Luigi,

I just checked your file, it did not contain a single movement command, which confuses KUKA|prc.
I will make sure that this will result in a proper error message in the next release.
For now, just add an axis movement somewhere and it should be fine!

Best,
Johannes
Title: Re: How to add digital output for extruder on 3D Printing path?
Post by: luigipachecoFIU on October 11, 2022, 05:29:19 AM
Just noticed I never replied to this .
Looks like it's working .

Thanks !
Title: Re: How to add digital output for extruder on 3D Printing path?
Post by: Johannes @ Robots in Architecture on October 11, 2022, 07:28:00 AM
Awesome, thanks for the update!
Best,
Johannes