Advanced Search

Search Results (Searched for: )

  • DonatasO
  • DonatasO
17 May 2025 12:21 - 17 May 2025 12:33

G53 not ignoring tool length offset after a Python M6 remap

Category: Advanced Configuration

Hi,

I'm writing an M6 remap in Python and encountered strange and dangerous behavior. After the first M6 call, G53 G0 takes into account the tool length offset, which should not be happening.
I'm unsure if I'm doing something wrong or if this is a bug in LinuxCNC. I hope you can help me clarify and resolve it.

LinuxCNC version: 2.9.4
UI (probably irrelevant): qtdragon_hd

This is a minimal working code to reproduce the issue:
# REMAP=M6 modalgroup=6 prolog=change_prolog python=is_this_a_bug epilog=change_epilog
def is_this_a_bug(self):
    if self.task == 0:  # ignore the preview interpreter
        return INTERP_OK

    emccanon.CHANGE_TOOL_NUMBER(self.selected_pocket)
    yield INTERP_EXECUTE_FINISH
    pose = EmcPose()
    pose.z = -50
    emccanon.USE_TOOL_LENGTH_OFFSET(pose)
    yield INTERP_OK

Steps to reproduce the issue:
  • Turn on and home the machine
  • T6 M6: the tool is loaded and offsets are set correctly.
  • G53 G0 Z0: the spindle rapids down to -50mm. This is not expected.
  • G49: cancel tool length compensation.
  • G43: enable tool length compensation
  • G53 G0 Z: the spindle rapids back up to zero. This is expected.
The issue can no longer be reproduced by issuing T6 M6, everything works correctly.

Attaching debug logs for each command:

T6 M6
Warning: Spoiler!


G53 G0 Z0
Warning: Spoiler!


G49
Warning: Spoiler!


G43
Warning: Spoiler!


G53 G0 Z0
Warning: Spoiler!
  • JT
  • JT's Avatar
17 May 2025 11:54

linux cnc keeps bending shortcutting to the next line.

Category: General LinuxCNC Questions

It's important to understand how Linuxcnc follows the programmed path.
linuxcnc.org/docs/stable/html/user/user-concepts.html

Note that G64 Blend Without Tolerance Mode is the default

A good preamble should always be the first line of any nc code program.
gnipsel.com/linuxcnc-old/g-code/gen01.html

JT
  • Sternfox
  • Sternfox
17 May 2025 11:38 - 17 May 2025 11:49
Mill as lathe with probebasic was created by Sternfox

Mill as lathe with probebasic

Category: QtPyVCP

Hey peeps.

I have A couple of questions. I want to use my mill as a cnc lathe.

Can I have pb turn and mill on seperate profiles? 
And can pb turn utilise 3 axis? I need the third to line up the work and to change tools which I will have in the vice.

The other option is using a custom post in fusion but im guessing thats way more complicated.

Thoughts? 

Much appreciated 
  • rodw
  • rodw's Avatar
17 May 2025 11:28
Replied by rodw on topic Linuxcnc wood lathe insufficient torque

Linuxcnc wood lathe insufficient torque

Category: General LinuxCNC Questions

48 volt power supply and DM542A stepper drivers would almost quadruple torque you have now with your same Nema 23's
  • Hakan
  • Hakan
17 May 2025 11:14
Replied by Hakan on topic el5151 reseting counts

el5151 reseting counts

Category: EtherCAT

Yes that would be a problem. Linuxcnc asks the encoder to reset the counter to zero and count continuously up/down from there. I don't know any details of this encoder so I guess it is reading the manual to find how that can be done. Luckily Beckhoff has ok manuals.
For velocity you can try the ddt hal function, generate velocity as the derivative of the position. Taking the encoder pin values is limited by the servo loop time and EtherCAT cycle time, anything faster than some hundred Hz will fail.
Displaying 16051 - 16055 out of 16055 results.
Time to create page: 0.350 seconds
Powered by Kunena Forum