Live feedback and control of linuxcnc
- yvesd
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 1
25 Nov 2018 09:03 #121316
by yvesd
Live feedback and control of linuxcnc was created 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.
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.
- giantstone
- Offline
- Senior Member
Less
More
- Posts: 55
- Thank you received: 0
25 Nov 2018 20:39 #121338
by giantstone
Replied by giantstone on topic Live feedback and control of linuxcnc
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.
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.
- yvesd
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 1
26 Nov 2018 16:56 #121379
by yvesd
Replied by yvesd on topic Live feedback and control of linuxcnc
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.
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.
- PCW
- Away
- Moderator
Less
More
- Posts: 17999
- Thank you received: 4843
26 Nov 2018 17:34 #121382
by PCW
Replied by PCW on topic Live feedback and control of linuxcnc
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.
- rodw
- Offline
- Platinum Member
Less
More
- Posts: 10840
- Thank you received: 3578
26 Nov 2018 20:15 #121395
by rodw
Replied by rodw on topic Live feedback and control of linuxcnc
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.
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.062 seconds