Live feedback and control of linuxcnc

More
25 Nov 2018 09:03 #121316 by yvesd
Hello,
I am using LinuxCNC for 3D printing and one thing I want to implement is live nozzle height modification. I'm sending my G-code via a python script c.mdi(gcode here) and the machine starts printing. However my question is if when I already send the gcode I can send another one live that can increment the z axis for example.
Thank you.

Please Log in or Create an account to join the conversation.

More
25 Nov 2018 20:39 #121338 by giantstone
based on my experience linuxcnc would finish the first mdi command then excute the next mdi command be it your z command.

I had a similar case where I need to control Z axis "independently",
and my solution was to control Z axis by another set of script+hardware, and feed in the linuxcnc current positions to the z-axis controller.

linuxcnc current position is available in the stats.

Please Log in or Create an account to join the conversation.

More
26 Nov 2018 16:56 #121379 by yvesd
The Z axis is being controlled by a driver connected to the CNC board.

Supposing I want LinuxCNC to control the main operation of the Z axis by following the Gcode, is it feasible to connect the same motor driver to an Arduino that can also issue commands?

Think of it like an "OR" where sometimes the linuxcnc issues the commands and other times the arduino can take over and increment or decrement the axis by some steps.

Thanks.

Please Log in or Create an account to join the conversation.

More
26 Nov 2018 17:34 #121382 by PCW
This would be done via HAL and possibly a mux2 or sum2 component or using the External offsets branch

Please Log in or Create an account to join the conversation.

More
26 Nov 2018 20:15 #121395 by rodw
Sounds like this is a good candidate for external offsets which have recently been added to master branch (V 2.8). I don't think the Arduino is required.

So you can apply an "offset" the z axis height that is "external" to the motion controller. Motion continues at gcode programmed height +- the applied offset.

The offset is similar to a MPG encoder in that it accepts a count that is scaled. (eg. with the right connections in hal, you could control the offset with an MPG encoder that adjusts the Z axis up or down one click at a time.)

There are a number of sims demonstrating how to use external offsets included with the master installation.

Please Log in or Create an account to join the conversation.

Time to create page: 0.072 seconds
Powered by Kunena Forum