Hello,
For KUKA|prc the G-code import component can turn the extrusion values into an ON/OFF value for a digital output, to an external axis, or to a variable. This is taken from the help text:
QuoteSets how the extrusion speed is output. Entering ""E1"", ""E2"" etc. will map the E value to an external axis. Entering ""D1"", ""D2"", etc. will map a Boolean on/off value to a digital output. Entering any other string will map the extrusion velocity (E value divided by toolpath segment length) to a variable, that needs to be create at the robot, e.g. as a global variable in $config.dat
So that is how you can get the data to the robot. How you get it to the Arduino is up to you. If it has to be PWM there are EtherCAT modules from Beckhoff, but they are 24V, so will fry your Arduino unless you get the voltage down. Easier would be an analog 4-20mA output, where there are several instructions online for reading such a signal with an Arduino. Unless it's built into your robot already, you'd also have to buy a Beckhoff module for it.
Very "clean" would be an EtherCAT shield like that: https://www.bausano.net/en/ethercat-arduino-2
In any case, all of that probably works, it mostly depends on where you feel most comfortable investing your time. I personally would take the EtherCAT shield but you will have to delve a bit deeper into WorkVisual for it to work.
Best,
Johannes
Cool! I will give it a try. Thanks!