Giter Site home page Giter Site logo

duembeg / gsat Goto Github PK

View Code? Open in Web Editor NEW
39.0 8.0 10.0 9.42 MB

GCode Step and Alignment Tool, a GCODE debug/step for Grbl like GCODE interpreter. Targeted for CNCs like ShapeOko

License: GNU General Public License v2.0

Python 97.52% Shell 0.13% kvlang 2.35%

gsat's Introduction

gsat

gsat is a cross-platform GCODE debug/step and alignment tool for TinyG and Grbl-like GCODE interpreters. It features functionalities similar to software debuggers, such as breakpoints, program counter (position) changes, stopping, inspecting/modifying machine variables, stepping, and running.

Use Case

For instance, if the GCODE file is a drill program for a PCB, gsat allows you to set a breakpoint right before the tool plunges. At this point, you can use jogging controls to lower the tool just before it penetrates the surface to verify alignment. Once verified or adjusted, the program can continue.

Development Environment

Dependencies

Optional Dependencies (for OpenCV)

Supported Devices

  • grbl: Grbl - Open source, high-performance CNC milling controller for Arduino
  • g2core: g2core - ARM Port of TinyG motion control system for Arduino Due and Synthetos hardware
  • TinyG: TinyG - 6-axis motion control system for small to mid-sized machines

CNC Machines Used for Development

  • ShapeOko: ShapeOko - Open-source desktop CNC machine
  • Proxxon MF70: Proxxon MF70 - Custom CNC conversion
  • Other CNC machines using the above devices

Supported Operating Systems

Ubuntu 20.04, 22.04, 24.04

sudo apt install python3 python3-pip python3-venv git python3-dev
sudo apt install build-essential libgtk-3-dev
python3 -m pip install -U pip
python3 -m pip install pyserial
python3 -m pip install wxPython

Optional dependencies for OpenCV

python3 -m pip install numpy
python3 -m pip install opencv-python

Ubuntu 18.04

Special installation for dependencies:

sudo apt install python3.8 python3-pip python3.8-venv git python3.8-dev
sudo apt install build-essential libgtk-3-dev
python3.8 -m pip install -U pip
python3.8 -m pip install pyserial
python3.8 -m pip install wxPython

Optional dependencies for OpenCV

python3.8 -m pip install numpy
python3.8 -m pip install opencv-python

Editors Used for Development

Screenshots

Main Window (Linux)

Main window, Linux

Settings Dialog

Settings Dialog

Changelog

1.7.5

  • Python 3.x and wxPython 4.x Migration
    • Updated dependencies instructions
  • Fix CV2 issues
  • Update to UI for quality of life, DRO edits, and axis letters are now clickable
  • Added gsat-server.py starts enough code to control the machine and server for remote UIs
  • Moved probe settings to machine configuration. A UI can connect to multiple machines, making it illogical for the UI to have multiple settings for each machine. Remote UIs might not even have the ability to configure the machine itself.

1.7.0

  • Remote Interface and Android Remote Pendant
    • All code necessary to run the machine is now GUI-free and can run in a console.
    • All UI code can communicate via sockets to the machine interface.
      • Allows multiple UIs to communicate with a single machine interface.
    • Added new options --server to enable the UI to use sockets to communicate with the machine interface. Other UIs can also attach to the running machine.
    • Added gsat-console.py app for console mode (WIP), ideal for running with the --server option on a Raspberry Pi or another computer without a screen.
    • Added a KivyMD app that can compile into an Android app and run on a phone or tablet, communicating via sockets with the machine interface.

1.6.0

  • Major rewrite for underlying "working threads" code
    • Machine interfaces are now separated into modules, each handling specifics for the interface (e.g., encode/decode data, handle Jog, Hold, and Abort commands). Uses Facade and Interface OOD patterns.
    • Better support for grbl (e.g., extra axes in stm32 grbl versions).
    • Better support for TinyG2 and g2core using JSON format for communication.
    • Removed special knowledge of the UI, allowing underlying code to be used independently of UI.
    • Improved buffer handling per interface, slowing down when the buffer gets too full.
  • Many UI changes
    • Updated icons and JOG panel, added hold and resume toolbar buttons, added probing button in JOG panel.
    • Grbl and g2core now provide extra explanations for error codes.
    • Removed special interface knowledge, making it easier to add new interfaces in the future (e.g., Marlin).
    • Fixed run timer, now stops when the interface finishes and not immediately after sending the last command.
    • DRO can now add/remove axes (default is X, Y, Z; can enable X, Y, Z, A, B, and C).
    • Added JOG pendant support for numeric keypad-like pendant, with interactive mode enabled by default (single click advances by step size, holding key results in continuous movement).
  • Various bug fixes.

1.5.1

  • Added support for verbosity changes in TinyG2 latest master branch, now known as g2core.
  • Fixed bug in jogging UI where an operation was selected without selecting an axis, resulting in no serial write ack.

1.5.0

  • Added support for TinyG2.
  • Added support for Mac OS X Mavericks with working OpenCV.
  • Added runtime dialog at the end of the program run (configurable option).
  • Added PAUSE state, toolbar button, and menu item; in PAUSE state, run time continues.
  • Added machine setting for Grbl, TinyG, or TinyG2.
  • Added machine setting for initialization script, useful for sending setup commands after device connect detection.
  • Added machine run time status.
  • Added machine Auto Status request setting (mainly for Grbl, not needed with TinyG(2)).
  • Consolidated Link and Machine setting panels (requires a one-time reconfiguration of port and baud when upgrading from old version).
  • Added jog settings to auto-update from machine status.
  • Added jog settings to auto-request updates from the machine after jog set operations that don't normally generate verbose information, like setting to zero or job values.
  • Added jog custom button support for scripts.
  • Removed second set of XYZ coordinates, enlarged the remaining for easier viewing from a distance.
  • Updated G-Code message dialog; now treated as entering PAUSE state (run time continues).
  • Fixed bug with missing variable "serialBaud" when changing settings while serial port was open.
  • Fixed bug with File->Open being enabled during RUN state.
  • Fixed multiple UI issues with Mac OS X.
  • Moved decoding of status string processing to program exec thread, helping UI from becoming temporarily unresponsive.

1.4.0

  • Added support for TinyG.
    • TODO: Create dedicated classes/interfaces for TinyG and grbl, including settings dialog, status window, etc.
  • Added support for Mac OS X, tested with TinyG and Grbl.
  • Improved serial communication with a dedicated serial RX thread.
  • Improved serial exception handling.
  • Updated G-Code message dialog, allowing continuation from the dialog.
  • Added better acknowledge check for G-code commands.
  • Added finer Jogging controls for each axis.
  • Added link port, link baud, and percentage of lines sent on the status panel.

1.3.0

  • Program/repo name change gcs to gsat (g-code step and alignment tool) to port your old config file just rename from .gcs to .gsat while gsat is not running.

1.2.0

  • Added G-code message dialog (it is treated as break point, hit run after "ok" button)
  • Added try/catch block for open serial port.
  • Fix Save-As bug, document title was not updated.
  • Fix make sure strings sent to pySerial are ascii and not Unicode.

1.1.0

  • UI updates
    • Added Find and Goto Line controls to tool bar.
    • Added G-Code syntax highlighting.
    • Updated icons to more colorful versions.
    • Removed CLI panel, moved CLI into Jogging panel.
  • Separated code into modules, for better maintainability and preparing for plug-in support.

1.0.0

  • Initial Release

gsat's People

Contributors

duembeg avatar pelrun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gsat's Issues

Electronic positioning/aligning of workpiece as a whole - not for every drillhole seperately

Unless I misunderstand, drillholes need to be aligned one at a time, which is very inconvenient for PCB's eg.
It sould be possible to calibrate the workpiece postion by defining a few (3 minimum) correct postions and then calculate the correcion for the remùeining drillholes.

Well-explained in these references:

https://git.nexlab.net/machinery/pcbdrill
https://www.alessiovaleri.it/using-transform-matrix-for-pcb-drilling-part-1/
https://www.alessiovaleri.it/using-transform-matrix-for-pcb-drilling-part-2/

Gcode Step and Alignement Tool

This is the most stable gcode sender for grbl that I tried.

Perhaps one little bug here.
When "Unlinked" I get this Output message =

"Debug: ....\src\msw\window.cpp(643): 'SetFocus' failed with error 0x00000057 (paramètre incorrect.)."

Seems happen when the window get focus. Specially the "Machine Jogging" window.
But ever when the program is in "Linked" state.

Not a problem, but because this is a very good program I want to collaborate how I can.

My 4 suggestions:

  1. After begin "Linked" auto "Refresh" of Work Position. Yes, I know I need only press the "Refresh" button.

  2. The "Command" input in the "Machine Jogging" will be better. Not as other window. Because don't need to be more than one line never. Or need it?

  3. A graphic to see the tool paths will be very nice. Only one XY view will be enough.
    Perhaps also one vertical bar to show the Z position graphically. For me is better than one 3D graphic.
    One double click in the XY plane will move the tool to Z UP (normally Z0) and then to the coordinates of the point XY where was made the double click.
    Very useful to get close the work position.

  4. For the users like me,with a cnc without limit switches the way to reset "Machine position" values will be nice.

Seems I lose something ... I don't understand what exactly means:
-"Reset to jog" if there are "Reset to Zero"
-"Goto Jog" if the machine is already there...

I hope not bored you with all this and my bad English.

Thank you very much.

👍

Z work position in tool change

Hello Duembeg,

Your software steal to be the strongest I tried.
One suggestion this time:
I found will be very useful a button to define the new Z work position after a tool change.
The command in Gcode is G10 L2 P1 Z(actual Z machine position).

After "touch" the piece with the new tool, this new button will get the actual Z machine position to do the G10 command.

Better will be if after the G10 command the Z axis go up to the clearance plane.
Or some coordinate predefined as "clearance plane".
This will confirm the new Z work position with the machine move and avoid to crash with some other part of the piece.

I am not sure if I explain it well for you, bur I think you will understand.

Other thing: What about the XY graphic to visualize the next moves?
Again I tell you I prefer one 2D plane for XY and only a Z level will be nice.
One 2D plane can show exacts distances easy than a 3D one.
Most part of time I make 2D1/2 works.
3D works are not so often.

Witch CAM are you using?

PS: I edited a little your code to change the HOME function.
I only changed the command value:
gGRBL_CMD_EXE_HOME_CYCLE = "$H\n"

value before my change = "G28 X0 Y0 Z0\n"
In "config.py" file.

I am thinking in make the same for the command:
gGRBL_CMD_RESET_TO_ZERO_POS = "G92 X0 Y0 Z0\n"

But I don't know If I need to read with "?" the machine's Z position to send later the
G10 L2 P1 Z(Z machine position)
Or G10 L2 P1 Z<"ZVAL"> will make the trick.
"Z<"ZVAL"> or Z<"VAL">?"
Anyway I prefer listen the father of this nice program.

Camera use

hi
can i use raspy camera in this program ?

regards
Rizki

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.