import Gcode to digital output

Started by luigipachecoFIU, September 06, 2023, 08:40:09 PM

Previous topic - Next topic

luigipachecoFIU

I am wondering if there is any way to use the gcode import so that when the E value is 0 or negative (retraction) there could be a signal out to for example stop the extruder motor. Or how couuld I aproach this issue, I love the fact that the import component takes into account the path speed too so I am also tryng to control the extruder.

Johannes @ Robots in Architecture

Hello Luigi,

How are you currently controlling the extruder? With the method that maps just to a digital output for on/off?

Best,
Johannes

luigipachecoFIU

I am currently sending a digital output to enable the extruder (ESP32), the flow is controlled manually with a knob or with OSC (UDP) with an esp32. But it should be possible to stop it by just sending having in my case output 1 to turn off. The problem is that the gcode import doest let me put this in between , I see it changes the speed based on the gcode, but not sure how to map the e values from the gcode to the digital output. another idea could be to map an analogue output to the extruder speed and I could implement the logic on the ESP 32 to map the extruder speed accordingly.

Johannes @ Robots in Architecture

Hello,

For the G-code import if you set the mapping to e.g. E1 it maps the extrusion to an external axis, with e.g. D1 it maps ON or OFF to $OUT[1]. The external axis should also work without a physical axis attached (you may need to configure a simulated axis, but try it without it first). On the robot via the sps.sub you could map the current E1 speed to an analogue value that gets output to the extruder.
Just an idea!

Best,
Johannes

luigipachecoFIU

This is exactly what I was looking for, thanks for clarifying .:)