GithubHelp home page GithubHelp logo

vlachoudis / bcnc Goto Github PK

View Code? Open in Web Editor NEW
1.5K 184.0 527.0 44.4 MB

GRBL CNC command sender, autoleveler and g-code editor

License: GNU General Public License v2.0

Python 96.65% Shell 0.09% HTML 1.01% JavaScript 1.39% Batchfile 0.04% Makefile 0.05% C++ 0.02% G-code 0.40% Roff 0.08% Cython 0.26%

bcnc's Introduction

bCNC

GrblHAL (formerly GRBL) CNC command sender, autoleveler, g-code editor, digitizer, CAM and swiss army knife for all your CNC needs.

An advanced fully featured g-code sender for grblHAL (formerly GRBL). bCNC is a cross platform program (Windows, Linux, Mac) written in python. The sender is robust and fast able to work nicely with old or slow hardware like Raspberry Pi (As it was validated by the GRBL maintainer on heavy testing).

IMPORTANT! If you have any troubles using bCNC, please read WIKI and DISCUSS it first. Only create new issues when you are certain there is a problem with actual bCNC code.

Build Status CodeFactor

All pull requests that do change GUI should have attached screenshots of GUI before and after the changes. Please note that all pull requests should pass the Travis-CI build in order to get merged. Most pull requests should also pass CodeFactor checks if there is not good reason for failure. Before making pull request, please test your code on both python2 and python3.

bCNC screenshot

Installation (using pip = recommended!)

This is a short overview of the installation process, for more details see the bCNC installation wiki page.

This is how you install (or upgrade) bCNC along with all required packages. You can use any of these commands (you need only one):

pip install --upgrade bCNC
pip install --upgrade git+https://github.com/vlachoudis/bCNC
pip install . #in git directory
python -m pip install --upgrade bCNC

This is how you launch bCNC:

python -m bCNC

Only problem with this approach is that it might not install Tkinter in some cases. So please keep that in mind and make sure it's installed in case of problems.

If you run the python -m bCNC command in root directory of this git repository it will launch the git version. Every developer should always use this to launch bCNC to ensure that his/her code will work after packaging.

Note that on Windows XP you have to use pyserial==3.0.1 or older as newer version do not work on XP.

PyPI project: https://pypi.org/project/bCNC/

Installation (manual)

You will need the following packages to run bCNC

  • tkinter the graphical toolkit for python Depending your python/OS it can either be already installed, or under the names tkinter, python3-tkinter, python-tk
  • pyserial or under the name python-serial, python-pyserial
  • numpy
  • Optionally:
  • python-imaging-tk: the PIL libraries for autolevel height map
  • python-opencv: for webcam streaming on web pendant
  • scipy: for 100 times faster 3D mesh slicing

Expand the directory or download it from github and run the bCNC command

Installation (Linux package maintainers)

Installation (Compile to Windows .exe)

Note that you might probably find some precompiled .exe files on github "releases" page: https://github.com/vlachoudis/bCNC/releases But they might not be up to date.

This is basic example of how to compile bCNC to .exe file. (given that you have working bCNC in the first place, eg. using pip install bCNC). Go to the directory where is your bCNC installed and do the following:

pip install pyinstaller
pyinstaller --onefile --distpath . --hidden-import tkinter --paths lib;plugins;controllers --icon bCNC.ico --name bCNC __main__.py

This will take a minute or two. But in the end it should create bCNC.exe. Also note that there is make-exe.bat file which will do just that for you. This will also create rather large "build" subdirectory. That is solely for caching purposes and you should delete it before redistributing!

If you are going to report bugs in .exe version of bCNC, please check first if that bug occurs even when running directly in python (without .exe build).

IMPORTANT! Motion controller (grblHAL) settings

  • We strongly recommend you to use 32b microcontroller with grblHAL firmware for the new machine builds. https://github.com/grblHAL (Original GRBL firmware is still supported, but it is currently reaching the end-of-life due to limitations of 8b microcontrollers)
  • GRBL should be configured to use MPos rather than Wpos. This means that $10= should be set to odd number. As of GRBL 1.1 we recommend setting $10=3. If you have troubles communicating with your machine, you can try to set failsafe value $10=1.
  • CADs, bCNC and GRBL all work in millimeters by default. Make sure that $13=0 is set in GRBL, if you experience strange behavior. (unless you've configured your CAD and bCNC to use inches)
  • Before filing bug please make sure you use latest stable official release of GRBL. Older and unofficial releases might work, but we frequently see cases where they don't. So please upgrade firmware in your Arduinos to reasonably recent version if you can.
  • Also read about all possible GRBL settings and make sure your setup is correct: https://github.com/gnea/grbl/wiki/Grbl-v1.1-Configuration
  • GrblHAL also has "Compatibility level" settings which have to be correctly configured during firmware compilation: https://github.com/grblHAL/core/wiki/Compatibility-level

Configuration

You can modify most of the parameters from the "CAM -> Config/Controller" page. You can also enable (up to) 6-axis mode in Config section, but bCNC restart is required for changes to take place. Only the changes/differences from the default configuration file will be saved in your home directory ${HOME}/.bCNC or ~/.bCNC

The default configuration is stored on bCNC.ini in the installation directory.

PLEASE DO NOT CHANGE THIS FILE, IT'S GOING TO BE OVERWRITTEN ON EACH UPGRADE OF BCNC

Features:

  • simple and intuitive interface for small screens
  • 3-axis and 6-axis GUI modes
  • import/export g-code, dxf and svg files
  • 3D mesh slicing stl and ply files
  • fast g-code sender (works nicely on RPi and old hardware)
  • workspace configuration (G54..G59 commands)
  • user configurable buttons
  • g-code function evaluation with run time expansion
  • feed override during the running for fine tuning
  • Easy probing:
    • simple probing
    • center finder with a probing ring
    • auto leveling, Z-probing and auto leveling by altering the g-code during sending (or permanently autoleveling the g-code file).
    • height color map display
    • create g-code by jogging and recording points (can even use camera for this)
    • manual tool change expansion and automatic tool length probing
    • canned cycles expansion
  • Various Tools:
    • user configurable database of materials, endmills, stock
    • properties database of materials, stock, end mills etc..
    • basic CAM features (profiling, pocketing, drilling, flat/helical/ramp cutting, thread milling, cutout tabs, drag knife)
    • User g-code plugins:
      • bowl generator
      • finger joint box generator
      • simple spur gear generator
      • spirograph generator
      • surface flatten
      • play melody from MIDI file using stepper motor frequency
      • ...
  • G-Code editor and display
    • graphical display of the g-code, and workspace
    • graphically moving and editing g-code
    • reordering code and rapid motion optimization
    • moving, rotating, mirroring the g-code
  • Web pendant to be used via smart phones

Debugging

You can log serial communication by changing the port to something like:

spy:///dev/ttyUSB0?file=serial_log.txt&raw
spy://COM1?file=serial_log.txt&raw

If a file isn't specified, the log is written to stderr. The 'raw' option outputs the data directly, instead of creating a hex dump. Further documentation is available at: https://pyserial.readthedocs.io/en/latest/url_handlers.html#spy

Disclaimer

The software is made available "AS IS". It seems quite stable, but it is in an early stage of development. Hence there should be plenty of bugs not yet spotted. Please use/try it with care, I don't want to be liable if it causes any damage :)

bcnc's People

Contributors

apshu avatar bgbsww avatar bosd avatar buschhardtt avatar carlosgs avatar coddingtonbear avatar dguerizec avatar dshaded avatar dwrobel avatar engineer2designer avatar gagath avatar gcobos avatar georgwei avatar git-bruno avatar harvie avatar homineludens avatar jarretluft avatar jeffmd avatar lepeshkinsn avatar littlepierre avatar mandrav avatar mariobasz avatar onekk avatar pci06 avatar sfinexer avatar stevemoto avatar tatarize avatar thierrym avatar tsmarks avatar vlachoudis 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

bcnc's Issues

bCNC on Windows. Revert back to absolute mode after jogging.

A couple of ShapeOko users have noticed a some bugs:

For getting bCNC to run on Windows, they had some problems with a rexx library requirement. Here's a solution a user came up with that involves modifying the .bat file.

All you need is to add ./lib to your PYTHONPATH. Make a bCNC.bat with this contents:
CODE: SELECT ALL
@echo off
set DIR=%~dp0
set PYTHONPATH=%DIR%lib;%PYTHONPATH%
start python "%DIR%bCNC.py"
and run that instead of bCNC.py. It works with Python 2.7.4.

Next is reverting the G90/91 mode back to what it was before jogging was implemented. Often I see GUIs just send two commands to Grbl when jogging. First the typical, G91 X0.01 to move incrementally, followed immediately by a G90 to switch it back to absolute mode.

missing CNCTools

I think you forgot to include the module CNCTools in the latest commit.

Thanks.

Build number in about box

@vlachoudis I know that you are fixing so many bugs and updating the code all the time, it might be time to add a build number or build date to the about box. Or at least a text file in the bCNC folder with the build date and number. I am having a hard time knowing if I have the latest build.

What I am doing now is running a script that deletes my bCNC folder and then downloads the latest from Github.

Bruce
PS with all the changes, it might be time for a major revision number as well. I am sure you are now at version .4!

Add a separate scale for the z axis in the control interface.

Thank you for your work, I've been using it with my new eShapeoko with GRBL, and i have it running on an A20 Olinuxino Micro running debian wheezy (the stock image from Olimex plus some improvement).
I've done much mess and broken some bits, as I hit the Z axis control having the step set for a 100 mm travel, so i wonder if it is possible to have a separate scale for the z jog having only the 10,5,1,0.5,0.1,0.05,0.01 so a user can set the Z travel more in sync with the effective travel of the Z axis.

Many Thanks

Carlo

Multiple files separated by toolchange

If bCNC is thinking about implementing a tool change "feature", I would like to add a "Merge" g-code file option to the "File" menu. Yes, I have ulterior motives for this command, but it would allow two or more different files for different tools to be in bCNC at the same time. Once a tool change command is encountered, then bCNC could go off and do whatever little pseudo tool change routine it implements.

Thanks,
Bruce

Focus keeps going to G56 button

I've got bCNC v0.3 on my windows 7 laptop. Sometimes the WCS buttons work fine, but right now I keep clicking on G55 and the focus just jumps back to G56. This was right after I used the touch probe with this command:
G54 G20 G38.2 Z-2 F0.118
Then I jugged the z-axis up. After the jog, the WCS button worked normally

Stop Run problem with streaming

It had already happen to me time ago but I left because suspecting it was something wrong with my gcode.
But now I've found how to reproduce it.
If you run a program and then stop it, and then push run again after some time the streaming stops. The second time the program run I've noticed the orange buffer bar is smaller then the first time. So I suspect it's a problem of flushing the characters counter in the streaming routine.

zero out coordinates?

One other question. In most gcode senders there is a way to zero out an axis. For example, I routinely have to find a corner of my workpiece and make that my 0,0,0 point. I usually do this by going to the corner and hitting a "zero" button which sets the current coordinates to zero (I think using G92). I've looked through the GUI and don't see anything like this. Do you have to manually go to the WCS page and type in what you want and hit set?

Failing to run -- divide by zero error

I am sure I am doing something wrong but when I try to start bCNC, I am getting this error:

pi@raspberrypi ~/Downloads/bCNC-master $ ./bCNC
Traceback (most recent call last):
File "./bCNC.py", line 3540, in
application = Application(tk)
File "./bCNC.py", line 794, in init
self.probeChange()
File "./bCNC.py", line 3080, in probeChange
self.probeXstep["text"] = "%.5g"%(probe.xstep())
File "/home/pi/Downloads/bCNC-master/CNC.py", line 143, in xstep
self._xstep = (self.xmax-self.xmin)/float(self.xn-1)
ZeroDivisionError: float division by zero
[1]+ Killed ./bCNC
pi@raspberrypi ~/Downloads/bCNC-master $

Any ideas? It use to run and the only thing that I can think of, is I updated opengl to try to get Universal G-Code Sender to show the visualizer...

Bruce

import queue error

Another question, where could I download queue?
Traceback (most recent call last):
File "./bCNC.py", line 33, in
from queue import *
ImportError: No module named queue

G-code error handling

@vlachoudis : I have been thinking about the g-code error issue. I think the best way to handle an error is to prompt the user what to do when it encounters one.

For example, a pop-up window that reports the offending g-code line and queries the user to either continue and ignore it or cancel the job.

In the case for tool changes, this window could be used as a way to also query and control for GUI tool changes. Say if there is an M6 command in that line, the pop-up window could add a new button that would execute a tool change macro, which could be as simple as just moving the z-axis up or as complex as moving to a touch off plate and parking area to do the tool change.

I will make edits to the Grbl interfacing wiki to make this a standard protocol.

Macro Reserved Words for bCNC

@vlachoudis I am proposing these as reserved works for a macro language. The first is the RESERVE word, while the rest is the description and where that value is derived/found. I tried to keep the words to 4 or 5 letters long. I also tried to use the same language as the GRBL wiki. So, if you see Active Mode, that is what the grbl wiki calls the response mode to a $G command. I am sure there are a lot of things I missed, so I am open to suggestions and renames--if it makes sense. Note, these would only return values in the Macro language.

Xcur ;Current X position in current work plane -Defined by ? command
Ycur ;Current Y position in current work plane -Defined by ? command
Zcur ;Current Z position in current work plane -Defined by ? command
Xmax ;Design/G-code Maximum X value -Calculated by bCNC
Ymax ;Design/G-code Maximum Y value -Calculated by bCNC
Zmax ;Design/G-code Maximum Z value -Calculated by bCNC
Xmin ;Design/G-code Minimum X value -Calculated by bCNC
Ymin ;Design/G-code Minimum Y value -Calculated by bCNC
Zmin ;Design/G-code Minimum Z value -Calculated by bCNC
Zsafe ;Z heigh that is predefined in Tools -> Stock -> Safe Z
WC54X ;Work Coordinate G54 X value -Defined by $#
WC54Y ;Work Coordinate G54 Y value -Defined by $#
WC54Z ;Work Coordinate G54 Z value -Defined by $#
WC55X ;Work Coordinate G55 X value -Defined by $#
WC55Y ;Work Coordinate G55 Y value -Defined by $#
WC55Z ;Work Coordinate G55 Z value -Defined by $#
WC56X ;Work Coordinate G56 X value -Defined by $#
WC56Y ;Work Coordinate G56 Y value -Defined by $#
WC56Z ;Work Coordinate G56 Z value -Defined by $#
WC57X ;Work Coordinate G57 X value -Defined by $#
WC57Y ;Work Coordinate G57 Y value -Defined by $#
WC57Z ;Work Coordinate G57 Z value -Defined by $#
WC58X ;Work Coordinate G58 X value -Defined by $#
WC58Y ;Work Coordinate G58 Y value -Defined by $#
WC58Z ;Work Coordinate G58 Z value -Defined by $#
WC59X ;Work Coordinate G59 X value -Defined by $#
WC59Y ;Work Coordinate G59 Y value -Defined by $#
WC59Z ;Work Coordinate G59 Z value -Defined by $#
WC92X ;Temp Work Coordinate G92 X value -Defined by $#
WC92Y ;Temp Work Coordinate G92 Y value -Defined by $#
WC92Z ;Temp Work Coordinate G92 Z value -Defined by $#
ML28X ;Machine Location G28 X value -Defined by $#
ML28Y ;Machine Location G28 Y value -Defined by $#
ML28Z ;Machine Location G28 Z value -Defined by $#
ML30X ;Machine Location G30 X value -Defined by $#
ML30Y ;Machine Location G30 Y value -Defined by $#
ML30Z ;Machine Location G03 Z value -Defined by $#
TLOX ;Tool Length Offset X value -Defined by $#
TLOY ;Tool Length Offset Y value -Defined by $#
TLOZ ;Tool Length Offset Z value -Defined by $#
PRBX ;Probe X value -Defined by $#
PRBY ;Probe Y value -Defined by $#
PRBZ ;Probe Z value -Defined by $#
PRBS ;Probe Success state -Defined by $#
AMCG ;Active Mode Current/Modal G-code -Defined by $G
AMWP ;Active Mode Work Plane -Defined by $G
AMWC ;Active Mode Work Coodinates -Defined by $G
AMMI ;Active Mode Metric/Inch -Defined by $G
AMAR ;Active Mode Absolute/Relative -Defined by $G
AMFM ;Active Mode Feed Rate Mode -Defined by $G
AMPM ;Active Mode Program Mode -Defined by $G
AMSS ;Active Mode Spindle State -Defined by $G
AMTL ;Active Mode Tool Number -Defined by $G
AMFR ;Active Mode Feed Rate -Defined by $G
AMCS ;Active Mode Coolant State -Defined by $G

Module rexx not found

Hi,
I tried to lunch bCNC.py on Windows 7. But I got the message rexx module not found,
How can I add this module to the library.
Thank's

GCode Error on circular move (G2)

I get an error when bCNC gets to this line:
G2X3.0898Y3.1724Z0.1176I-0.0891J-0.0785

bCNC error is: Invalid gcode ID:33

This gcode works fine on Chilipeppr. My gshield is running GRBL v0.9g

Here's a link to the whole gcode file: http://pastebin.com/t44yqYg8
gcode was generated by Fusion 360

RPi possible?

First off, great job on this GUI. It's extremely feature-rich.

I don't know what the requirements for bCNC is, but is it possible to get this to run on an RPi or BeagleBone Black? I've been looking for CNC controller solutions that will run on these and will try to do whatever I can help out to make this possible.

Windows port auto-detection.

@vlachoudis : ShapeOko users have been trying out bCNC and most are using older Windows-based laptops to run it. For the most part, everything works pretty instantaneous once they install Python 2.7 and pyserial.

But the main issue is that they are having a lot of trouble connecting or figuring out what to do to connect to Grbl. The port detection defaults seem to only work for *nix system, as it works on my Mac and RPi Linux dist without a problem.

Here's what they are currently doing to fix the issue.

The default port name is not very helpful on Windows. Ports are named COM1 etc, not /dev/ttyACM0 etc. There's a method to enumerate them, but it seems bCNC is not using it. Just type COM5 (in your case) in the box to the left of the green Open button.

Probe readings

Hi, I'm encountering some problems probing a non flat surface. From console I can see corret feedback from grbl but in the Gui all points are sets to zero.
I've try to manually edit points in .probe file and everything works as expected. The gcode file is interpoleted.
Looking at the code I can't find where the probe response from grbl is parsed, maybe some internationalization issue? I'm using win 7 English but Italian location. Python 2.7.
Best regards

run ./bCNC on ubuntu got error

Traceback (most recent call last):
File "./bCNC.py", line 2864, in
application = Application(tk)
File "./bCNC.py", line 429, in init
image=icons["spinningtop"],
KeyError: 'spinningtop'

Pendant requests.

@vlachoudis : New issues thread on the web server pendant. I have to say I keep uncovering amazing features that you have every time I use bCNC. This pendant approach is an amazing solution. It has made my day. This coupled with an RPi installation could make Grbl and personal CNCing so much more accessible.

A couple of comments/requests on this:

  • The homing, unlock, and reset buttons are bit close to other buttons that would be used during a job. I haven't checked what happens to the pendant when I job is run, but I think this could easily lead to accidental button pushes. The solution could be as simple as moving that row of buttons above the status and position table.
  • Could you add an MDI command line somewhere such that custom individual commands can be sent from the pendant? For example, after homing, I send a G28 command to quickly move the spindle to the center of the work volume.

Already running. Please stop before

Hi,
If accidently hit the run button without any Gcode loaded and then try to load a Gcode file, it's not possible to run anything, even hitting the stop button. You can't neither exist the program properly.

To reproduce:
Open bCNC
Open connection to Grbl
Unlock
Click Run
Click Stop
Load Gcode
Click Run
Messagebox Already running should appear

I'm using Grbl 0.9i

Changing the view projection is not centered neither fitted

Ideally changing the view should keep the same margin, and so allow to see the same part from another point of view. This not work especially changing from top o side view to ISO one.

Also if you select a part and then fit to screen the part is fitted, but if you deselect all (hitting ESC) and then try to fit again, it doesn't work. You need to Zoom out and then you can fit to screen.

Feed under 1 not reported correcty

If feed is under 1, State Feed label report "0."
Also in case of round Feed values (as 100 for example) the label show an unsightly dot after the value (ex: 100. )

Greetings

When a file is changed during the operation bCNC raise a reload dialog that fails everytime.

Scenario, I have loaded a Gcode file.
I open the Gcode file in an external editor to change it (for example for a recursive substitution say to substitude a z-0.05 with Z-0.07 for every Z-0.05) bCNC raise a dialog "do you want to relad the modified file" i select Yes and the it raise a dialog "Gcode changed do you wnat to save it" i answer no as i want to use the file on disk.

As result the file is not loaded in memory and i have to load it with open file dialog.

Many Thanks and Best regards

Carlo D.

Don't show probe grid until necessary

I believe it's not necessary to show the yellow probe grid until probe data is setted o a probe cycle is started.
It only add more lines to main canvas.

Single Probe Error

Last one :) When I click on the "Probe" button to run a probe at a single point, the program returns a GCode error "Invalid GCode". I see in the terminal that the code that is sent is "G38.2 F100" (assuming I've set the feed at 100). I can manually send the command "G38.2 Z-1 F100" and it works fine so I guess you just need to add a maximum Z depth for the probe command into the program, so the button sends that.

MDI clarification

Here's a simple request.

Add MDI, called Manual Data Input in CNC circles, in front of the command line at the bottom of the GUI window. This will help clarify its use and help users notice it.

Traverse around bounding box option

@vlachoudis I got another feature request. This one is quite basic but when you are doing many jobs and trying to use up scrap material, it is an excellent feature.

Basically, the machine moves around in a rectangle to all four extreme points. The Z-axis never moves (except to a safe Z height) and it is done with rapid moves. Symantically, it is:

G90
G0 Zsafe
G0 Xmax, Ymin
G0 Xmax, Ymax
G0 Xmin, Ymax
G0 Xmin, Ymin

Since this moves around the part, you will know if your clamps will hit or anything else. Nice to know before you toolbit is turning.

I use to use this in one of my old DOS controllers and I used it all the time and always ran it before I hit the "RUN" button just to make sure nothing was in the way...it is crazy how flat surfaces can accumulate tools and material...

Thanks,
Bruce

How to get startup mode in inches (G20)

I don't know if this is a grbl issue or bCNC When i first start things up, the units mode is metric (M21), how do I get default to be inches (M20)?

In GRBL I have
$13=1 (report inches, bool)
$N0=G90 G20 G54 G17

In bCNC.ini CNC section units = 0, but in the GUI, units is inches:
bcnc units screenshot

Here's my terminal window after startup. I unlocked ($X), then Reset.
Grbl 0.9i ['$' for help]
['$H'|'$X' to unlock]
$x
[Caution: Unlocked]
ok
[G0 G54 G17 G21 G90 G94 M0 M5 M9 T0 F0.0 S0.0]
ok
Grbl 0.9i ['$' for help]
G90G20G54G17ok

Move to 0,0,0

Now the "move to origin" button call this line of gcode:
"G90G0X0Y0Z0\n"
Grbl move in a straight line towards the origin, often this can lead to collision with material worked.
It would be useful to move Z to a safe travel height, than move X and Y to 0,0 and only than move down Z to 0.
Z safe could be saved in user settings file together with [CNC] other data.

Clear error in status bar

Is there a way to clear the status bar? It seems once I get an error, it stays there, even if the error isn't relevant anymore and I'm going other things.

Problems Sending Gcode after probe

Thanks for putting out this program!

I have had two issues which are seemingly unrelated but maybe not.

First was while setting up the program. Twice I ran into an error that was something like:
"bad event type or keysym "KP_delete"
Once this pointed me to CNCList.py line 35, and once it pointed me to bCNC.py line 884. Both times I was able to get past the problem by commenting out the relevant line. This happened to me on both a Windows 7 and a Windows 8 machine, with both Python 2.7 and 3.4.

Once I commented out those lines the program seemed to work fine. I have been able to load Gcode, mirror the geometry, send manual commands, and run the probe scan. However, after running the scan and zeroing one of the points of the matrix I was unable to run the Gcode program.
In the bCNC window, on the status bar, I get an "error: not idle" message
In the bCNC terminal, it looks like it has sent G90 from the Gcode, gotten an ok response, then stopped
In the command prompt, I get the following message:
File "c:\Python27\Lib\lib-tk\Tkinter.py", line 1532, in call return self.func(*args)
File "c:\Program Files (x86)\bCNC\bCNC.py", line 2959, in run lines,paths = self.gcode.prepare2Run()
File "c:\Program Files (x86)\bCNC\CNC.py", line 1725, in prepare2Run if self.gcode in (1,2,3):
AttributeError: GCode instance has no attribute 'gcode'

Looks like a great program if I can just get past this. Any help or pointers are greatly appreciated.

Bad path?

Hi!

This project looks really cool and I want to try it out.
Been looking at this this a bit trying to get it to work. Now, please bear with me, I'm not a Python user.

I have installed the prerequsits, but when I try to start bCNC.py i get a command window telling me that rexx is missing(Had to record the error and play it back slowly to see the error message, if there's another way please share, im a total newb).

Copying all the lib to root lets me start the program, Wich looks awesome, btw =) But i couldent connect to the arduino.

/Peter

Metric/Imperial bugs

After using the program for a few days, I have found a couple of issues that are metric "correct" but not if you are using imperial measurements.

First off, the tool path follower lights up correctly, but the tool animation does not (it only moves the metric amount) instead of the imperial amount.

Second, the probe feature, while it does convert the imperial measurements to metric, will not nativly accept imperial measurements.

The probe grid and the material grid are only in metric and while I can get the probe grid to resize, I have not been able to change the settings for the material grid.

Also, the WorkArea is always negative and about 10 times larger than the Material grid. Is this by design and/or is there a way of changing the WorkArea to represent the Machine Tool work area?

I don't know if this is GRBL or bCNC, but it ignores an M30 as a program end. GRBL says it is supported but Universal G-Code sender and bCNC are ignoring this command as a program end.

Lastly, I guess this is confusion on my part, but what is the difference between the program "Pause" and "Stop"? "Pause" seems to stop the program instantly but will resume when "Pause" is pressed again. "Stop" seems to no stop but just quit sending G-Code. Which would be ok, except that usually the buffer still contains about 15 moves. If you press "Pause" to stop the machine in case of a minor emergency (work piece came out of the vice, tool breaks, tool about to hit the vice, ect.), if you then press "Stop" the stop command is ignored. If you just press "Stop" the machine seems to continue on its merry way until the buffered commands are executed... So far, the only solution is to press the soft reset, but this is not ideal as it loses the G92 offsets...

Am I doing this wrong, or is there another way to implement an emergency stop that stops the machine, clears the buffer, and preserves the G92 offsets?

Thanks and even though I am finding bugs, I am REALLY digging your program. I am running it wirelessly on a RaspberryPi from a browser window and it allows me to run my machine without tying up my design computer.

Please keep up the good work!!!

Bruce

PS I am thinking about making a script that takes a virgin RaspberryPi install and adds all the parts to make it work headless with bCNC. Linux is not my specialty but I figured I know enough to make a simple script for people who do not know Linux but want a cheap headless CNC controller that is accessible from any browser window.

Report: It works on an Olimex Olinuxino-A20-Micro board

Only to report that bCNC is working great on a Olinuxino-A20-Micro board, It is a little board running a Slightly modified version of debian linux and the new debian Jessie support it natively, but i'm running the Olimex version based on Wheezy.

Thanks for your great job.

Regards

Carlo D.

Mouse position display in inches

When I move the mouse around in the visualizer bCNC displays the mouse position at the bottom of the screen, but it's in mm. I think if I'm using inches, the mouse position should be inches also.

Streaming file is not working

Hi,

first, nice pice GUI for grbl, I hope to use it soon to replace UCS.

When loading a gcode file, it's displayed properly but clicking on RUN only disables some controls and otherwise no progress is apparently happening.

Using OS X 10.10 with grbl 0.9g and master branch.

UPDATE:
When pressing RUN in GUI, following is printed to terminal:
Exception in Tkinter callback
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1470, in call
return self.func(*args)
File "/Users/sascha/Downloads/bCNC-master/bCNC.py", line 2450, in run
self.initRun()
File "/Users/sascha/Downloads/bCNC-master/bCNC.py", line 2436, in initRun
self.disable()
File "/Users/sascha/Downloads/bCNC-master/bCNC.py", line 1433, in disable
self.configWidgets("state",DISABLED)
File "/Users/sascha/Downloads/bCNC-master/bCNC.py", line 1422, in configWidgets
w[0].entryconfig(w[1], state=value)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 2729, in entryconfigure
return self._configure(('entryconfigure', index), cnf, kw)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1253, in _configure
self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
TclError: unknown option "-state"

M2 vs M5/M30

@vlachoudis Got another question/problem. I went ahead and modified my post processor in Aspire to process G-code for grbl .9i. All is good and well except that I deleted the footer from
"M30" to
"M5"
"M2"

(M30 is program end and rewind --I guess back when they used to use punch tape, it would rewind the machine)
(M5 is spindle stop)
(M2 is program end)

So, with the new M5, M2, bCNC will hang on M5 and never release control back to the MDI/user unless to press 'Reset'. I also tested this behavior with Universal G-Code Sender and it too does the same thing.

Now, if I remove the M2 from my post processor, as soon as it executes the M5 command, bCNC pops up a dialog and says "program executed in XXXX seconds..."

So, I don't know if this is a bug/flaw in grbl's M2/M30 implementation or if there is really something that bCNC and Universal G-Code sender want back from grbl after executing the M2/M30 command and are not getting it. I am not sure.

Bruce

Some parameters missing in config files

If units = 0 (mm) in config file, the parameter is erased at exit fo bCNC. This happen in latest V0.4 relase but I can remember it was saved correctly in old versions.

Also I belive that some parameters could be read (and then saved) from grbl. I refer to feed_max,acceleration and travel that are reported in $110..112 $120..122 and $130..132

configurable pendant port?

I'm new to bCNC... looks very interesting. Is there a way to configure the port that the pendant web server is listening on? I'm running on a raspberryPi 2 and I already have a web server on 8080.

Tool Tip not saved

I customized one of the user buttons, but it's not saving the tool tip info. i'm using bCNC v 0.4.5

Modify file externaly

I can remember that at a certain point modify the file externally popup a message in bCNC asking if you want to reload the file. I've thought it was a nice feature the only thing missing was fit2screen.
But with last versions is not working anymore and the main canvas goes void, you need to manually fit2screen. I'm testing offline not sure if it also happen with connection open.
Of sure should be avoided while streaming is running.

Visualizer path color doesn't reset when job starts

I clicked on Control > Check gcode then went on to do other stuff. Then I clicked Run expecting my Shapeoko to start milling, but bCNC was doing the gcode check instead. It took me a minute to figure out what was going on. In the Control menu drop down, if Check gcode is enabled you should have a checkmark next to it. After it checked my gcode all the paths on the viewer were green. Next I clicked Check gcode again hoping this would turn it off (which it did), then I clicked Run and the shapeoko started, but all the paths in the viewer stayed green. I think the color of the paths should reset when you click on run.

Probing question

@vlachoudis With the latest update to fix the probing response from grbl, I finally got my probe to work. So, I set up a small area to probe and the probe went off and did its thing and I ended up with a nice little file with like 25 probe coordinates.

So far, so good. Now, I have no idea how to make a surface compensated G-code file from bCNC.

bcnc_probe

There is no button on the WCS tab. All I have is 'Clear', 'Get Margins', 'Set Zero', 'Draw' and 'Scan'. When I go to the pull down menu File --> Probe , all I have is 'Open', 'Save', and 'Save as'. I have tried the save and save as, and all I am getting is the probe data points saved again.

So, shouldn't there be some kind of 'Process' button on the WCS tab? Or is there one and mine is missing?

Bruce

How to config WorkArea

How does the WorkArea view work? When I bring in a file it looks like this:
bcnc worarea screenshot
I've got GRBL setup so when it homes, it sets x y and z to zero, not negative numbers like the default.

I posted the gcode I used in the above screenshot here: http://pastebin.com/X1P66uwV

Keyboard Zoom not Working in Windows

So the zoom doesn't work with the keys that show in the menu (=, -). It does work when I click on "Zoom In" or "Zoom Out" in the menu, so this isn't a big deal. May be another issue with the tkinter windows library?

Terminal activity while idle

My Shapeoko is idle, but in the terminal tab every few seconds I see this:
[G0 G56 G17 G20 G90 G94 M0 M5 M9 T0 F0.1 S0.0]
ok

I'm using bCNC 0.4.5 and the latest version of grbl - just downloaded from github today. I'm not sure which version.

Pendant Server Address/Port

In my opinion after the pendant server is started, the Address and Port should be permanately displayed somewhere in the GUI. Even a line in the terminal window would cut it. (no pun intended!)

Also (and more importantly) the address for the pendant server should never be "localhost" (unless there is no internet. For example I need to know what IP the school WiFi has assigned me, so I can connect. Localhost does not help much.

Pause button requires one initial click.

I've noticed in both the pendant and the main GUI that the 'Pause' button requires one initial click before operating correctly. For example, you just startup bCNC and load and run a program. If you press 'Pause' once and for the first time, it doesn't do anything. The second time and after the job will pause and resume.

It looks like the initial condition for the Pause button isn't set to send a feed hold, but rather a cycle start. Should the pause button only pause (send a feed hold) and not perform two tasks? Could the 'Run' button be use to resume the job instead?

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.