GithubHelp home page GithubHelp logo

sir-buckyball / chrome-gcode-sender Goto Github PK

View Code? Open in Web Editor NEW
61.0 10.0 24.0 1.4 MB

A gcode-sender application for Chrome/ChromeOS.

License: MIT License

Shell 0.21% JavaScript 84.64% Arduino 0.66% CSS 3.90% HTML 10.60%

chrome-gcode-sender's Introduction

chrome-gcode-sender

What is this madness?

gcode-sender is a chrome application capable of sending gcode commands to a USB gcode intrepreter (hobby CNC machines / 3D printers).

Why did you do it?

I feel that Chrome OS machines have qualities which make them ideal in the machine shop. They are always up to date, secure, have only your cloud-stored files/applications available, relatively cheap, and easily swappable should something bad happen...

The common place alternative is an out of date Windows machine which is usually disconnected from the network, only has local accounts, and is running unknown (potentially malicious) software. Files are typically transferred by flash-drive-sneaker-net.

How do I install it?

The easiest way to install this extension is to download it from the Chrome Web Store (https://chrome.google.com/webstore/detail/gcode-sender/ngncibnakmabjlfpadjagnbdjbhoelom).

If you want to develop for it, you can load the 'src' directory as an unpacked extension. By going to chrome://extensions/, ensure 'developer mode' is checked and you should see a button to load it from your local file system.

Are there cool keyboard commands?

The control panel has the following:

'←', 'j' - jog X axis -N
'→', 'l' - jog X axis +N
'↓', 'k' - jog Y axit -N
'↑', 'i' - jog Y axis +N
'z' - jog Z axis -N
'a' - jog Z axis +N
'+' - increment jump size by 10x
'-' - decrement jump size by 10x
'3' - spindle clockwise
'4' - spindle counter-clockwise
'5' - spindle off
'/' - focus command input
'esc' - blur command input

What libraries did you use?

Are there any known issues?

Yes. This project uses the github issue tracker.

  • UI doesn't always let the user know of an issue (check the chrome developer console)
  • Sometimes chrome.serial doesn't obey the settings you ask for
    • try using 9600 baud
    • check the logs to see if it is forcing flow-control (happens on old Macs)

chrome-gcode-sender's People

Contributors

sir-buckyball 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chrome-gcode-sender's Issues

machine status section

Add a machine status section to the control panel. It should display the machine and workspace coordinates.

J0 is crytical!!

copied from a bug report on the chrome web store:

I try a bug! For: G0 X0 Y100 G3 X200 Y100 I100 J0 write a line if change J0 to J1 write a arc circle upper And if change J0 to J-1 write a arc circle lower J0 is crytical!! but is good program! apreciated! thank you!

Make the scrollback history configurable

There is a hardcoded scrollback limit of 200. Make this configurable. When sending files with errors, too many lines can scroll by before you have a chance to jump in.

Smoothieboard doesn't work?

report from Chrome Web Store:
Hi! I have smoothieboard running a cnc mill. Your software is great, but the only problem i have is that when i have sen't the code the mill will stop after a few lines and i have to manually press "Stop waiting for OK". Is there a way around this? I don't know if it's your app or the smoothieboard but the gcode is running ok on repetier for example.

Application version: 2014.10.17.0
Client version: 5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.65 Safari/537.36

Combining $ commands

I have a gcode file that starts with two Grbl settings:

$30=1000
$32=1
...

The chrome-gcode-sender console shows these as being sent on the same line, which causes Grbl1.1 to return an error 3:

Grbl 1.1f ['$' for help]
> $30=1000 $32=1
error:3

I thought at first this would be an issue with unix line endings, but after rewriting the gcode file with CR/LF line endings the problem remains - the console still shows the setting commands on the same line.

If I remove one or both $ commands, it works. I think chrome-gcode-sender is combining commands, and in this case of Grbl settings commands, doing it incorrectly.

Possible fix: In gcode_util.js line 105, add a check for settings commands:

if (c == 'G' || c == 'M' || c == '$') {

Connecting MacBook Pro 2010 to X-Carve

I am getting an error when trying to connect:
Chrome did not use requested serial connection option. [ctsFlowControl; expected:false, actual:true]

Any advice on how to set ctsFlowControl to false?

Thanks,
Rick (noob)

Display an estimated time to completion

Lookahead makes realtime estimates harder, but we can use dwell operations as sync points (eg., calculate the remaining time at each dwell, and update when it is consumed).

implement command history

Implement a command history so that a user can use the arrow keys to select previously entered commands (like in bash)

add support for inches

Would be good if support for inches could be added. I am thinking that the same controls can be used and simple code update can be made. stepSize >= 1 can use same logic as mm giving user ability to step in 1 in, 10in increments. For stepSize < 0, the getStepSize method can be Math.pow(2, $scope.stepSize). This would give very convenient increments in nominal woodworking units 1/4, 1/8, 1/16, 1/32, etc...

I have branched master to develop this. More than happy to finish and submit if you are willing to accept.

Warn about ignored connection parameters

There should be a user-visible warning to the user when chrome ignores important parameters, specifically bitrate and ctsFlowControl.

connecting to '/dev/tty.usbmodem3d11' with options: {"bitrate":115200,"ctsFlowControl":false,"dataBits":"eight","parityBit":"no","sendTimeout":5000,"stopBits":"one"} main.js:596
serial connection obtained:
{"bitrate":9600,"bufferSize":4096,"connectionId":2,"ctsFlowControl":true,"dataBits":"eight","name":"","parityBit":"no","paused":false,"persistent":false,"receiveTimeout":0,"sendTimeout":5000,"stopBits":"one"}

Display newlines from connected machine

Newlines from a connected machine should be displayed.

Specific example: sending '$' to a grbl board returns:

$$ (view Grbl settings)
$# (view # parameters)
$G (view parser state)
$N (view startup blocks)
$x=value (save Grbl setting)
$Nx=line (save startup block)
$C (check gcode mode)
$X (kill alarm lock)
$H (run homing cycle)
~ (cycle start)
! (feed hold)
? (current status)
ctrl-x (reset Grbl)
ok
ok

Can't select text from the console

Chrome suppresses text selection from the DOM in applications. Make it possible to select text from the console portion of the control panel

Add a warning if rapid Z motions are used.

Some machines (like the shapeoko2) should avoid rapid z motions (G0Z...) because they can miss steps/position when moving so fast on a screw axis. There should be an optional warning that could be enabled for such machines.

NOTE: I encountered this issue using kiri:moto exports from an OnShape model. There were multiple rapid moves in a row. I'm not positive if my GRBL0.8 machine was combining the rapid motions or just losing a bunch of steps in the Z axis (either way ended poorly).

Remote control

I am looking to use your software on a Chromebit device (https://www.asus.com/us/Chrome-Devices/Chromebit-CS10/). I think it would be great if you could place the software in a remote mode, where a host computer could remotely control the app. This would allow me to control the cnc from my development machine and send the file without that machine actually controlling the cnc itself. It would naturally keep my development machine clean and dust free.

One idea about how it could work is to enable the device attached to the CNC in remote mode. This would open a server socket. A second computer, using the same software, could then connect to it, possibly using a simple discovery protocol. Once connected the CNC host device would disable local controls and the remote client would have the same user interface available. All the commands would be passed over a network, including the file to route. It would also provide the added bonus of monitoring from remotely. I could see a webcam feed in the future.

All this without additional cabling to control the cnc. The system would run autonomous so it would not require the client to remain connected once the file is downloaded and started.

I am very happy to do the work to add this feature. I just wanted to see if it aligns with your vision of where this software could go.

Looking for a successful x-carve run under windows 8

I have a x-carve by inventables and windows 8, I added gcode-sender to chrome. When I send the gcode, the first line, G20, is displayed in the console then I get a Alarm Lock and stops. I was able to get the Grbl version, 0.9j . I also toggled the connect/disconnect to see what would happen. It displayed $\x2=y .

Any help would be great!

display less ok's

Initial attempts to reduce the amount of display space for 'ok' was thwarted by grbl boards which seem to send 'ok\nok\n' for some reason.

E-Stop button should reset the serial connection.

grbl seems to have not implemented M114 (emergency stop). It does however appear to reset when the serial connection is initialized (¿SIGHUP?). The estop button should try to do it's job by twiddling that as well.

Jog Function

Thanks for a cool app. I'm using it to test my Elekslaser A3X.

The jog buttons don't do what I expect, but this may be a bug in my expectations. I expect it to move the step size in the given direction each time I click the control, but instead it only does it once - it goes to that location and stops.

Would it be more useful if it moved to the location and then reset it's origin? This would make the jog buttons usable to set the home location before running a file.

Implement rendering support for G09, G61, G64

G09, G61, G64 are commands for configuring exact stop (eg., bring the tool movement to a stop before proceeding). These commands do not affect rendering and should not be logged as unknown.

print jerk

Great work!
I have a question. I notice that the printing process is not smooth. It often jerk, it looks like the browser is to slow to send the commands to the printer. The problem occurs only on small edge. Do you have any idea about the source of this problem? Of course this is not happening using other application.

macro section on control panel

Give users a way to run macros.

proposal:

  • macros are really just gcode files on the filesystem
  • section on control panel maps buttons to file execution

The 'load file' tab is slow

A rough measurement showed that the onClick event to load the tab took 1.43 seconds and included 14 GC Events!

Can't seem to talk to stecraft 2

First of all, thank you for such a great idea. I wanted to develop a web interface for my CnC and this is the perfect starting point.

I seem to run into an issue, though. My CnC uses a UC100 controller to interface USB to LPT1 port. On Windows and OSX gcode-sender doesn't see said port.

Does it need ti be a TTY device for gcode-sender to work?

TIA,

Better way of "Zeroing"

Question: What do you think about having a button to "zero" the position of the tool?

Situation: I boot the tool up, put my material down. I then, need to move the tool to a reference point on my material. I think the best way to do this would be to use a reference plate (something that is conductive and wired to the limit switches of the CNC). Once I move the tool manually (via your buttons/program) to the point where it hits my reference plate, I would like to set that point as the x,y,z "zero". Typically I accomplish this by disconnecting and re-connecting.

Any thoughts?

tiny gcode visualizer lib for tiny webserver

sorry to open ticket for my question but actually I'm looking for light gcode visualizer or probably cad2gcode convertor in my webpage , but this webpage hosted on tiny ESP826612F module which is connected to Arduino GRBL gcode interpreter by serial line, so I should have great care about its weight , My plan is just connect to wifi module and open the browser and do designated CAM job.,As I'm not pro in client side script like JavaScript I was hopping could have good advise here, do you suggest to make some plugin from such library so I shouldn't have to download or call all library ?
thanks

ctsFlowControl error

Consider suppressing ctsFlowControl errors.

from Chrome Web Store comment:
i get this error message: Chrome did not use requested serial connection option. [ctsFlowControl; expected:false, actual:true]. But the connection is solid and works!

Implement 2.5D rendering

While 2D rendering is nice, most tool paths are in 3 dimensions. Please implement a way to view the various layers of the Z axis.

arduino doesnt respond

Hi.

Thanks for your work on the chrome gcode sender, I love the interface and it seems to be one of the most responsive gcode programs that I have used.

I did however run into a problem and thought I would reach out to you for your opinion. I ran a job on my cnc and it froze towards the end of it. Now, my arduino will connect to the chrome gcode sender, but I am unable to send any commands to it. I can however connect and control the arduino using another gcode sending program.

Have you ever seen the arduino refuse to respond to the chrome gcode sender, but work fine with other ones?

Thanks!

jog commands should go through the queue

Jog commands should go through the queue instead of being direct.

To prevent the buttons from jittering, only blank them out when there are more than N(5?) commands in the queue.

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.