Advanced Search

Search Results (Searched for: )

  • ihavenofish
  • ihavenofish
26 May 2025 16:42
Replied by ihavenofish on topic Problems with Lichuan Ethercat servo drive

Problems with Lichuan Ethercat servo drive

Category: EtherCAT

Yeah this thread is really the only reference. The first post maybe needs a consolidation of "this is what we do".

I'm curious about tuning these things now that we know they "work". Would like to know how arduous or easy that turns out to be.
  • ihavenofish
  • ihavenofish
26 May 2025 16:37
Replied by ihavenofish on topic scurve trajectory planner

scurve trajectory planner

Category: General LinuxCNC Questions

S curves. I neeeds it.

So how stable is this at this point for "real work"? I have not been paying attention the last 2-3 months much.
  • ihavenofish
  • ihavenofish
26 May 2025 16:35
Replied by ihavenofish on topic help with ethercat and omron drives

help with ethercat and omron drives

Category: EtherCAT

Thanks. I need to do my IO and some fine tuning (servo tuning) and then I see about making a nice organised how to including files and what each line is for.

:)

I need to figure out modbus spindle now. I hope that is easier to follow (I haven't looked at it at all yet)
  • SanzuiWorks
  • SanzuiWorks's Avatar
26 May 2025 16:32 - 24 Jun 2025 13:57
Replied by SanzuiWorks on topic Manual Toolchange + Abs Z Probe (QtDragon)

Manual Toolchange + Abs Z Probe (QtDragon)

Category: Qtvcp

I finally managed to implement this and it seems to work very well.

What it does:
- Detects the first G5x coordinate system (G54–G59.3) used in a G-code file
- Prints a debug log to the terminal: [DEBUG] G57 on line 4
- Sends the detected G5x via MDI so that the GUI updates to reflect the active work coordinate system

How I implemented it:
I added the following method to the StatCanon class in:
/usr/lib/python3/dist-packages/qt5_graphics.py

def set_g5x_offset(self, index, x, y, z, a, b, c, u=None, v=None, w=None):
    print("[DEBUG-TRACE] >>> set_g5x_offset() is running <<<")

    g5x = {
        1: "G54", 2: "G55", 3: "G56", 4: "G57",
        5: "G58", 6: "G59", 7: "G59.1", 8: "G59.2", 9: "G59.3"
    }

    print(f"[DEBUG] set_g5x_offset() called: {g5x.get(index)} on line {getattr(self, 'lineno', '?')}")

    if not getattr(self, "g5x_mdi_sent", False):
        if self.lineno > 0:
            self.g5x_mdi_sent = True  
            print(f"[DEBUG] Sending initial MDI: {g5x.get(index)}")
            try:
                import linuxcnc
                c = linuxcnc.command()
                c.mode(linuxcnc.MODE_MDI)
                c.wait_complete()
                c.mdi(g5x.get(index))
                print(f"[DEBUG] Sent MDI: {g5x.get(index)}")
            except Exception as e:
                print(f"[ERROR] Failed to send MDI: {e}")

    super().set_g5x_offset(index, x, y, z, a, b, c, u, v, w)


Notes:
- Make sure this method is placed inside the StatCanon class with consistent 4-space indentation.
- The initial G54 on line 0 and final G54 at the end (due to GUI reset) are ignored using: self.lineno > 0
- Only the first explicitly used G5x is applied via MDI.
- Verified to work reliably in QtDragon simulator config.

This improves usability by ensuring the GUI’s coordinate system matches what the G-code will actually use.

Tested with:
- LinuxCNC 2.9.4
- QtDragon (QtVCP)
- sim.qtdragon.qtdragon_tool_probe configuration

Let me know if this is helpful or if there’s a cleaner way to hook into the coordinate system logic.
Displaying 15751 - 15754 out of 15754 results.
Time to create page: 0.487 seconds
Powered by Kunena Forum