im-pro-at / cncgcodecontroller Goto Github PK
View Code? Open in Web Editor NEWCNC-GCode-Controller
License: MIT License
CNC-GCode-Controller
License: MIT License
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.
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
There are several typos in the GUI. I would fix them myself but I am not a Java person.
In some settings it is mirrored.
I always get the error: "Could not load settings" on start up. Where should the setting file be and what should it be called?
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.
Hi, im totally new to this whole programming things. how do i even start this program?
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.
Na windows 10 program się wyłącza po naciśnięciu połącz.
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
Hello, under what license is this project released under ? Thank-you.
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
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.
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
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.
Can you add Russian translation ??
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!
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.
Hi pknoe3lh,
would it possible to add different travel speed settings for the axes or to allow the M-Code (e.g M203) to change it with the G-Code?
Best regards,
J4363R
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?
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.
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
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.
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.
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
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.
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.
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
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?
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.
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
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.
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.
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.