Git Product home page Git Product logo

cncgcodecontroller's Introduction

CNC-GCode-Controller

If you use a reprap Controller (like Marlin ...) for a CNC machine then this is your Program ;-)

Features:

  • Communication with the Controller over com port
  • Basic movements with preview
  • Loading cnc files
  • Preview of cnc file
  • Autoleveling (at this point only for Marlin firmware because of hit endstop message)
    • for GRPL you neet to set $10=2 for this to work!
  • Optimise G0 movements
  • Most commonly used Gcodes are translated for a Reprap Controller (Tested with Marlin)
  • Backlash correction
  • Artsupport

Tutorial Videos:

Infos:

http://reprap.org/wiki/CNC_Gcode_controller

ccgc ccgc2 cncgcode_simplecontrols cnccontroller2 cnccontroller3

cncgcodecontroller's People

Contributors

alromh87 avatar d00616 avatar im-pro-at avatar nicolas-rambaud avatar nutz95 avatar patronics avatar petejm avatar pknoe3lh 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

cncgcodecontroller's Issues

Add separate "Home Z axis" option

Hi, I have been using CncGcodeController for a while now (very convenient software, thanks!) and I am missing separate homing options.
In my current setup, when pressing "Homing" thr XY axes travel to zero and then Z goes down until I manually make contact with the probe wires. How does this differ from your Marlin configuration?

I wanted to ask for a new feature, to split the homing button into "Home XY" and "Home Z". That way it would be possible to zero the height in a more controlled manner without having to manually stop Z homing and later type G28 Z0 in the console.

Suport for modal G1 (Changed for pull request)

Hi, I have added support for modal G1 as output by pcb2gcode, and would like to have it included in the main code, here are the relevant lines:

diff --git a/src/cnc/gcode/controller/CNCCommand.java b/src/cnc/gcode/controller/CNCCommand.java
index aaa30d4..f0485af 100644
--- a/src/cnc/gcode/controller/CNCCommand.java
+++ b/src/cnc/gcode/controller/CNCCommand.java
@@ -269,6 +269,22 @@ public class CNCCommand {
}
else
{

  •        switch(p.get(0).letter)
    
  •        {
    
  •            case 'G':
    
  •            case 'M':
    
  •                break;
    
  •            default:
    
  •                if(p.contains('X') || p.contains('Y') || p.contains('Z'))
    
  •                {
    
  •                    if(c.lastMovetype==Type.G1){
    
  •                        p.insert(0, 'G', 1, true);
    
  •                        message+="Using modal G1! ";
    
  •                    }
    
  •                }
    
  •                break;
    
  •        }
    
  •      if(!p.get(0).isint)
         {
             state=State.ERROR;
    

    diff --git a/src/cnc/gcode/controller/CommandParsing.java b/src/cnc/gcode/controller/CommandParsing.java
    index 23edabc..ae2fd19 100644
    --- a/src/cnc/gcode/controller/CommandParsing.java
    +++ b/src/cnc/gcode/controller/CommandParsing.java
    @@ -168,6 +168,16 @@ public class CommandParsing {
    return parameters.contains(new Parameter(letter));
    }

  • public boolean insert(int i, char letter, double value, boolean isint){

  •    Parameter p = new Parameter(letter, value, isint);
    
  •    if (parameters.contains(p)){
    
  •        return false;
    
  •    } else {
    
  •        parameters.add(i, p);
    
  •    }
    
  •    return true;
    
  • }

  • public Parameter get(int index)
    {
    return parameters.get(index);

Thnaks

Auto Leveling - All points read the same height.

I'm using Cnc Gcode Controller with a Marlin based system. The auto-leveling is returning the same value for the same point. I can see that the points are being probed properly in the communication log (IE Info Received Z-hit at: XXX). The points displayed on the grid, however, are all the same value.

Double Sided PCBs and AutoLeveling

I'm trying to incorporate cnc-gcode-controller into my PCB workflow again. It just has a great autoleveling feature that most other softwares don't have. However, after probing the entire PCB I can only apply this information to the TOP layer of my PCB.

The reason is, the top layer works in positive coordinates, the bottom layer is set up to work in negative coordinates. This is necessary because you can use THE SAME reference corner on the actual copper clad board after turning the board over.

My workflow, and most others as well, is to mill TOP first while using the bottom left corner as 0,0, then turn the board over and use the bottom RIGHT corner of the machine as 0,0 and then work in negative coordinate space. That way, the PCB is always aligned and holes match exactly on both sides - independent from the actual size of the copper clad board! This is amazingly easy.

The issue is, cnc-gcode-controller does not understand negative coordinates when it comes to autoleveling. Autoleveling only works in positive coordinate space. The moment I switch over to the bottom side coordinate system, I cannot autolevel my board and hence cannot correct my mill file based on the actual surface map.

Colud not connect

I have Ubuntu 12.04 and try connect with my Merlin fw. It connect only with the beta and 1.0 release. Other up to latest 4.2 get my: "Printer did not respons!"
My java:
java version "1.7.0_51"
OpenJDK Runtime Environment (IcedTea 2.4.4) (7u51-2.4.4-0ubuntu0.12.04.2)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

Michal.

Linguistics

There are several typos in the GUI. I would fix them myself but I am not a Java person.

  • In Autolevel tab: "Abort"
  • In Autolevel tab: "Preview"

Events that cause deliberate disconnect should be configurable (ALERT / ERROR)

Hey Patrick,

I'm trying to work out what events cause a disconnect and how to change that behavior in cnc-gcode-controller.

Specifically, one of the issues is that upon certain reconnect attempts the software sends a GRBL reset command which causes GRBL to execute the start-up sequence stored in $N - regardless of where the machine currently is. On GRBL's side, I assume that's a desired behavior even though it only causes issues on my end. I already broke multiple endmills because I wasn't quick enough on my E-STOP.

In general, disconnecting upon ERROR or ALERT should be configurable. I haven't found a single instance where a disconnect had a desirable effect on my workflow. I pretty much always simply reconnect and then have to set up everything again, trying to avoid the aforementioned reset sequence that pops up only every so often instead of a complete GRBL LOCK wakeup (which is what I would expect when connecting every time) that requires $H homing before allowing anything else.

I found multiple places where a reset or disconnect is triggered but I can't work out the code workflow how this is implemented. Can you please give me some pointers?

Autolevel Options

When trying to change 'Autolevel/Options', the second value, 'Max depth' needs to be greater than 0, but the default is -1. How is this possible? And as far as I understand the algorithm, it really should be lower than 0?

Add mirror also to Z axis, please

Hi,

would you be so kind and add "mirror" to Z axis.
I have looked to your code and it looks like max 10 lines of code to do it.

I need it, since my machine has Z:0 in home position, and then it goes on plus in material direction. So for example Z:112 is a start when a surface of my material starts.

Thanks in advance,
Piotr

Program closes after clicking "Connect"

I am running the program on Windows 10 using the Java Runtime Environment 8. I have a RAMPS 1.4 shield and an arduino mega with Marlin firmware. Whether or not it is connected to the serial COM port, as soon as I select any of the viable baudrates and click "connect", the program immediately closes.

Windows 10

Na windows 10 program się wyłącza po naciśnięciu połącz.

Auto leveling Issue

Hi pknoe3lh,

I started playing with your software last night, and I tried to do the auto leveling procedure. After playing with the settings, I stumbled upon the same result as user McNugget6750 has.
My machine completes the G28 sequence, moves to [10, 10](my defined start point for the auto leveling) and sends the command G1 Z-5, after which the procedure stops. I have tried both marlin 1.0.2 and 1.1.0 RC7, and I'm getting the same issue for both firmware versions. After aborting the auto leveling procedure, I used M119 to check if the Z probe is triggered and it is.

As far as I am aware, marlin doesn't echo the Z location, or a Z trigger event on completion of the G1 command, it will just complete the command and wait for further input. G30 is used to probe for the Z location, and it will echo at what point the Z axis was hit at.

I'm not sure if I'm doing something wrong though.

Best regards,
Nikolai Iakoubenia.

How to run it?

HI,
Wondering how we run this program. it looks great but cant seem to get it running to test it out. please help.

Java is installed on win 8.1 clicked around and cant seem to open it.

Kind Regards

Connect Arduino

i read that someone had the same problem as me, but i cannot solve my problem. i'm using arduino mega 2560 with ramps 1.4 on windows 11 with an intel core i3-2310M. when i click connect, the program close itself immediately. thx

Can't run

Excuse me, do I have to download only the ,jar file? because when I downloaded it and run it, a window showed up with a message: "Could not load Settings" What do I have to do? Please help me bro!

Add simple Interface

And may be you deal a standart circle on interface like a prontoface aka repetier host for moving cnc. and options for moving cnc via keypad.

Auto Leveling stops 1mm above surface without doing anything

I'm using the latest version of the CNC gCode controller and a variant of Marlin that was released for the Malyan M150 - which I adapted for my M180.
No major changes, milling works perfectly fine.

When trying to use auto leveling the controller sends the command for approaching the first point
auto level problem

As you can see... it stops after that without anything to do. Marlin simply drives to the last G1 command and stops 1mm above the surface. It reports "ok" and does nothing else.

This seems odd and should not happen. Any ideas?

EDIT: After waiting for a while, I turned off the motors manually with the M18 command.

CNC/Spindle On replacement not working

The settings page provides a "CNC/Spindle On" custom command. I assume that this is intended to dynamically replace the M3 command that programs such as FlatCAM assume for spindle control but where firmware/hardware is not setup this way (e.g. CyclonePCBs Marlin f/w).

However this appears to not be functioning as the host still sends M3, despite me filling in the above field with M42 S0 P12.

Workflow Issue

Hi,

i'm a bit new to this toppic and I have a question.

I'm a proud owner of a millig machin and would like to use this programm to control my machine.
I wanted to mill a block from wood to test its capabilities and I ran into a problem.

I don't kow how to set the Z Zeropoint from my material.

So my question is, how are you doing it?
Do you move the mill towards the material and when the tool hits the surface you use Set Position?

It would be great if you can help me.

Heiko.

G2 speed problem

I try to use your software and got trouble with arc's
Parser: G2 X12.4450 Y21.6160 I9.5000 J0.0000 F1000
after this command cnc deal arc's with low speed may be F100

Setting spindle speed or feed rate removed as "command without any motion"

For the (correct, and important) command, G00 S30000 CNCGcodeController removes it from the output, and gives the following explanation:

G00 S30000 ( RPM spindle speed. )
  Message: Command without any movment! 
  Type:    G0
  Parser:  G0 S30000 
  Contex:  axes=[0.0, 0.0, NaN, NaN], lastMovetype=UNKNOWN, time=0:00:00
  Execute: 
            --> G0 F100.0000

As a workaround, I'm setting the CNC/Spindle ON command to include the G0 S30000 command too, but this limits a given gcode file to only 1 speed, so is not a complete solution.

Only "Sim" Device shows up in macOS?

As the title says, the only option for a device to connect to is the "Sim" simulator. The machine does show up correctly in other software, including Pronterface and Repetier host. There doesn't seem to be any other settings menu to set up or enable other devices, as I'd initially expected there must be.

gCode sending too slow? CNC stutters...

Hey guys,

Great work on this, I love the software and I have been using it for quite some time now. However, I noticed when milling PCBs with it, very small segments get stuck and the mill comes to a halt in a regular basis.

At first, I believed it was a MARLIN issue because it's been known for a while but my research shows this has been fixed. Since I want the mill to run smooth the entire time I got GRBL for Cyclone to work since I'm working on a Mega256 + RAMPS1.4.

Everything works but I still get the same stuttering with very small line segments.

This couldn't be, and since I already developed my own fast gCode sender for my grbl based laser cutter controller and I knew what the behavior of the CNC under buffer underrun looks like, I started digging into your java code to check if I could optimize the gCode sender.

However, I can't find it. Where do you store your gCode list after optimization? Where do you actually run through the entire list and send all the commands? Where do you wait for the ok from the controller firmware?

Since I already have a strategy for fast sending, I just need to port my C code into your sender and it should work better and without the stuttering.

Could you please point me to the right files/classes/lines?

Thanks a lot!

NRSerial Baudrate check is stopping serial options in NRSerial

The NRSerial.setBaud() filters out some of the provided options.
I think you should use the same array for the baud selection as you setBaud check.
Or not check it at all since your are setting the list in the GUI and there would be no way to send anything that is not already listed. Correct?

Is there a reason you distinguish between JS and NR baud rates?
Maybe just have AComCore.getPortsSpeeds() list the baud speeds you allow.

From NRSerial

public void setBaud(int baud) {
switch(baud){
case 2400:
case 4800:
case 9600:
case 14400:
case 19200:
case 28800:
case 38400:
case 57600:
case 76800:
case 115200:
case 230400:
case 250000: //Added to stop invalid (Arduino happy baud)
case 256000: //Added to stop invalid
this.baud = baud;
return;
default:
throw new RuntimeException("Invalid baudrate! "+baud);
}
}

Also don't know whats up the the code tag not working on Github... so i didn't use it

Fixing it your code works for me and I love it thank you.
Been looking for a good MPCNC with Repetier firmware controller. Since i run on the SD card but want to add bed leveling to my g-code.

starting

Hi, im totally new to this whole programming things. how do i even start this program?

License ?

Hello, under what license is this project released under ? Thank-you.

Spindle M106 and M107 support

Can you add support for the M106 Snnn and M107 commands that Marlin uses (V1.1.5) to control the laser or spindle where Snnn is S0 to S255 and S255 is max power? Also G94 and F50 commands are in red on the CNC Milling gcode window so they're not sent, these are also required for feed rate setting.

Cheers, Dan

Autolevel problem

How exactly the autolevel works?

I am using the latest Marlin version and a Zmin endstop but its doesn't detect the endstop trigger

Thanks

Edit: I figure it out. Apparently I commented out #define ENDSTOPS_ONLY_FOR_HOMING in the configuration_adv.h file

OS X cannot find setting

I always get the error: "Could not load settings" on start up. Where should the setting file be and what should it be called?

Using Marlin 1.5 mit Homeposition im Zentrum

Hallo ich versuche das Programm zusammen mit Marlin zu nutzen. Bei meinem selbstbau 3d Drucker / CNC aufbau hab ich die Home Pos in der Mitte. Kann man das Programm dazu mit einer Option dazu bringen auch negative Koordinaten zu akzeptieren?
Ich nutze sehr gerne den G38.2 Befehl um die Oberfläche anzutasten oder Seiten oder Löcher anzutasten. Eine Eingabemöglichkeit Im advanced Tab wäre cool.

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.