GithubHelp home page GithubHelp logo

gnea / grbl Goto Github PK

View Code? Open in Web Editor NEW
4.0K 4.0K 1.6K 2.26 MB

An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on a straight Arduino

Home Page: https://github.com/gnea/grbl/wiki

License: Other

Makefile 0.78% C 84.47% C++ 14.75%

grbl's Introduction

Gnea

Gnea(tm) is an open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on an ARM-based microprocessor. This project is intended to be the next step for the popular AVR Arduino-based Grbl-firmware and will be developed and maintained by Grbl's developers.

Coming soon!

grbl's People

Contributors

0xpit avatar alpharesearch avatar beardicus avatar binaryconstruct avatar buserror avatar chamnit avatar daapp avatar diara628 avatar eliteeng avatar henols avatar hin avatar jandersonfrominventables avatar jgeisler0303 avatar kfoltman avatar martinstingl avatar michmerr avatar paulkaplan avatar poelstra avatar protoneer avatar robgrz avatar rustyoz avatar scottrcarlson avatar shapeoko avatar silasb avatar simen avatar tmpvar avatar winder 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  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's Issues

min/max PWM variables and config.h

In version 1.1e I can find $30 and $31 that control max and min spindle speed, but in config.h exist macro SPINDLE_MINIMUM_PWM_VALUE.

This macro does something different from $31? Is it deprecated?

Settings Description ($$) ?

I just uploaded the 1.1 to an Uno board and I am doing the necessary changes to my GCode sender. I noticed that the '$$' returns the list of the GRBL settings but the description is missing.

Is this a bug or the new version will not send the description ?

Micro not compiling ?

GRBL 1.1 did compile fine for the Uno and the Nano but did not compile for the Arduino Micro.
Should it compile ? The Micro has an ATmega 32U4.
Am I doing something wrong ?
Is it possible ? Can you push me in the right direction ?

P.S. This is the error the Arduino IDE gave :

GRBL problems.txt

Thank You !

Minor 1.1e issue.

In stepper.c, is_pwm_rate_adjusted is defined when VARIABLE_SPINDLE.
Line 367, 660,665 needs to have #ifdef VARIABLE_SPINDLE.
Should be a quick fix.

Laser cutter position issues.

@McNugget6750 : I've moved your question to a new issue on the Grbl v1.1 issue threads.

@chamnit Thank for the great work on grbl! I now converted over to v1.1 but I still have some issues that I had before and maybe you have the answer to these issues:

  • I'm using grbl on an Arduino Nano on my K40 laser.
  • I used grbl 0.9j with some extensions to be able to laser engrave at a decent speed using planned S commands.
  • I have issues cutting arcs as can be seen in the pictures below:

This is the dxf file I'm trying to cut. A small quad copter design. This is the import within DXF2GCODE
http://www.microforge.de/grblproblem/DXFImport.PNG

This is the interpretation of the generated gCode loaded into grbl Controller
http://www.microforge.de/grblproblem/DXF-GCodeInterpretationBy%20grblController.PNG

And this is the cut that comes out of grbl. Please note that some parts are cut correctly but some larger parts are cut completely asymmetrically, the holes are in the wrong locations, the complete shape of the quad base place is asymmetrical and the motor mounts at the arm extensions are entirely unusable.
http://www.microforge.de/grblproblem/LaserCutPartsByGRBLv1.1.JPG

Even though it looks like a step error, I'm very certain it is not a mechanical issue. I cut several parts before with no issues and only more complex files seem to produce these errors. I remember that I have seen this before a couple of years ago when I tried to implement a mill with this toolchain...

Here is the gCode file:
http://www.microforge.de/grblproblem/completeCopter.nc

Any ideas?

dxfimport

dxf-gcodeinterpretationby grblcontroller

lasercutpartsbygrblv1 1

Comment Mistake and added PWM speed

In cpu_map.h I added the no prescaler pwm speed and corrected the prescaler description in the comments according to the AVR datasheet. The last two lines are 1/64 and 1/256.
I DID NOT CALCULATE THE NEW ACTUAL FREQUENCIES!

// Prescaled, 8-bit Fast PWM mode
#define SPINDLE_TCCRA_INIT_MASK   ((1<<WGM20) | (1<<WGM21))  // Configures fast PWM mode
#define SPINDLE_TCCRB_INIT_MASK   (1<<CS20)                  // no prescaler! Used for K40 CO2 Laser
// #define SPINDLE_TCCRB_INIT_MASK   (1<<CS21)                  // 1/8 prescaler -> 7.8kHz (Used in v0.9)
// #define SPINDLE_TCCRB_INIT_MASK   ((1<<CS21) | (1<<CS20)) // 1/64 prescaler -> 1.96kHz
// #define SPINDLE_TCCRB_INIT_MASK   (1<<CS22)               // 1/256 prescaler -> 0.98kHz

Feed rate appears to be ignored in $J

When issuing a series of $J commands the feed rate reported in the [JOG: response goes to max, e.g. 500 default setting even though F50 is specified in the $J command.

String used is: $J=G91G20Y0.1 F50

Grbl version 1.1a

Reason for sleep option?

Just curious. What's the benefit of just powering down your machine? Does it hold over the temporary g92 info?

Question about G4

When executing G4 command, real-time status report to be in "Idle" state, even if pause command is not completed and although there are other commands already queued for execution.

Some GUI (link mine) use tu push continuous "?" status request to know current position and to put the interface in the right operational mode (i.e. enabling homing button only when status is alarm/idle).
In this case UI is carried to think to be in Idle state and behaves in an unexpected way, enabling buttons that should not be enabled during the execution of a program.

I can not assert if this behaviour is an issue or not, but Idle is documented as:

Idle: All systems are go, no motions queued, and it's ready for anything.

Here an example: https://youtu.be/OvhySa2IGdc
Look at bottom-right where I have the status reporting (as well as and homing button and play button that depend from status).

G4 Idle sample.gcode.txt

Single limit pin question

I am putting together a new machine and would like to use a single I/O pin for all 3 limits. I believe the following modifications will make this work, but am unsure since I am not that good a programmer. I intend to use digital pin #9 as the I/O pin for all limits. Can someone check my changes below to see if these are all that I need to do?

In cpu_map.h, I changed the following lines with the changes in Bold italic text (Comments omitted)
Line 63: #define X_LIMIT_BIT 1
Line 64: #define Y_LIMIT_BIT 1
Line 64: #ifdef VARIABLE_SPINDLE
Line 65: #define Z_LIMIT_BIT 1
Line 66: #else
Line 67: #define Z_LIMIT_BIT 1
Line 68: #endif

In config.h I set the homing bitmasks as follows:
#define HOMING_CYCLE_0 (1<<Z_AXIS)
#define HOMING_CYCLE_1 (1<<X_AXIS)
#define HOMING_CYCLE_2 (1<<Y_AXIS)

I'm thinking these are the only changes I would need and would result in completely homing Z first then X then Y. Have I got this right?

problem with classic mode

Dear @chamnit in file report.c line 298 :

printPgmString(PSTR(" (homing dir invert mask\r\n$24="));

bug fix add " ) " :

printPgmString(PSTR(" (homing dir invert mask)\r\n$24="));

it's had problem to setting in Grbl 3.6.1 control
and in file defaults.h line 50 : can change if use classic mode in Grbl 3.6.1 control
#ifdef USE_CLASSIC_GRBL_INTERFACE
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)| (BITFLAG_RT_STATUS_WORK_POSITION))//
#else
#define DEFAULT_STATUS_REPORT_MASK 1 // MPos enabled
#endif
in file setting.h warning in 3 function:

// Returns the step pin mask according to Grbl's internal axis numbering
uint8_t get_step_pin_mask(uint8_t i);

// Returns the direction pin mask according to Grbl's internal axis numbering
uint8_t get_direction_pin_mask(uint8_t i);

// Returns the limit pin mask according to Grbl's internal axis numbering
uint8_t get_limit_pin_mask(uint8_t i);

--> To do bug fix:

// Returns the step pin mask according to Grbl's internal axis numbering
uint8_t get_step_pin_mask(uint8_t axis_idx);

// Returns the direction pin mask according to Grbl's internal axis numbering
uint8_t get_direction_pin_mask(uint8_t axis_idx);

// Returns the limit pin mask according to Grbl's internal axis numbering
uint8_t get_limit_pin_mask(uint8_t axis_idx);

Step by Step acceleration in a CPU-friendly way

@chamnit :Hello,
There is an interesting paper on the net:
http://www.embedded.com/design/prototyping-and-development/4008259/Linear-motor-control-without-the-math
I could implement it a way which allows running on 8-bit cpus. Really amazing: No float calculations, not division, no multiplication and no table lookups required in stepper interrupt. Just some adding and shifting - all 16bit.
Biggest advantage is saving a lot of cpu time: There are only 3 line segments needed: accelerate, cruise and deccelerate.
And some disadvantage: stepper interrupt has to run in fixed intervals and not at too high frequency (8-16 khz). Not a big problem: see comments in code.

Now I want to try it in grbl. But I don't want to break too much existing functionality in stepper.c.
Could You take a look at my code and give me some hints how to put that in?
I think I can do the ISR. But how to calculate the line segments?
You can simply compile main.c on PC and play with it.

steptimer.zip

Need some help with project "Multiaxis Stepping Coprocessor"

@chamnit
#46 is part of it. And I got some good hints from You. Would You like to discuss a little?

The idea is to make a cnc controller board a simple coprocessor executing steps. It gets prepared line segments over a simple binary protocol and executes them. Primary target is existing hardware with old and slow AVR processors. Think of having grbl main code running on raspberry pi (or something else) sending line segments to something which does the timer ISR. (Yes, there is a lot of trouble with peripherals like endstops etc. - Just let me try :-) )

Currently implemented is a communication protocol over serial and 8-Bit bresenham, doing more than 70000 steps/s on six axis - all at full speed. With some timing delays for stepper drivers (1-2 us) and running serial communication it is still more than 60000 (on 16 MHz 328p). That looks promising.

One open item is step timing. Ranade does not work well as I understand. Maybe linear timer advance per line segment could to the job.
Another problem is a bit tricky: how to initialize the bresenham error value on each line segment? Than means: Should I position slow axis pulses at be beginning, the middle or the end? Make it random? Or track an initial value on host and send it?
(Random is interesting. It distributes aliasing effects over a wider spectrum. Did anyone try that?)
AMASS is good - but "fine tuning". Or would it help me with bresenham issue?
Homing and probing is a bigger problem. The host processor is not realtime.

I can try all those things.

What I'm asking You:
What is You general opinion about this idea?
Do You have some hints how to generate those stepping line segments in grbl? They have to be shorter than 128 steps but not too short at high speeds (limit is about 500-1000 segments/s).

It is not important to have my "experiments" in grbl main project. And 'im not asking You to make any changes. Just give me a bit of Your experience! :-)

Error if disable VARIABLE_SPINDLE definition

If VARIABLE_SPINDLE definition is commented the make is failed with this error:
gcode.c: In function 'gc_execute_line'
gcode.c:1102:9: too many arguments to function 'spindle_set_state' spindle_set_state(SPINDLE_DISABLE,0.0);

In code definition spindle_set_state is

#ifdef VARIABLE_SPINDLE
  void spindle_set_state(uint8_t state, float rpm)
#else
  void spindle_set_state(uint8_t state)
#endif

I attach a zipped patched files
patch.zip

Dsicussion, new feature: Spindle Coolant Temp monitoring with possible alarm

It appears that there is a trend towards running micro cnc machines with water cooled cnc spindles. For water cooled spindles, having a good flow, and good cooling is critical to the life of the spindle.

Having the ability for grbl to monitor a temperature probe that is inside the cooling loop could provide extremely valuable information as to the health of the system. Additionally, being able to trigger alarms based on thresholds for nominal coolant temp that could be used to shut the machine down, or put everything in sleep mode could save expensive repairs if something was to fail in the cooling loop.

Marlin 3D printer Firmware was orignally forked from grbl, and has temp probe monitoring. I would think that could serve as a strong base for implementation; though not positive the full array of temp sensors would need to be supported in grbl.

This is the particular device I have in my cooling loop
https://www.amazon.com/gp/product/B00CMR3CC2

Thoughts?

Hardware variable overrides

Hi dear,

it's difficult to implement the ability to control the overrides value by a result of an analog input? (ex. withe a potentiometer connected to an analog input can change the spindle speed or feed override in real time)
Thanks in advance.

Wow this is good! 1.1D and latest UGS Platform

Hi, well tonight I quickly flashed 1.1D into an existing Uno , a unit that started off in life running 0.9J then 1.1c and then tonight 1.1D. And also tonight loaded up the latest UGS Platform build. I am really impressed the overrides nd the visualiser are really really cool!!!!!! And so far although I have only been running test code its been running really well. Thanks @chamnit and @winder for your efforts and everyone else that contributes to these two great projects. This cnc is for a mate of mine who really wants to cut stuff and is not got enough time to be fluffing around with wiring etc so he gets me to do it, likewise I don't want him using something unreliable as it will inevitably soak up more of my time, so GRBL has been a good choice, simple and so far very effective. Cheers fellas!

Problème avec la compilation

Bonjour à tous,
J'ai un problème de compilation avec GRBL 1.1e :

In file included from /Users/Eric/Documents/Arduino/libraries/grbl/config.h:30:0,
from /Users/Eric/Documents/Arduino/sketch_dec04a/sketch_dec04a.ino:1:
/Users/Eric/Documents/Arduino/libraries/grbl/grbl.h:68:4: error: #error "Required HOMING_CYCLE_0 not defined."
#error "Required HOMING_CYCLE_0 not defined."
^
/Users/Eric/Documents/Arduino/libraries/grbl/grbl.h:98:4: error: #error "WCO refresh must be greater than one."
#error "WCO refresh must be greater than one."
^
/Users/Eric/Documents/Arduino/libraries/grbl/grbl.h:101:4: error: #error "Override refresh must be greater than zero."
#error "Override refresh must be greater than zero."
^
exit status 1
Error compiling for board Arduino/Genuino Uno.

Merci,

Some general discussion about programming language and coding style

This is a bit off topic but might be useful when starting a version 2.0 in far future.
I'm not really fan of plain c programming. But on controllers it is ok. Especially with that clean coding style we find in grbl.
I thing using C++ in Arduino style is absolutely a no-go. Performance and flexibility of most libraries ist simply 👎
But recently I discovered C++ templates for controller programming. They are basically "macros on steroids".
You can keep all code in headers and instantiate it in a single main.cpp.
That makes less files, less hassle with declarations and less global variables.
GCC (AVR-GCC too) can do amazing optimizations on that kind of code. Nearly all small functions and all those called from only one place get inlined and globally optimized. I'm often surprized by very small binary output.
Biggest problem with C++ is not language but programmers. C++ programmers tend to make code overly abstract and and complicated - just because the language allows that.

1.1d (20161311) : Change unit and then send '?'

@chamnit
I congratulate you on your work to come up with Grbl-1.1.
Many improvements since version 0.7 (2012)!

Issue:
After the start-up and a first command '?' the report contains 'WCO' which can be stored in 'lastWCO'.
But after a change of unit, the first command '?' the report does not (usually) contain 'WCO'.
The calculation 'workPos = Mpos - lastWCO' becomes false because 'Mpos' uses one unit (eg mm) and 'lastWCO' uses another one (inches).
Does the GUI have to make the correction or Grbl could systematically send 'WCO' after a change of unit?

What is your opinion ?

******* Traduct ty Google *****************

$G reports M0

Is it normal while streaming and the status is "Run" when sending $G commands
that grbl reports M0?

Arduino Uno vs Nano

I can compile grbl 1.1 for the uno, but have some of the laser control boards with stepper drivers on them that use the nano, It will not compile because there is not enough flash memory available. Is there anything I can disable that will not be needed on a laser setup that will reduce the memory usage?

Sketch uses 31,144 bytes (101%) of program storage space. Maximum is 30,720 bytes.

Laser mode tweaks.

ALL: Here are a list of tweaks I'm working on implementing prior to v1.1 master release! Please comment on them, if you disagree, have concerns, or think it's not the right thing to do for ANY reason. I'm fairly new to laser cutters and need user help to figure out some of the details.

  • The laser will be automatically disabled whenever the motion mode is not G1, G2, or G3. This includes G0, G38.x, and G80 gcode commands. This is for safety reasons. I just got into laser cutters and it's very evident that safety is a huge issue with these devices. Fires are very easy to start.

  • @DOUG888: In response to your earlier query. grbl/grbl#1129 After much thought, I'm going to add laser disabling during a feed hold as the standard behavior.

  • There will be two distinct laser cutting modes. Constant power and Dynamic power (acceleration ramp adjusted). They will be controlled by an M3 and M4 command, respectively. You would normally use M3 constant power mode, but in special cases, like finer detail jobs, M4 dynamic power mode can be used.

    • NOTE: The spindle direction pin will still behave the same way with M3 and M4. So it can be used with an LED to indicate which mode is active.

Scale spindle PWM (Laser power) by acceleration?

What i want is scale Laser power down while accelerating / deccelarating. I think this would solve the problem of deeply burned edges and other small figures.
It can be easily done in st_prep_buffer().
Formula would be: new PWM = calculated PWM * [current_speed from acceleration code] / reference speed. (simple version, there should be a configurable minimum)
What would be the best value for "reference speed"?
I suppose the output of plan_compute_profile_nominal_speed() would be OK, but I'm not sure.

Classic reporting and report GUI mode broken

Just an FYI. config.h compile options for classic reporting mode and disabling report GUI mode are broken. I'll likely fix the first and remove the latter. Or maybe remove both. Classic reporting will not fit on 328p Arduinos without removing things like settings strings and such, which at that point, may make it incompatible with most GUIs anyway.

It's highly recommended for GUI devs to use the new Grbl interface standard instead. It'll perform significantly better, contains substantially more real-time data, and is easier to maintain and write for. A lot of these changes were based on direct feedback from multiple GUI developers and some bench performance testing.

help/advice/maybe a simple update?

i'm new to git hub and mainly a chip maker that dabbles in electronics for fun, so sorry if this is the wrong place. if it is the wrong place any git users tell me where to re post this and i will.

i would like to try out the new beta but confused about how to up load it to my arduino.
i have a spare one i would like to install it to so i don't have to reconfigure my old one.
just pull the custom shield i made and swap the arduino's is what ill be doing.

do i just download the 1.1 zip like i did with the .9j and import the library in arduino - up load sketch?
do i need to need to delete the old library?

any way to change the current 1.1 if you do upload with the arduino ide that the libary/example name says some thing like grbl1.1 beta etc so i dont have to unstall the .9j example i have?

sorry if that sounds lazy....
i'm finishing up a cnc control panel like you see on a professional machine. so i dont need a laptop or pc near by.
basically a sealed box with a swing arm mounted to my mill.
10" touch screen, keyboard and track pad, buttons for different features etc. raspberry pi 3 , arduino with a custom shield for easy wiring.

Problem with Pause->Stop behaviour

I am working on improvements of LaserWeb3 especially for the new Grbl features and have some trouble with hold and reset (in combination with character counting protocol):

  • For pause, we use '!' hold command to get immediate response, which works well with new grbl (but will be a problem if used with older grbl, as the laser will not be switched of!).
  • Resume with '~' is also ok.
  • On stop we send '0x18' (ctrl-x) which works well while the job is running, but if the job was paused before, grbl remains in hold state an doesn't clear the queue.

@chamnit : Do you have any suggestion how to solve this issue?

Spindle speed reporting wrong

I noticed that when $13=1 to report inches, and then calling a $G, the S-value is wrong by a factor of 25.4. For example, if you Issue S500, the $G report shows S=19.7 if $13 is set to 1.

Laser mode issues

Hi there,
I'm running the 1.1 beta on a Raspberry Pi CNC Shield from Protoneer. I'm using this to control a homemade 40W CO2 laser combined with LaserWeb3.
I switched fron 0.9j because of the laser mode - which looks promising!

My findings so far:

  • I miss the comments on the settings when doing a '$$' command. It might be a compile flag that I'm missing?

  • I'm compiling on the pi that is connected to the shield. Verbose programming shows some warnings about true, false, max and min being declared multiple times. it's not a huge thing but warnings nonetheless.

  • The system stops at an arbitrary point and gives an 'Alarm' state - Is there any way to get detailed information about what caused the alarm?

  • The front page mentions 'laser mode activated by $ command' Could you clarify that to say $32=1 enables laser mode? it saves some time when looking through all settings :)

Spindle accessory state is not always reported

If I send the command M3G1X1F1S1 the override status report gives me:
<Idle|MPos:1.000,0.000,0.000|Bf:15,128|FS:0,1|Ov:100,100,100>

Sending a 0x9E still toggles the spindle speed between 1/0 as expected.

Where Headed?

@chamnit : Just a few questions regarding where GRBL is heading if you can answer. These would obviously be questions regarding the ARM version as the UNO is maxed out.

  1. Backlash Compensation - Sounds like it is already already planned
  2. Canned cycles - Although mine and a few other GUI's have incorporated some of the canned cycles, is there any plan to incorporate them natively into GRBL?
  3. Cutter radius compensation. This is a feature that I think is preventing a good number of people from implementing GRBL on metal cutting milling machines. I have looked at implementing this in a GUI, but it is problematic since it requires look-ahead, look behind, position tracking, mode tracking,(G90/G91), etc. Much of the work would be re-creating much of what GRBL already has to do. This one is definitely not trivial even in grbl. Just wondering if it is even on the horizon?
  4. Spindle synchronization - I remember you mentioning you have a CNC'd lathe, so you would know how important this feature is to lathe operations in particular. In my opinion, without spindle sync GRBL is not an adequate option for lathes. I love GRBL and am a definite convert, and would love to see this so I can use it with my lathe. Are there any future plans to implement this?

I know there are likely many other things planned and that the above list is specific to metal cutting. I am a metal head and these are the ones that interest me the most, but I fully understand that there are many other users that are not using GRBL on metal cutting lathes and mills, and they have interests as well, and the above list might not do anything for them. I'm just wondering at this point.

Thanks,

John B.

Over ride over applies

original post: winder/Universal-G-Code-Sender#503

Lets say your max speed is 600, and the program is at 500. If I apply +20%, it'll max out. I can still click through, adding up to +100% (1000 total) but the machine will still move 600. The issue is, when you go to lower the value there is no real world speed effect until you are again at 20% or lower (so 8-80 clicks of no effect and potential damage). Not sure how you can limit this, but it's something that should be done. Cheers

Timer1 prescaler

@chamnit Sonny, could you briefly explain where the Timer1 is being started in stepper.c in (default) case of using AMASS ?

I can only see TCCR1B = (TCCR1B & ~((1<<CS12) | (1<<CS11))) | (1<<CS10); // Reset clock to no prescaling. but according to the ATmega datasheet (pg 173) this STOPS the Timer1

I can also see TCCR1B = (TCCR1B & ~(0x07<<CS10)) | (st.exec_segment->prescaler<<CS10); but that is only for the case with no AMASS...

Thanks!

Flood Override Toggles status reports don't seem to be working

The flood toggle doesn't seem to be working as expecting. After sending 0xA0 T:F is only included included in one override report. Is there a reason it would be automatically turned off?

[verbose] <Hold:0|MPos:51.396,9.608,-3.176|Bf:0,38|F:0.>
[verbose] <Hold:0|MPos:51.396,9.608,-3.176|Bf:0,38|F:0.>
>>> 0xa0
[verbose] <Hold:0|MPos:51.396,9.608,-3.176|Bf:0,38|F:0.|Ov:100,100,100|T:F>
[verbose] <Hold:0|MPos:51.396,9.608,-3.176|Bf:0,38|F:0.>
[verbose] <Hold:0|MPos:51.396,9.608,-3.176|Bf:0,38|F:0.>
[verbose] <Hold:0|MPos:51.396,9.608,-3.176|Bf:0,38|F:0.>
[verbose] <Hold:0|MPos:51.396,9.608,-3.176|Bf:0,38|F:0.>
>>> 0x9e
[verbose] <Hold:0|MPos:51.396,9.608,-3.176|Bf:0,38|F:0.|Ov:100,100,100|T:S>
[verbose] <Hold:0|MPos:51.396,9.608,-3.176|Bf:0,38|F:0.>
[verbose] <Hold:0|MPos:51.396,9.608,-3.176|Bf:0,38|F:0.>

Spindle speed in status reports

Real-time spindle speed seems to have been forgotten in the status reports. It wasn't needed before, but with spindle speed overrides (and lasers), you'll have no idea what the spindle speed Grbl is executing at any particular moment.

To address this, I'm proposing that we change the realtime "Feed Rate" report field to a "Feed and Speed" field. So from

F:100.

to

FS:100.,9000, where 9000 is the spindle RPM with speed overrides.

Spindle toggle behavior

I'm using the latest public changes on the edge branch:

>>> $I
[VER:1.1d.20161027:]
[OPT:V]

While trying out the new accessory state status message and toggles I noticed some strange behavior with the 0x9e spindle toggle. First of all, it doesn't seem to do anything (as per the documentation). Would it be possible to enable the toggle when idle?

I also noticed that when the machine is paused some 0x9e disable commands are being ignored. The restore command always seems to work on the first try.

<Hold:0|MPos:25.644,9.608,-3.176|FS:0,0>
>>> 0x9e
[MSG:Restoring spindle]
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000|Ov:100,100,100|A:S>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000|WCO:0.000,0.000,0.000>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
>>> 0x9e   *** ignored ***
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
>>> 0x9e   *** ignored ***
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
>>> 0x9e   *** ignored ***
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000|Ov:100,100,100|A:S>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>
>>> 0x9e
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,0|Ov:100,100,100>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,0>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,0>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,0>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,0>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,0>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,0>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,0>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,0|WCO:0.000,0.000,0.000>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,0>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,0>
>>> 0x9e
[MSG:Restoring spindle]
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000|Ov:100,100,100|A:S>
<Hold:0|MPos:25.644,9.608,-3.176|FS:0,1000>

The flood toggle works every time unless I send a bunch of them, so I don't think there's anything wrong with how I'm sending the command.

1.1d (20161311) : "$G"

in"[GC:] G-code Parser State Message"
you specify the value returned by Grbl when ordering "$G"
[GC:G0 G54 G17 G21 G90 G94 M0 M5 M9 T0 F0. S0.]

but now I get after starting
[GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0 S0] in mm
[GC:G0 G54 G17 G20 G90 G94 M5 M9 T0 F0.0 S0] in inches
'M0' is absent,
F0 is integer (mm) and float (inches).
The planner buffer is empty (no motion).

S0 is an integer or a float (S0.) ?
What little be the reason of the absence of 'M0' ?
Why differentiate 'Fxxx' ?

How Set Slowly ramp to pwm setpoint?

How Set Slowly ramp to pwm setpoint? Most PWM motor controllers will faithfully attempt to instantaneously start or stop a motor, causing massive current inrush.

Spindle override on off error in GUI grbl panel

When I pause the program and turn the spindle off via the spindle override button it gives me an error. The error reads "Fatal error on write to Grbl, the I/O operation has been aborted because of either a thread exit or an application request"

1.1.e svn 664 : minor bug

in 'jog.c::uint8_t jog_execute(plan_line_data_t *pl_data, parser_block_t *gc_block)'

#ifdef USE_LINE_NUMBERS
// pl_data->line_number = gc_block.values.n;
pl_data->line_number = gc_block->values.n;
#endif

Buffer usage in status reports

@vlachoudis brought up a point that the status report buffer usage should state number of bytes and blocks free, rather than in use. Doing it this way, doesn't require knowing how big the buffer is.

After asking around, it doesn't seem like anyone uses the buffer state and don't have a reason to. The one instance that I know its being used heavily is made obsolete by introducing the new jogging mode to v1.1.

I propose to disable buffer usage by default, make it available for re-enable via settings mask, and tweak it to say available, not used. This is generally only useful for debugging an interface and doesn't need to take up serial TX bandwidth unless there is a good reason. Does anyone?

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.