GithubHelp home page GithubHelp logo

svenhb / grbl-plotter Goto Github PK

View Code? Open in Web Editor NEW
616.0 70.0 170.0 472.89 MB

A GCode sender (not only for lasers or plotters) for up to two GRBL controller. SVG, DXF, HPGL import. 6 axis DRO.

Home Page: https://grbl-plotter.de/

License: GNU General Public License v3.0

nesC 0.55% C# 97.94% HTML 1.29% JavaScript 0.11% Inno Setup 0.11%
grbl plotter grbl-plotter cnc laser cad cam dxf svg gcode-sender

grbl-plotter's People

Contributors

heurist1 avatar rasyidf avatar robzeilinga avatar svenhb 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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grbl-plotter's Issues

DIYcontrol port, "incorrect" messages block the input buffer

When working with the DIYcontrol port we deduced (see issue #29), that the jog commands have to be finalized with CR LF to be recognized by GRBL-Plotter

If any character (or string or whatever) reaches the port, this message is not processed until the algorithm sees a CR LF.

With short commands this seems to work well enough (one character abort jog commands are ignored but are "processed" (at least accepted and ignored) in front of the next finalized command).
But if longer inputs occur (e.g. some not finalized jog commands), this stuffes the input queue of GRBL-Plotter and further commands are not processed.

nota bene: Three and four not finalized commands do not block the input queue, they are absorbed with the next finalized jog command, but are not executed (not forwarded to GRBL).

Warning message with ambigous values when calling GRBl Settings ($$)

Hi Sven,
when I issue "$$" in the COM CNC dialog I get a warning message with some very big values:

grafik

If I calculate your given formula with the values of my GRBL I get 8.88886667 kHz what is way below the given maximum rating of 30 kHz for the step rate.

Please check the math behind the warning message.
Thanks! Harald

nota bene:
Issuing "Check GRBL" works only once per start of GRBL-Plotter.
If you change some parameter and want to check whether the change is accepted, the values in the listbox are not updated.
The warning mesage on the other hand reappears every time when clicking "Check GRBL".

Eagle Drill file - Potential Addition / pull request

Hi Sven, (i presume)
fantastic work!!
I was struggling to write my own sender in C# until i stumbled on your project.

The use case i am trying to solve is a very easy process to drill PCB's created by Eagle (or others) - these create a *.drd file (drill file) that contains the co-ordinates (and size) of the required holes needed.
the challenge is that the file assumes that your etched PCB is mounted to the CNC table and exactly aligned to the X/Y axis, which is almost impossible. I have done previous attempts such as positioning 4mm pins and holes on the PCB to align and exactly position the PCB, but this is a hassle. (albeit working quite well)

Then I tried to pick up the amount of angle via a camera mounted to my cnc, and the image complete with cross-hairs will display the PCB image, selecting two holes on the Drill file display and matching holes on the PCB camera display will automatically calculate the amount of angle and offset.. (sounds familiar doesn't it? :) )

but i had hit a brick wall getting the gcode to stream to the GRBL in a controlled manner. and that's when I came across your project.

Would you consider allowing this enhancement? I don't want to simply fork and create a pull request without discussing this with you.

Regards
RobZ
drillform_1

Sample_DrillFile_drd.txt

Trouble in some svg file coming from Fritzing

Hello.

Very nice project !!

I'm trying to use it, for my plotter project for which i'm going to use svg files generated by Fritzing.

However the tool isn't able to read it properly.

Attached some files : the original svg file, the correct view of this SVG and the view in the tool (last version 1.2.0.1)

Hope you can help me to resolve that in order to use your wonderful project.

Thanks a lot !

Regards,

Hervé
PrblGRBL-Plotter.zip

Missing font

The font wqy-unicode.llf is included in the project but not included in the zip. You can just remove the font from the project as it is not used. Currently the build is failing because the font is missing.

bug report

found a bug
if you go into setup - gamepad, a box pops up saying thread exception that you then can't get rid of.
only way out is shut down program via task manager

Resolve Floating Precision error

as we can see, in the source, you used simple operation to comparing two floating point value

if ((posPause.X != posWorld.X)){
    // this sometimes won'twork.
}

Comparison of floating point numbers can be unequal due to the differing precision of the two values.

then

we can refactor this with

// in some static class
public static double EPSILON= 1E-5; // 0.00001 Precision Point

// anywhere
if (Math.Abs(posPause.X - posWorld.X) > EPSILON){
    //This will always work
}

Problem with feedrate after applied height map

Good morning,
Thanks in advance for your wonderful job.
I would like to ask you for help me to solving a problem that occurs when I apply height map after the probe.
What happens as I show you from the images I have attached is this issue:
Image1 is the original gcode I produced with vectric aspire.
Image2 is the gcode produced after the probe with grbl-plotter.
As you can see from the images the problem that occurs is the loss of the feedrate in the X and Y movements.
Thank you for any help you can give me.
Romano
image01

image02

GRBL -Plotter

That's a nice sender except the user's manual.
My questions are:

  1. The surface scan setup (the video is somewhat garbled)
  2. The jogging with a mouse a joystick or game pad? or keyboard if it's possible

Error message when opening "Settings-GamePad"

Hi Sven,
when I try to open the GamePad-settings dialog I get the error

grafik

From then on I am unable to close the settings dialog, clicking on OK only reopens the error messsage.
I have to kill GRBLPlotter via taskmanager.

Version 1.2.0.0 from today

DIYcontrol port, immediate commands are not supported

To support jogging with dedicated joystick hardware according to "GRBL V1.1 Jogging" via this second DIYcontrol port, the handling of immediate commands has to be supported.

This implies:

  • The receiving thread in GRBL-Plotter has to accept single characters over the serial port
  • GRBL-Plotter must not wait for CR LF to treat the received character
  • Instead, GRBL-Plotter has to accept every single character on this port when it arrives and forward it immediately to GRBL on the CNC port.

Besides that, to prevent accidental forwarding of jog commands, GRBL-Plotter has to block input on the DIYcontrol port as long as a CNC job is running.
I suppose, that is already guaranteed since there is the "virtual joystick" in GRBL-Plotter.

Some Bugs

Hi,
I’ using your software for quid a while and found 2 bugs and some suggestions:
First bug:
There is a Bug at the Mirror commands, the g-code won’t machine anymore after mirroring an axis.
Second bug:
The Software will arbitrarily perform a “Kill Alarm” after running for a longer time (or maybe also if too many g-code files where loaded successively?) A restart of the software will solve the issue. It happens on manual control as well as while streaming a file.
Some suggestions:
Could you please add a field to input user defined values for the driving distances over the joystick?
Is it possible to reduce the feedrate and the spindle speed percentage (from 0-150%) like on large machines?

Jogging via keyboard

Hi Sven,

first of all, many thanks for your great work of programming GRBL-Plotter!

But IMHO, it would be a useful and nice feature to be able to jog with the
keyboard, especially with a remote bluetooth keyboard.

Do you plan something to implement in the future?

Regards
Thomas

2. serial for Joystick, proposal: debug feature

Hi Sven,
I'm more or less sure that my Joystick issues commands to the serial port.
Only there is no visible reaction in GRBL-Plotter.
The stylus doesn't move, the coordinates do not change.

Can you please implement some sort of debug feature which allows the visualisation of the strings (or whatever is received on the serial port), perhaps easiest just into the listbox of the DIY control pad?
Would be fine. Thanks!
Harald

Performance issue with adaptive path

Hallo Sven

Danke für diese Software, echt gut gemacht!

Unfortunately i have a big performance issue with grbl-plotter 1.2.1.0 if i load big nc files.
I started using Fusion360 and got a 2.7MB gcode. The software seems not able to handle this.
the grbl-controller can handle the file so there should nothing be wrong.

My Laptop also should handle it with 32GB RAM, i7-8550U, SSD etc.

So is there a known bug on big files?

Best regards
Mario

questions

Hi, I recently updated to GRBL 1.1f and GRBL-Plotter 1.1.3.0, and have a few questions:

-I wanted to try out the new overwrite function, but the options are grayed out on your program, do I have to enable them first somewhere?
-Is it possible to know the install dir/change it to C:/ Programs, because I wanted to add script files to the programmable buttons, but I can’t find the _misc folder
-Is it normal, that the software says "Laser Mode not active $32=0" on startup?
-During a file my machine hit an end stop, and GRBL aborted the process. The COM window of GRBL-Plotter reported it, but the main window still said Run, and after resetting it over the COM window on the main window there was flashing kill Alarm until I reseted it again over the GUI.
-Is it planned to add joystick support to the software, using the jogging mode? It would be very handy for probing out the workpiece
-Bei mir funktioniert die Umstellung auf Deutsch nicht, es erscheint die Meldung, dass ich die Software neu starten muss, aber nach dem Neustart ist sie immer noch englisch

Tooltip of cyan "Abmessungen" field is nearly half a meter in size

Hi Sven,
sorry for the many issues I stumble over, hope it's ok to report...

If I hover the mouse over the cyan filed named "Abmessungen" a tooltip appears which reaches the right border of my monitor.

grafik

I think the numbers are not very meaningful.
At least they should be shorter ;-) to get the sense.
Harald

Error message when closing Settings dialog

Hi Sven,
when I browse the settings and want to close the dialog window I encounter the following error:

grafik

This happens with and without having changed anything in the settings.
[edit] Version 1.2.0.0 from today [\edit]

installation process in german

Hallo
Q1) would it possible to change the installation setup process to english or system default language, right now it is in german?
Q2) does it support Grbl for mega as well?
Danke

Design Update

Currently, I am working on Design update for GRBL Plotter, can you describe what to-do and not to-do for this kind of issues?

Are you accepting design overhaul? 😆

because some people have strict rule for their OSS

Suggestion : COM CNC Window should allow Hide

The COM CNC Window are unable to close, but as tool window, it should be able to hide it when not needed.

Add Button to show detailed Serial information, and change the COM CNC window close behaviour to make it hidden.

It will give users options..

simple send and Receive data to grbl

hello
i want to create a simple Interface for GRBL in C# . i really tried so hard for do this but i couldn't to get a good result .then i find you in Github I looked at your wonderful GRBL - plotter application code and i could to understand some thing about your code , then i tired to create a simple application like you that able to receive data from GRBL and show that on a rich box therefore I wrote this code below
But unfortunately it still does not work properly :( i'm really disappointed

can you help me about this issue?? i really need to your help , thank you so much <3

#########################################################################

`using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;

namespace serial_test5
{
public partial class Form1 : Form
{
public string rxString;

    public Form1()
    {
        InitializeComponent();
    }




    private void Form1_Load(object sender, EventArgs e)
    {
        string[] ports = SerialPort.GetPortNames();
        CoMports_list.Items.AddRange(ports);
        CoMports_list.SelectedIndex = 0;
        serialPort1.DataReceived+= new System.IO.Ports.SerialDataReceivedEventHandler(serialPort1_DataReceived);
    }



    private void serialPort1_DataReceived(object sender, SerialDataReceivedEventArgs e)
    {
        while ((serialPort1.IsOpen) && (serialPort1.BytesToRead > 0))
        {
            rxString = string.Empty;
            try
            {
                rxString = serialPort1.ReadTo("\r\n");
                this.Invoke(new EventHandler(handleRXData));
                while ((serialPort1.IsOpen)) ;
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception.Message , "can not received data");
               
            }
        }

    
    }



    public void addToLog(string text)
    {
        richTextBox1.AppendText(text + "\r");
        richTextBox1.ScrollToCaret();
    }


    private void handleRXData(object sender, EventArgs e)
    {
        char[] charsToTrin = {'<', '>', '[', ']', ' '};
        int tmp;

        if (rxString.IndexOf("ok") >=0)
        {

                addToLog(string.Format("<{0}",rxString));

            return;

        }
        else if (((tmp = rxString.IndexOf('<')) >= 0) && (rxString.IndexOf('>') > tmp))
        {
            if (scroling_chek_box.Checked)
                addToLog(rxString);
           
            return;
        }

    }



    private void Connect_btn_Click(object sender, EventArgs e)
    {

        serialPort1.BaudRate = Convert.ToInt32(baudRate_list.Text);
        try
        {
            serialPort1.PortName = CoMports_list.Text;
            serialPort1.Open();
        }
        catch (Exception er)
        {
            MessageBox.Show(er.Message, "message", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }

    }

    private void timer1_Tick(object sender, EventArgs e)
    {

        if (serialPort1.IsOpen) // 
        {
            try
            {
                var dataArray = new byte[]
                {
                    Convert.ToByte('?')
                }; 
                serialPort1.Write(dataArray, 0, 1);                      
            }
            catch (Exception er)
            {

                serialPort1.Close(); 
            }
        }


    }

}

}
`

slow and odd engraving speed

hi, I set the GRBL 1.1f and software configuration as per following images , however engraving speed is not what I expected , I saw many CNC machine use high rate of reciprocating movement during the engraving job , but I haven't seen such movement for any of engraving attempt , can you please let me know whether is possible to use GRBL plotter for such high speed engraving ?
grbl setting image
1 2

Workingspace dimensions

Hi, I updated to the new version to test the new soft limit Feature an here is some feedback:

In my opinion would it would be nicer to input both max and min coordinates from home point instead of the traveling distance and home position

In my test a file which would leave the workspace did launch like normal. It would be nice if not only the Dimensions box would toggle color, but also a message box would show up like in jogging mode

In my opinion a message box with OK and Cancel isn't a good idea, because people (me included) tend to just press OK instead of reading the text. It would be better if you have to tick a box to leave working space, or you could simply not leave it.

Otherwise thanks for the new features, I’m sure they will save a lot of trouble.

Error message when closing GRBLPlotter

Hi Sven,
when closing GRBLPlotter I get the following error message:

grafik

I just started GRBLPlotter, resized the main window and clicked the red "x" to close the application.
Just starting and directly closing (trying to..) without any further interaction results in the same error.

No chance to close GRBLPLotter without taskmanager.

G04 P0.000 COMMANDS

if we set 0 for "servo control / delay after" value, your software must not create "G04 P0.000" command line in GCode....

0.1 Precision edit boxes...

image

0.1 precision edit boxes can accept 0.01 precision value... can not display it... But it works as entered...

For example i can enter 0.12 to "Z-Height save" value, it accept my enter, does not diplay it but it works as 0.12...

Virtual Joystick control - Jogging doesn't stop when releasing the mouse

HI Sven,
when you use the virtual Joystick control, you should send an "jog abort" command immediately after releasing the mouse (when the "cursor" returns to the middle.
You omit this commmand and GRBL moves until all jog commands in its queue are through.
This may result in overshoot.

The jog abort clears the queue and cleanly decelerates the mill as fast as possible to a stop.

I think this behavior relies on the speed and acceleration values GRBL knows about the machine and the values you entered as defaults for the joystick settings.
Harald

G-Code editor problems

Hi,
GCode editor has many problems with editing...
We can not place cursor with 1 or 2 clicks... It require 4-5 times for placing cursor to point we need.
Also if g-code has errors, undo (ctrl-Z) command do not work to fix errors...
"Up-down cursor movement buttons" moves 2 lines sometimes... we can not place cursor with cursor movements by keyboard...
Regards
Kenan
:)

functions handling the data revceived on com-port

Hi Sven,

This is not a big issue since your current implementation works, but I wanted to point it out.

You recently pointed me to the instructions for GRBL communication and we got through all of theses in the past.
You posted the relevant code part for communication to my joystick as:

A command line should end with \r\n (CR LF) to be recognized as one command.

        private void serialPort_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
        {   while ((serialPort.IsOpen) && (serialPort.BytesToRead > 0))
            {   rxString = string.Empty;
                try
                {   rxString = serialPort.ReadTo("\r\n");              //read line from grbl, discard CR LF
                    this.Invoke(new EventHandler(handleRxData));        //tigger rx process 
                    while ((serialPort.IsOpen) && (isDataProcessing)) ;  //wait previous data line processed done
                }
                catch (Exception errort)
                {   serialPort.Close();
                    logError("Error reading line from serial port", errort);
                }
            }
        }

        private void handleRxData(object sender, EventArgs e)
        {
            rtbLog.AppendText(string.Format("< {0} \r\n", rxString));
            OnRaiseCommandEvent(new CommandEventArgs(rxString));
            isDataProcessing = false;
        }

Originally posted by @svenhb in #29 (comment)

I just again read our discussion on the communication to GRBL and I stumbeled over the following instructions on the GRBL V1.1 site:

The primary way to talk to Grbl is performed by sending it a string of characters, followed by a carriage return

So your implementation seems to be over defined, you search for "CR LF", GRBL only wants "CR".

Harald

missing files (?)

hi friend, i wrote to you because i think thath some files are missing to recreate .exe. i am working with vs 2010 and are missing:
horiz and vert flip.png
text to gcode.resx
invalid maiform.resx, but should be vs 2010, i try with vs2015.
please send me the missing files.
many thanks, bye

Soft Limit

Would it be possible to add a keep in area on the machine coordinates, so that it gives an error when the machine is attempting to leave this area by jog or on the launch of a file if it would leave it during the program? The reason is so the user could set the maximal machines traveling coordinates and it would never accidently hit a hard limit or GRBL soft limit in normal operation. It would also be handy if this keep in area would be visible in the Preview window, so you could immediately see where the problem is.

Another thing: I was lately engraving a pretty big file (5MB) and had the issue that the CPU went up to 100%, and the stream started to paused for a few seconds after every movement. I soon discovered that it is probably the preview window, because when I switched to the full screen task manager (or any other window) the usage went down to 4% and the stream became smooth again. I updated to the latest version, and it is a lot better: only 90% CPU and a smooth stream, but I thought maybe there is a way to improve it even further. Fait to say that I am using an old Pentium4 notebook running XP, and the file was really huge.

Greetings Gabse

Start from select line code

Hello, thanks for the great job.
I wanted to ask if it is possible to start my cnc from a selected line of code. In order to complete a long work in several moments.
Best regards

Streaming GCode: using Tool change causes too early finish of streaming

During the streaming process - after some tool change commands, the end of the GCode file will not be reached but streaming sends 'finish'.

Check end of this video

  1. a (^2 M5) command for the 2nd GRBL causes a M5 command on the 1st GRBL because of the feedback from SerialForm to MainForm to check / uncheck corresponding checkbox. Changed checkbox sends M5 command to SerialForm...
  2. M6 command (tool change) needs to be hide for GRBL, because it's an unknown command, but it was count as sent. But never received a according 'ok'.

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.