Doc re-org. New Grbl Logos!
This commit is contained in:
BIN
doc/logo/Grbl Logo 150px.png
Normal file
BIN
doc/logo/Grbl Logo 150px.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
BIN
doc/logo/Grbl Logo 320px.png
Normal file
BIN
doc/logo/Grbl Logo 320px.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 57 KiB |
BIN
doc/logo/Grbl Logo 640px.png
Normal file
BIN
doc/logo/Grbl Logo 640px.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
BIN
doc/logo/Grbl Logo.pdf
Normal file
BIN
doc/logo/Grbl Logo.pdf
Normal file
Binary file not shown.
134
doc/logo/Grbl Logo.svg
Normal file
134
doc/logo/Grbl Logo.svg
Normal file
@ -0,0 +1,134 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="744.094488189"
|
||||
height="1052.36220472"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="Grbl Logo.svg">
|
||||
<metadata
|
||||
id="metadata97">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1000"
|
||||
inkscape:window-height="751"
|
||||
id="namedview95"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.89702957"
|
||||
inkscape:cx="393.978"
|
||||
inkscape:cy="560.38231"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="g21" />
|
||||
<desc
|
||||
id="desc4">/Users/chamnit/Dropbox/documents/OHS/Logo/Grbl.DXF - scale = 58.043118, origin = (0.000000, 0.000000), auto = True</desc>
|
||||
<defs
|
||||
id="defs6">
|
||||
<marker
|
||||
id="DistanceX"
|
||||
orient="auto"
|
||||
refX="0.0"
|
||||
refY="0.0"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
d="M 3,-3 L -3,3 M 0,-5 L 0,5"
|
||||
style="stroke:#000000; stroke-width:0.5"
|
||||
id="path9" />
|
||||
</marker>
|
||||
<pattern
|
||||
height="8"
|
||||
id="Hatch"
|
||||
patternUnits="userSpaceOnUse"
|
||||
width="8"
|
||||
x="0"
|
||||
y="0">
|
||||
<path
|
||||
d="M8 4 l-4,4"
|
||||
linecap="square"
|
||||
stroke="#000000"
|
||||
stroke-width="0.25"
|
||||
id="path12" />
|
||||
<path
|
||||
d="M6 2 l-4,4"
|
||||
linecap="square"
|
||||
stroke="#000000"
|
||||
stroke-width="0.25"
|
||||
id="path14" />
|
||||
<path
|
||||
d="M4 0 l-4,4"
|
||||
linecap="square"
|
||||
stroke="#000000"
|
||||
stroke-width="0.25"
|
||||
id="path16" />
|
||||
</pattern>
|
||||
<symbol
|
||||
id="*Model_Space" />
|
||||
<symbol
|
||||
id="*Paper_Space" />
|
||||
<symbol
|
||||
id="*Paper_Space0" />
|
||||
</defs>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="0"
|
||||
id="g21">
|
||||
<g
|
||||
id="g3562"
|
||||
transform="matrix(0.74854703,0,0,0.74854703,93.578346,130.5299)">
|
||||
<path
|
||||
sodipodi:nodetypes="ccscccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path45"
|
||||
style="fill:#000000;stroke:#000000;stroke-linecap:round"
|
||||
d="m 666.97027,519.20619 0,-204.22494 c 0,-14.19819 -11.5099,-25.70806 -25.70807,-25.70806 -14.19818,0 -25.70808,11.50987 -25.70808,25.70806 l 0,204.22494 c 0,56.79271 46.03958,102.83229 102.83229,102.8323 l 25.70808,-25.70808 -25.70808,-25.70807 c -28.39635,0 -51.41614,-23.0198 -51.41614,-51.41615 z" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccsccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path61"
|
||||
style="fill:#000000;stroke:#000000;stroke-linecap:round"
|
||||
d="m 230.65284,519.20619 0,77.12422 c 0,14.19819 11.5099,25.70806 25.70807,25.70806 14.19818,0 25.70808,-11.50987 25.70808,-25.70806 l 0,-77.12422 c 0,-28.39635 23.01979,-51.41615 51.41614,-51.41615 l 38.92203,0 0,-51.41614 -38.92203,0 c -56.7927,1e-5 -102.83228,46.03959 -102.83229,102.83229" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccssscccccsssc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path73"
|
||||
style="fill:#000000;stroke:#000000;stroke-linecap:round"
|
||||
d="m 487.73358,416.3739 -38.92203,0 0,51.41614 38.92203,0 c 20.79587,0 39.54419,12.52721 47.50197,31.73975 7.95777,19.21249 3.55772,41.32642 -11.14711,56.03126 -14.70484,14.70483 -36.81877,19.10488 -56.03126,11.14711 -19.21254,-7.95778 -31.73975,-26.7061 -31.73975,-47.50197 l 0,-204.22494 -25.70808,-25.70807 -25.70807,25.70807 0,204.22494 c 0,41.59174 25.05442,79.08838 63.47948,95.00395 38.42499,15.91554 82.65286,7.11546 112.06254,-22.29421 29.40967,-29.40968 38.20976,-73.63755 22.29423,-112.06254 -15.91557,-38.42506 -53.41221,-63.47949 -95.00395,-63.47949" />
|
||||
<path
|
||||
sodipodi:nodetypes="cssscccscccsssccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path81"
|
||||
style="fill:#000000;stroke:#000000;stroke-linecap:round"
|
||||
d="m 102.8323,570.62234 c -20.795869,0 -39.544189,-12.52721 -47.501976,-31.73974 -7.95777,-19.21249 -3.557731,-41.32643 11.147104,-56.03126 14.704835,-14.70484 36.818772,-19.10489 56.031262,-11.14712 19.21254,7.95778 31.73975,26.7061 31.73975,47.50197 l 0,127.10072 c 0,28.39635 -23.01979,51.41615 -51.41614,51.41615 -14.192584,0.008 -25.693722,11.51549 -25.693722,25.70807 0,14.19258 11.501138,25.70007 25.693722,25.70807 56.7927,-10e-6 102.83228,-46.03959 102.83229,-102.83229 l 0,-127.10072 c 0,-41.59174 -25.05443,-79.08838 -63.47949,-95.00395 C 103.76011,408.28671 59.532236,417.0868 30.122564,446.49647 0.712891,475.90615 -8.0871904,520.13402 7.8283485,558.55901 23.74392,596.98407 61.240561,622.03849 102.8323,622.03849 l 25.70807,0 25.70807,-25.70808 -25.70807,-25.70807 -25.70807,0" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path91"
|
||||
style="fill:none;stroke:#000000;stroke-linecap:round"
|
||||
d="m 744.09449,596.33041 -25.70808,25.70808" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 5.6 KiB |
66
doc/script/simple_stream.py
Executable file
66
doc/script/simple_stream.py
Executable file
@ -0,0 +1,66 @@
|
||||
#!/usr/bin/env python
|
||||
"""\
|
||||
Simple g-code streaming script for grbl
|
||||
|
||||
Provided as an illustration of the basic communication interface
|
||||
for grbl. When grbl has finished parsing the g-code block, it will
|
||||
return an 'ok' or 'error' response. When the planner buffer is full,
|
||||
grbl will not send a response until the planner buffer clears space.
|
||||
|
||||
G02/03 arcs are special exceptions, where they inject short line
|
||||
segments directly into the planner. So there may not be a response
|
||||
from grbl for the duration of the arc.
|
||||
|
||||
---------------------
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2012 Sungeun K. Jeon
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
---------------------
|
||||
"""
|
||||
|
||||
import serial
|
||||
import time
|
||||
|
||||
# Open grbl serial port
|
||||
s = serial.Serial('/dev/tty.usbmodem1811',115200)
|
||||
|
||||
# Open g-code file
|
||||
f = open('grbl.gcode','r');
|
||||
|
||||
# Wake up grbl
|
||||
s.write("\r\n\r\n")
|
||||
time.sleep(2) # Wait for grbl to initialize
|
||||
s.flushInput() # Flush startup text in serial input
|
||||
|
||||
# Stream g-code to grbl
|
||||
for line in f:
|
||||
l = line.strip() # Strip all EOL characters for consistency
|
||||
print 'Sending: ' + l,
|
||||
s.write(l + '\n') # Send g-code block to grbl
|
||||
grbl_out = s.readline() # Wait for grbl response with carriage return
|
||||
print ' : ' + grbl_out.strip()
|
||||
|
||||
# Wait here until grbl is finished to close serial port and file.
|
||||
raw_input(" Press <Enter> to exit and disable grbl.")
|
||||
|
||||
# Close file and serial port
|
||||
f.close()
|
||||
s.close()
|
138
doc/script/stream.py
Executable file
138
doc/script/stream.py
Executable file
@ -0,0 +1,138 @@
|
||||
#!/usr/bin/env python
|
||||
"""\
|
||||
|
||||
Stream g-code to grbl controller
|
||||
|
||||
This script differs from the simple_stream.py script by
|
||||
tracking the number of characters in grbl's serial read
|
||||
buffer. This allows grbl to fetch the next line directly
|
||||
from the serial buffer and does not have to wait for a
|
||||
response from the computer. This effectively adds another
|
||||
buffer layer to prevent buffer starvation.
|
||||
|
||||
CHANGELOG:
|
||||
- 20140714: Updated baud rate to 115200. Added a settings
|
||||
write mode via simple streaming method. MIT-licensed.
|
||||
|
||||
TODO:
|
||||
- Add runtime command capabilities
|
||||
|
||||
---------------------
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2012-2014 Sungeun K. Jeon
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
---------------------
|
||||
"""
|
||||
|
||||
import serial
|
||||
import re
|
||||
import time
|
||||
import sys
|
||||
import argparse
|
||||
# import threading
|
||||
|
||||
RX_BUFFER_SIZE = 128
|
||||
|
||||
# Define command line argument interface
|
||||
parser = argparse.ArgumentParser(description='Stream g-code file to grbl. (pySerial and argparse libraries required)')
|
||||
parser.add_argument('gcode_file', type=argparse.FileType('r'),
|
||||
help='g-code filename to be streamed')
|
||||
parser.add_argument('device_file',
|
||||
help='serial device path')
|
||||
parser.add_argument('-q','--quiet',action='store_true', default=False,
|
||||
help='suppress output text')
|
||||
parser.add_argument('-s','--settings',action='store_true', default=False,
|
||||
help='settings write mode')
|
||||
args = parser.parse_args()
|
||||
|
||||
# Periodic timer to query for status reports
|
||||
# TODO: Need to track down why this doesn't restart consistently before a release.
|
||||
# def periodic():
|
||||
# s.write('?')
|
||||
# t = threading.Timer(0.1, periodic) # In seconds
|
||||
# t.start()
|
||||
|
||||
# Initialize
|
||||
s = serial.Serial(args.device_file,115200)
|
||||
f = args.gcode_file
|
||||
verbose = True
|
||||
if args.quiet : verbose = False
|
||||
settings_mode = False
|
||||
if args.settings : settings_mode = True
|
||||
|
||||
# Wake up grbl
|
||||
print "Initializing grbl..."
|
||||
s.write("\r\n\r\n")
|
||||
|
||||
# Wait for grbl to initialize and flush startup text in serial input
|
||||
time.sleep(2)
|
||||
s.flushInput()
|
||||
|
||||
# Stream g-code to grbl
|
||||
l_count = 0
|
||||
if settings_mode:
|
||||
# Send settings file via simple call-response streaming method. Settings must be streamed
|
||||
# in this manner since the EEPROM accessing cycles shut-off the serial interrupt.
|
||||
print "SETTINGS MODE: Streaming", args.gcode_file.name, " to ", args.device_file
|
||||
for line in f:
|
||||
l_count += 1 # Iterate line counter
|
||||
# l_block = re.sub('\s|\(.*?\)','',line).upper() # Strip comments/spaces/new line and capitalize
|
||||
l_block = line.strip() # Strip all EOL characters for consistency
|
||||
if verbose: print 'SND: ' + str(l_count) + ':' + l_block,
|
||||
s.write(l_block + '\n') # Send g-code block to grbl
|
||||
grbl_out = s.readline().strip() # Wait for grbl response with carriage return
|
||||
if verbose: print 'REC:',grbl_out
|
||||
else:
|
||||
# Send g-code program via a more agressive streaming protocol that forces characters into
|
||||
# Grbl's serial read buffer to ensure Grbl has immediate access to the next g-code command
|
||||
# rather than wait for the call-response serial protocol to finish. This is done by careful
|
||||
# counting of the number of characters sent by the streamer to Grbl and tracking Grbl's
|
||||
# responses, such that we never overflow Grbl's serial read buffer.
|
||||
g_count = 0
|
||||
c_line = []
|
||||
# periodic() # Start status report periodic timer
|
||||
for line in f:
|
||||
l_count += 1 # Iterate line counter
|
||||
# l_block = re.sub('\s|\(.*?\)','',line).upper() # Strip comments/spaces/new line and capitalize
|
||||
l_block = line.strip()
|
||||
c_line.append(len(l_block)+1) # Track number of characters in grbl serial read buffer
|
||||
grbl_out = ''
|
||||
while sum(c_line) >= RX_BUFFER_SIZE-1 | s.inWaiting() :
|
||||
out_temp = s.readline().strip() # Wait for grbl response
|
||||
if out_temp.find('ok') < 0 and out_temp.find('error') < 0 :
|
||||
print " Debug: ",out_temp # Debug response
|
||||
else :
|
||||
grbl_out += out_temp;
|
||||
g_count += 1 # Iterate g-code counter
|
||||
grbl_out += str(g_count); # Add line finished indicator
|
||||
del c_line[0] # Delete the block character count corresponding to the last 'ok'
|
||||
if verbose: print "SND: " + str(l_count) + " : " + l_block,
|
||||
s.write(l_block + '\n') # Send g-code block to grbl
|
||||
if verbose : print "BUF:",str(sum(c_line)),"REC:",grbl_out
|
||||
|
||||
# Wait for user input after streaming is completed
|
||||
print "G-code streaming finished!\n"
|
||||
print "WARNING: Wait until grbl completes buffered g-code blocks before exiting."
|
||||
raw_input(" Press <Enter> to exit and disable grbl.")
|
||||
|
||||
# Close file and serial port
|
||||
f.close()
|
||||
s.close()
|
Reference in New Issue
Block a user