Coder Social home page Coder Social logo

synman / octoprint-bettergrblsupport Goto Github PK

View Code? Open in Web Editor NEW
61.0 11.0 19.0 2.71 MB

Better Grbl Support Plugin for Octoprint based (loosely) on the original Grbl Support plugin developed by mic159

Home Page: https://github.com/synman/Octoprint-Bettergrblsupport/wiki

Python 57.60% CSS 0.73% JavaScript 24.74% Less 0.07% Jinja 16.87%

octoprint-bettergrblsupport's Introduction

Usage Statistics

Better Grbl Support Plugin for Octoprint

grbl

This plugin was inspired by mic159's Grbl Support plugin (https://plugins.octoprint.org/plugins/octoprint-grbl-plugin/). His plugin gets you 90% of the way there for adding Grbl support to Octoprint but had a couple limitations and lacked some bells and whistles from a UI and configuration perspective.

Better Grbl Support originally utilized mic159's gcode receiver parser but at this point I've moved well beyond his reference implementation.

Here are some of bgs's capabilities (as of v2.0.0):

  • Fully supports Laser and CNC operations / workflows
  • Provides for 10 axes of movement / jogging
  • Machine and Work Positioning Homing / Origin setup
  • Allows for full management of All Grbl settings ($$)
  • Provides rich details for all Grbl settings, messages, alarms, and errors
  • Supports Z-Probing and customization of Z-Probe settings
  • 9 Point Framing and auto generation of Framing dimensions
  • Detects and automatically supports Grbl 1.1 Jogging
  • Fully integrates with Octoprint Start/Pause/Resume/Cancel operations
  • All global configuration changes to Octoprint are reverted on uninstall
  • All conversions of typical marlin/repetier/etc commands to Grbl are preset
  • Disables Octoprint functions which interfere with Grbl
  • Disables the built-in GCode Viewer
  • Disables the built-in Temperature tab
  • Disables the built-in Control tab (It can be re-enabled via Settings)
  • Supports compressed/shorthand Grbl generated by numerous post processors

Documentation

Visit the Better Grbl Support Wiki for general instructions and workflows.

Screenshots

octoprint-bettergrblsupport's People

Contributors

conquillacarl avatar paukstelis avatar synman avatar willmac16 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  avatar

octoprint-bettergrblsupport's Issues

Buffer Overflow

Hey, I have this installed and am using an EleksMana board to control a laser engraver.

The issue I am having is that octopi with Better GRBL Support is feeding the gcode file way to fast and causing a buffer overflow.
I am looking around to see if this is something I can fix myself. If so, I would fork it and make one dedicated to EleksMaker style machines. Most other softwares I use wait for a carriage return from grbl before sending another gcode line.

Any help is appreciated.

Support for Feedrate with Decimals

I think there's a bug on line 454 of init.py in better grbl support for octopi.

The observed behavior in the interface was a report of error 33 from grbl for a G02 arc command. That error means the target destination point was not on the described arc. The gcode was valid and the target was within the expected margin of error for grbl. However, the start point was not the expected start point because the prior line of G01 gcode was skipped.

The prior line of gcode was skipped as invalid because the feedrate was a float rather than an interger. Here's an example:

G0 X17.192318 Y22.904479 Z-0.500000
G1 X17.834666 Y21.827774 Z-0.500000 F360.00
G3 X16.489131 Y22.201292 Z-0.500000 I-2.069250 J-4.843830 F360.00

The first G1 line causes an error like this in the octoprint log file:

2019-10-28 22:33:37,078 - octoprint.util.comm - ERROR - Error while processing hook bettergrblsupport for phase sending and command G1 X17.8347 Y21.8278 Z-0.5000 F360.00:
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 3220, in _process_command_phase
hook_results = hook(self, phase, command, command_type, gcode, subcode=subcode, tags=tags)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_bettergrblsupport/init.py", line 454, in hook_gcode_sending
grblSpeed = int(match.groups(1)[0])
ValueError: invalid literal for int() with base 10: '360.00'

so the G1 line is never sent to grbl. That means the start point remains at X17.1923, Y22.9045 rather than moving to X17.8345, Y21.8278. And the point is not on the arc for the G3.

Should we not change the feedrate interpretation to match the speed interpretation since the feedrate in gcode can legitimately be a float:

So use this:

            grblSpeed = int(float(match.groups(1)[0]))

instead of this:

            grblSpeed = int(match.groups(1)[0])

so that we match something like this, which seems to work:

            grblPowerLevel = int(float(match.groups(1)[0]))

Thanks. I haven't tried the change yet, but I intend to soon and I'll update the post with my result.

error : 9 while connecting

hi, here is the log while trying to connect :
Changing monitoring state from "Offline" to "Detecting serial port" Serial port list: [u'/dev/ttyACM0'] Connecting to: /dev/ttyACM0 Changing monitoring state from "Detecting serial port" to "Opening serial port" Connected to: Serial<id=0x69a46e30, open=True>(port='/dev/ttyACM0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor Starting baud rate detection... Changing monitoring state from "Opening serial port" to "Detecting baudrate" Trying baudrate: 115200 Send: M5 Recv: Baudrate test retry #1 Send: M5 Recv: Grbl 1.1g ['$' for help] Changing monitoring state from "Detecting baudrate" to "Operational" Recv: [MSG:'$H'|'$X' to unlock] Recv: ok Send: $$ Recv: error:9 Changing monitoring state from "Operational" to "Error: error:9" Send: M112 Send: N1 M112*32 Send: N2 M104 T0 S0*35 Send: N3 M140 S0*102 Changing monitoring state from "Error: error:9" to "Offline (Error: error:9)" Connection closed, closing down monitor

while in openbuildcontrols I got :
Checking for Updates [19:09:48] [ Update Available! ] OpenBuilds CONTROL 1.0.233. is available now. [19:09:48] [ Update Available! ] Download will start in 0 seconds (cancel) [19:09:48] [ Update Available! ] You will be prompted when its ready to be installed [19:09:54] [ connect ] PORT INFO: Port is now open: /dev/ttyACM0 - Attempting to detect Firmware [19:09:54] [ connect ] Checking for firmware on /dev/ttyACM0 [19:09:54] [ connect ] Detecting Firmware: Method 1 (Autoreset) [19:09:55] [ connect ] Detecting Firmware: Method 2 (Ctrl+X) [19:09:56] [ connect ] Detecting Firmware: Method 3 (others that are not supported) [19:09:56] [ ] Grbl 1.1g ['$' for help] [19:09:56] [ ] [MSG:'$H'|'$X' to unlock] [19:09:57] [ $$ ] $0=10 ;Step pulse time, microseconds [19:09:57] [ $$ ] $1=255 ;Step idle delay, milliseconds [19:09:57] [ $$ ] $2=0 ;Step pulse invert, mask [19:09:57] [ $$ ] $3=3 ;Step direction invert, mask [19:09:57] [ $$ ] $4=0 ;Invert step enable pin, boolean [19:09:57] [ $$ ] $5=0 ;Invert limit pins, boolean [19:09:57] [ $$ ] $6=0 ;Invert probe pin, boolean [19:09:57] [ $$ ] $10=1 ;Status report options, mask [19:09:57] [ $$ ] $11=0.020 ;Junction deviation, millimeters [19:09:57] [ $$ ] $12=0.002 ;Arc tolerance, millimeters [19:09:57] [ $$ ] $13=0 ;Report in inches, boolean [19:09:57] [ $$ ] $20=0 ;Soft limits enable, boolean [19:09:57] [ $$ ] $21=0 ;Hard limits enable, boolean [19:09:57] [ $$ ] $22=1 ;Homing cycle enable, boolean [19:09:57] [ $$ ] $23=3 ;Homing direction invert, mask [19:09:57] [ $$ ] $24=25.000 ;Homing locate feed rate, mm/min [19:09:57] [ $$ ] $25=750.000 ;Homing search seek rate, mm/min [19:09:57] [ $$ ] $26=250 ;Homing switch debounce delay, milliseconds [19:09:57] [ $$ ] $27=1.000 ;Homing switch pull-off distance, millmeters [19:09:57] [ $$ ] $30=12000 ;Maximum spindle speed, RPM [19:09:57] [ $$ ] $31=0 ;Minimum spindle speed, RPM [19:09:57] [ $$ ] $32=0 ;Laser-mode enable, boolean [19:09:57] [ $$ ] $100=40.000 ;X-axis steps per millimeter [19:09:57] [ $$ ] $101=40.000 ;Y-axis steps per millimeter [19:09:57] [ $$ ] $102=188.947 ;Z-axis steps per millimeter [19:09:57] [ $$ ] $110=8000.000 ;X-axis maximum rate, mm/min [19:09:57] [ $$ ] $111=8000.000 ;Y-axis maximum rate, mm/min [19:09:57] [ $$ ] $112=500.000 ;Z-axis maximum rate, mm/min [19:09:57] [ $$ ] $120=500.000 ;X-axis acceleration, mm/sec^2 [19:09:57] [ $$ ] $121=500.000 ;Y-axis acceleration, mm/sec^2 [19:09:57] [ $$ ] $122=50.000 ;Z-axis acceleration, mm/sec^2 [19:09:57] [ $$ ] $130=740.000 ;X-axis maximum travel, millimeters [19:09:57] [ $$ ] $131=790.000 ;Y-axis maximum travel, millimeters [19:09:57] [ $$ ] $132=100.000 ;Z-axis maximum travel, millimeters [19:09:57] [ $$ ] ok [19:09:57] [ $I ] [VER:1.1g.20181112:] [19:09:57] [ $I ] [OPT:V,15,128] [19:09:57] [ $I ] ok [19:09:58] [ autoupdate ] Starting update... Please wait [19:09:58] [ connect ] Firmware Detected: grbl version 1.1g on /dev/ttyACM0 [19:10:00] [ autoupdate ] Starting Download: v1.0.233 [19:10:13] [ autoupdate ] New update ready [19:10:42] [ disconnect ] PORT INFO: Port closed

version of GRBL is 1.1g
any test i can perform ?

Grbl negative space not supported by bounding box

Hey it looks like negative space is still not supported by your bounding box calculations. I think this is a valid use case because it is common for CNC and that is the default for grbl. Here’s a description from the grbl FAQ:

Grbl Negative Space

This current code:

                        x = float(match.groups(1)[0])
                    if x < minX:
                        minX = x
                    if x > maxX:
                        maxX = x

Means that if you initialize maxX to 0, and you’re trying to work in negative space, the upper bound will always be way over at 0. Same for y.

This is why I was suggesting initializing minX and minY to 100000 and maxX and maxY to -100000 in the issue thread.

Apologies if I’m missing something, though.

Need Adjustable Weak Laser Setting

Clicking on 'Weak Laser' to focus sets laser power to S1. For my 2.8w laser to come on, I need to be able to set it to S3. I can do it manually, but can you make the 'Weak Laser' configurable?

Draw Frame Box w/o the Laser burning - Enhancement

Totally new to this tech although I do have a CNC machine and a 3D printer.

I am running an NEJE Master 3500 laser for my learning tool
Their firmware is 0.8c GRBL but I assume they have not totally followed the standard.

By "drawing" a frame or bounding box I can tell if

  1. The image used will fit on the material I'm using
  2. I can position the material so the image is burned where I need it

Jogging not working

@synman
When I connect to my laser machine and try to jog, the motors do nothing.
I can manually control them in the terminal with a "G21 X# Y#" command but the GRBL control tab does nothing.

After testing, the "Home", "Sleep", "Unlock" and "Reset" buttons do work, but the jog arrow and "Draw Frame" buttons send nothing to the controller. It at least does not make the controller do anything and I do not see it in the terminal

EDIT
OK, so I am now able to control the motors. In order to enable the buttons to work, A gcode file must be "loaded" before.
Maybe this is a "Feature Request" or an improvement.
Make it so you can move the laser without loading a file.

Also. Is there a way to set the current location of the laser as home. Basically set x and y to 0 but not to home them?

Sample Using plugin with Inkscape NEJE extension

Nothing critical - wish my Python skill were not so rusty
I created a Gcode file using Inkscape with an extension that generates a .nc file
I changed the extension to .gcode, uploaded to Octoprint and it did print correctly.
The "issue" is with the display - the values are orders of magnitude off actual
I suspect the plug-in is expecting data in a different format.
Attached is a screen shot and the gcode file I used

FYI The laser is a NEJE Master 3500 version 5 firmware which I believe is GRBL 0.8c
Laser is 3500 mw

neje-3500-Gothic Test-Ver2_0003.nc.txt
OctoPrint-Console-Gothic Pattern Test V2-003

Z height

Hi, maybe Im missing something, but cant find anywhere to adjust the Z height? Only the X and Y axis :-(

Expected Command Letter Failure

Hi, I am trying to run a pen plotter with a Ramps 1.3 board, GRBL for Ramps, and using Inkscape and Gcodetools to generate the g code. I can control the plotter with the Universal Gcode Sender, but I can't seem to be able to send a file over and plot it with this Octoprint plug in. I can jog all three axis as much as I like, but sending the gcode file gives me the following:
"
Recv: ok
Send: ?$G
Recv: <Idle,MPos:0.000,0.000,0.000,WPos:10.000,30.000,60.898>
Recv: [G0 G54 G17 G21 G90 G94 M0 M5 M9 T0 F0.]
Recv: ok
Changing monitoring state from "Operational" to "Starting"
Changing monitoring state from "Starting" to "Printing"
Send: %
Recv: error: Expected command letter
Send: M3
Changing monitoring state from "Printing" to "Error: error: Expected command letter"
Send: M112
Send: N1 M11232
Send: N2 M104 T0 S0
35
Changing monitoring state from "Error: error: Expected command letter" to "Offline (Error: error: Expected command letter)"
Connection closed, closing down monitor
"
Here is the gcode I am trying to print:
%
(Header)
(Generated by gcodetools from Inkscape.)
(Using default header. To add your own header create file "header" in the output dir.)
M3
(Header end.)
G21 (All units in mm)

(Start cutting path id: path595)
(Change tool to Default tool)

G00 Z35.000000
G00 X-491.779890 Y-122.049310

G01 Z-1.000000 F800.0(Penetrate)
G02 X-490.116910 Y-125.322640 Z-1.000000 I-0.343640 J-2.233677 F800.000000
G02 X-492.648940 Y-127.698140 Z-1.000000 I-4.631748 J2.399763
G02 X-499.796749 Y-126.487713 Z-1.000000 I-2.654200 J6.036252
G02 X-503.077560 Y-120.311210 Z-1.000000 I7.295371 J7.834722
G02 X-499.430246 Y-109.549923 Z-1.000000 I12.101184 J1.897290
G02 X-489.172740 Y-105.102810 Z-1.000000 I11.170787 J-11.712721
G02 X-474.733751 Y-111.086223 Z-1.000000 I1.015228 J-17.963653
G02 X-469.184560 Y-125.525510 Z-1.000000 I-16.306012 J-14.552550
G02 X-477.472486 Y-143.668194 Z-1.000000 I-23.732349 J-0.122992
G02 X-496.125130 Y-150.293480 Z-1.000000 I-17.935954 J20.926672
G02 X-517.984062 Y-139.714657 Z-1.000000 I0.766229 J29.456126
G02 X-525.672890 Y-116.835020 Z-1.000000 I25.550664 J21.318197
G02 X-512.810249 Y-91.252855 Z-1.000000 I35.155714 J-1.651462
G02 X-485.696550 Y-82.507480 Z-1.000000 I24.699480 J-30.173337
G02 X-456.386877 Y-97.649806 Z-1.000000 I-2.533458 J-40.841038
G02 X-446.589220 Y-129.001700 Z-1.000000 I-34.794026 J-28.080205
G02 X-464.008627 Y-162.041697 Z-1.000000 I-46.517274 J3.412977
G02 X-499.601330 Y-172.888810 Z-1.000000 I-31.460554 J39.412880
G02 X-536.373594 Y-153.194088 Z-1.000000 I4.290612 J52.187397
G02 X-548.268220 Y-113.358820 Z-1.000000 I44.030192 J34.840685
G02 X-526.299424 Y-72.852883 Z-1.000000 I57.853254 J-5.166820
G02 X-482.220350 Y-59.912150 Z-1.000000 I38.220659 J-48.646209
G02 X-437.979696 Y-84.154109 Z-1.000000 I-6.041905 J-63.515983
G02 X-423.993890 Y-132.477900 Z-1.000000 I-53.261231 J-41.600566
G00 Z35.000000

(End cutting path id: path595)

(Start cutting path id: rect10)
(Change tool to Default tool)

G00 Z35.000000
G00 X-330.136360 Y-85.549170

G01 Z-1.000000 F800.0(Penetrate)
G01 X-112.873540 Y-85.549170 Z-1.000000 F800.000000
G01 X-112.873540 Y-125.525530 Z-1.000000
G01 X-330.136360 Y-125.525530 Z-1.000000
G01 X-330.136360 Y-85.549170 Z-1.000000
G00 Z35.000000

(End cutting path id: rect10)

(Footer)
M5
G00 X0.0000 Y0.0000
M2
(Using default footer. To add your own footer create file "footer" in the output dir.)
(end)
%

Thanks for any pointers you can give me.

Add ability to adjust framing jog speed

This seems like a reasonable request and will get prioritized accordingly :)

I experience a little bit of lag while monitoring remotely via the Octoprint camera interface. I suspect being able to adjust the job speed of the framing operation may make it easier for me to track the "box" size.

BreaksWebcam Tab

I tried this plugin because of a MPCNC.
I uninstalled it and now my Webcam/Control Tab is empty and i can't find a way to get it back.

Macro buttons

hey
could you add some buttons that could be set by user to add a gcode for probing etc.
just like the plugin: terminalcommands

Smoothieware does not support GRBL config commands

I am running a controller board with the Smoothieware firmware. It rejects the $$ command and $ command (see this list for differences from GRBL; https://smoothieware.org/from-grbl and note that the page is incorrect, cat /sd/config.txt is actually the cognate for $$). This plugin offers a lot of essential functionality and the Smoothieboard is not a bad CNC controller. Unfortunately it raises an error on $$ which causes Octoprint to disconnect. Admittedly it is a somewhat knuckleheaded approach in Smoothieware to do a few things differently and not support aliases. I'm reporting this as an issue not because it's a flaw in this plugin but because I believe others may try this with Octoprint + Smoothieware.

Settings fields are empty after first boot

the settings screen displays empty settings values if it is opened the first time Octoprint is launched with bgs installed. Settings display fine subsequent a reboot from that point forward

Doesn't work with latest stable Octoprint

I have a 3018 pro with a GRBL 0.8 based board. When I tested the plugin the first time everything worked fine. But now, no state is showing and no movement (axis X: n/a, y: n/a etc.) When I connect the router directly to my pc, everything's working fine. But when I use octopi and raspberry, nothing happens except of establishing a sucessfull connection. A fresh reinstall doesn't change anything. Should I use an older octoprint instance instead?

Lines/Vibration with Laser Plugin

I've used Octoprint on my 3D printer for a couple of years and was interested to see a laser plugin for it. I added the Laser plugin to Octoprint on my laser engraver and like what I see - with an exception. I was seeing artifacts in a photo I was test-printing, then saw more definite lines when printing a gradient image. I went through steps of eliminating different parts of the communication path to determine the item causing the issue.

My system consists of an RPi3 feeding an Arduino/BOB unit to drive the steppers and a laser driver module to operate the laser itself. I bypassed the RPi to start with and got smooth prints. Then, I set up two SD cards - one with Octoprint Laser and one with bCNC to further drill into the cause. It turns out that the print discrepancy only occurs when using Octoprint Laser to feed the gcode to the system. Attached is a photo showing the result using Octoprint Laser on the left and bCNC on the right.

Suggestions?

Grad20190827a

Separate zero-ing X, Y, Z axes

Thanks for your awesome work! Is there a plan to have separate X, Y, Z axis zeroing? When working with really tiny tools it can help to zero the axes independently (unless I'm doing it wrong!)

Kind thanks

Reported Sizes

How is the sizing calculated when you load a file?
When i load a file that is 83x50mm, it shows up as over 100k mm

Installing removes Marlin control panel

Installed this plugin to see if I liked it, and whether it installed alongside the existing Marlin control tab. It removed the Marlin control tab, so I uninstalled it, Now I'm left without the Marlin tab. :(

New install error - IndexError: list index out of range

I started a new install of octo print on a Raspberry 4 to run my Laser engraver. the plugin better grbl support is not working. I used OctoPi 0.17.0 image full image and the newest 0.18.0 image.

octoprint version Version 0.17.0, running on Raspberry Pi 4 Model B Rev 1.1

below is the error I am getting.
2021-01-20 20:28:41,363 - octoprint.plugin - ERROR - Error while calling plugin bettergrblsupport
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/init.py", line 219, in call_plugin
result = getattr(plugin, method)(*args, **kwargs)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_bettergrblsupport/init.py", line 241, in on_after_startup
self.deSerializeGrblSettings()
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_bettergrblsupport/init.py", line 282, in deSerializeGrblSettings
self.grblSettings.update({int(set[0]): [set[1], self.grblSettingsNames.get(int(set[0]))]})
IndexError: list index out of range

When OctoPrint connects to CNC call home

I'm building a sand table and it would be nice to have a way to "auto home" when the plugin connects to the CNC board. Since, I don't home before processing each gcode drawing.

Thanks!

Coordinate values are messed up for some jobs

I haven't been able to recreate this myself but you can't argue with a picture.

I made coordinate matching less strict with 2.0 to lighten up on CPU load during processing (simplified regex). I suspect something in the source file is throwing the match off.

Unknown

Intelligent Z-Probing

The idea here is to use the frame calculation for a loaded file and upon initiating z-probe generate a grid of points to probe within the frame.

  • Allow for multiple "point" grids. (1 point = current position, 3 point = west, middle, east, 5 point = nw, ne, se, sw, middle, 9 point = w, nw, n, ne, e, se, s, sw, middle)
  • Allow for multiple best choice options (highest, lowest, average, mean)

All done with the click of one button.

Grbl Error 25

I have just installed Octoprint and Better grbl support on a raspberry pi and I am getting the error 25 (Invalid gcode ID:25 Repeated g-code word found in block.). I have tried a couple of times and it doesn't happens at the same moment, but it happens very quickly, just 10-15 seconds after starting.
Do you have any advice about it?

Just an FYI Created a guide for Ortur laser connecting through this plugin

Not knowing of a better way to thank you for your tool and letting you know that I created a guide for hooking up an Ortur Laser Master 2 through Octoprint using this plugin.

Your plugin works flawless out of the box, it just takes a bunch of considerations and configurations due to Lightburn and Ortur.

Might work for other lasers as well, but cant test that.

https://www.reddit.com/r/OrturLaserUsers/comments/q7k7nl/guide_octoprint_standalone_engraving_working_for/

https://forum.lightburnsoftware.com/t/guide-octoprint-standalone-engraving-working-for-ortur-laser-master-2/49874

Disable plugin_gcodeviewer rather than hiding it

With OctoPrint 1.4.1 the gcode viewer was redeployed as a (bundled) plugin. Rather than simply hide the tab in the OctoPrint UI, it would be more efficient to disable it entirely.

This is loosely tied to #32

Z axis buttons?

I want to use this with a 3018 plus, but the buttons for the z axis are missing - and very necessary. Any hope to get them? I was thinking of trying the custom button plugin or making some G-code "programs" I can upload and run as if they were buttons - move z, probing, etc...

Better GRBL support Touch UI

Hi. I’m currently using your better GRBL support plugin, on a sandtable project I’m working on. I am trying to use a 3.5” touchscreen as a UI. The standard octoprint UI works with the touchscreen. When I add the GRBL support plugin, the display gets all screwy 😕 Any future plans on making this work with a touchscreen UI?

Laser Controls Persistent

I've used Octoprint for several years on my 3D printer and was excited to see that someone finally created a plug-in to allow its use on a laser engraver and CNC. I got my laser going just fine and it seems to operate as it should.

The issue I have arose when I started setting up an SD card for my CNC. The laser controls stay regardless of how I try to manipulate the settings. Under the 'Hide the Octoprint Control tab', there's a block to check, 'Add Laser Controls and State to Control tab'. Regardless of how I check the blocks, the laser settings on the GRBL Control page are there. For CNC operation, they need to go away or be replaced with something related to CNC operation.

Thanks!

Laser Mode Enabled after every Draw Frame action

It appears to me that laser mode ($32=1) is enabled whenever I draw the frame by pressing the "Draw Frame" button. Draw Frame functionality is useful to visualize the boundaries, but I'm using CNC, not Laser. I never want laser mode enabled.

The problem with laser mode while using CNC is that the "spindle" won't turn on until the cutting move (G1 as opposed to G0) is acted on. But a real spindle needs time to spin up and can't cut immediately. So, this causes problems. If I set $32=0 in grbl settings, I'd like it to stay that way.

It looks to me like drawing a frame is trying to make sure laser mode is off and then turning it back on when it's done. However, I believe it should only do this if laser mode was on to begin with. Otherwise, it'll turn laser mode on when it was initially off, which can be very hard to troubleshoot if you don't know where it's coming from. Who would expect that "draw frame" would turn laser mode on when it was off before?

(And thanks again for your work, synman.)

Feature: Inputfields for undefined GRBL IDs

See enclosed picture; GRBL setting ID 33 is in my case the triggervalue for the G-shock.
However, in other systems, this can be a different value, thats why it is uncommented by default.

It would be a great feature if it was an inputfield, so people can manually document these exceptions for their setup

image

Pgm Begin notification does not pop

When a job starts, bgs should log an entry to the Octoprint Notification plugin indicating the job has started. For whatever reason, this is not currently working.

Framing Issue

Have a error trying do do Framing. Have a Neje Laser Master 2.

Send: M4 F1000 S1
Recv: ok
Send: G4 P0
Recv: error:2
Changing monitoring state from "Operational" to "Error"
Send: M112
Send: N1 M11232
Send: N2 M104 T0 S0
35
Changing monitoring state from "Error" to "Offline after error"
Connection closed, closing down monitor

Somebody here who knows what exactly the problem is and how to solve it?
Suspect the G4 P0 causes this Fault. But where can I change commands for Framing?

Thanx
Dirk

Function to send unprintable character <ctrl>-x ?

The only way to send a soft-reset is through the unprintable character ctrl-x.
Direct typing in terminal is not possible.

Any way to enable sending of ctrl-x, dec(24) hex(0x18) char(CAN) would be appreciated.

https://github.com/gnea/grbl/wiki/Grbl-v1.1-Commands

`Four realtime commands are type-able by users on a keyboard and shown in the $ Grbl help message. These realtime command characters control some of Grbl's basic functions.

0x18 (ctrl-x) : Soft-Reset
    Immediately halts and safely resets Grbl without a power-cycle.
    Accepts and executes this command at any time.
    If reset while in motion, Grbl will throw an alarm to indicate position may be lost from the motion halt.
    If reset while not in motion, position is retained and re-homing is not required.
    An input pin is available to connect a button or switch.

`

Webcam URL changed

Environment:

I am running docker on a Raspberry PI4 with 3x Octoprint containers, 1x motioneye container for 3x cameras and 1x Portainer management application.

Issue:

I have entered the actual webcam URL from motioneye into the webcam tab of the Octoprint container running your GRBL plugin. This URL is "http://192.168.2.9:8083" which works and tests correctly from the Webcam & Timelapse setup page.

However the GRBL Control tab has changed this URL to what might be needed if the camera is local to a native (non dockerized) single Octoprint instance. The javascript used inside the webcam element of the GRBL Control tab is:

<img id="webcam_image_framing" data-bind="click: function() { fsClick() }, css: { flipH: settings.webcam_flipH(), flipV: settings.webcam_flipV() }, event: { error: onWebcamFrameErrored }" src="/webcam/?action=stream&amp;100944">

The src variable above expands to "http://192.168.2.9:8300/webcam/?action=stream&100944" which is incorrect.

Proposed Solution:

If the URL is used as entered in the Webcam & Timelapse tab without alteration, the webcam stream should work correctly in all usages.

Dashboard Plugin Example:

I use the Dashboard plugin in two of my other OctoPrint containers and the equivalent javascript line from the correctly working webcam element is:

<img id="dashboard_webcam_image" data-bind="css: { flipH: flipH(), flipV: flipV()}, getWebcamUrl, attr: {src: embedUrl()}" src="http://192.168.2.9:8081/?nonce_dashboard=1603398526720">

I don't know why the ?nonce... is there in the src variable value but the element does indeed work as shown even though the required URL does not need the ? suffix.

Stopping Octoprint form sending '$$' on initial auto connect

Hi, I'm really grateful for this Plugin but there is one behavior I cannot figure out how to prevent.

When Octoprint tries to auto-connect to my GRBL device when Octoprint first starts up (say after power on) it sends the command '$$' to the device. I need to be able to stop it from doing this.

After the initial connection drops out (as the $$ is causing an Alarm on my GRBL device because it's not in a state to receive and process the command) then when I press the connect button manually it does connect and keep the connection so that I'm then able to continue working with Octoprint.

This the serial chatter showing the first attempt after power on and then the second attempt after pressing the connect button:

Changing monitoring state from "Offline" to "Opening serial connection"
Connecting to port /dev/ttyACM0, baudrate 115200
Changing monitoring state from "Opening serial connection" to "Connecting"
Connected to: Serial<id=0xad810a30, open=True>(port='/dev/ttyACM0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=30.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
Send: M5
Recv: 
Recv: Grbl 1.1h ['$' for help]
Send: M5
Changing monitoring state from "Connecting" to "Operational"
Recv: >G1X10F2000:ok
Recv: ok
Send: $$
Recv: error:8
Changing monitoring state from "Operational" to "Error: error:8"
Send: M112
Send: N1 M112*32
Send: N2 M104 T0 S0*35
Changing monitoring state from "Error: error:8" to "Offline (Error: error:8)"
Connection closed, closing down monitor

and then after pressing the connect button manually:

Changing monitoring state from "Offline" to "Opening serial connection"
Connecting to port /dev/ttyACM0, baudrate 115200
Changing monitoring state from "Opening serial connection" to "Connecting"
Connected to: Serial<id=0xad7f9830, open=True>(port='/dev/ttyACM0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=30.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
Send: M5
Recv: 
Recv: Grbl 1.1h ['$' for help]
Send: M5
Changing monitoring state from "Connecting" to "Operational"
Recv: >G1X10F2000:ok
Recv: ok

Any suggestions would be great, thanks.
Lewis

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.