We recently implemented a simple solution where we have a global variable set whether the extruder is on or off (let's call it EXTRUDE). In the submit interpreter we check if EXTRUDE is true, and if so the speed is set according to the current speed of the robot's tooltip. That way we can compensate for the sometimes not perfect speed control of the robot in realtime. On the KUKA|prc side all you need is a Custom KRL component that says e.g. "EXTRUDE = TRUE" or "EXTRUDE = FALSE".
An even easier alternative would be to use an actual KUKA motor that you control with e.g. E1, but then you may need to expand your KRC cabinet, which is quite expensive (in addition to the motor).