-
Notifications
You must be signed in to change notification settings - Fork 13
/
sample-macros.ini
82 lines (72 loc) · 2.46 KB
/
sample-macros.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
[macro buttons]
# button name = command to send
Settings=M503
Get Pos=get pos
CZ=G0 F15000 X0 Y0 Z0
C=G0 F15000 X0 Y0 Z0.2
T1=G0 F15000 X-102.85962 Y-59.3860 Z0.2
# prompt for width and length then issue G32 and substitute the entered values
grid probe = G32 R1 X0 Y0 A{?width} B{?length}
send a file = @afile.g
# confirm before executing
clear wcs = ?G90 G10 P0 L2 X0 Y0 Z0 G92.1 G49
# inc or dec the Z axis while printing
z inc = G43.2 Z0.1
z dec = G43.2 Z-0.1
# define a toggle button that reflects the state of a switch
[toggle button psu]
# the name MUST be the same as the smoothie switch name eg psu.enable true
name=psu
# set to true to poll for the state of the switch psu
poll=true
# the label to show normally (off)
label on=Power on
# the label to show when it is on
label off=Power off
# the command to send when it is pushed on
command on=M80
# the command to send when it is pushed off
command off=M81
# set the default state of the toggle button, default is off
default=on
[toggle button fan]
name=fan
poll=true
label on=Fan on
label off=Fan off
command on=M106 S255
command off=M107
[toggle button fire]
# simple toggle button that toggles state and issues a different command based on state
name=fire
label on=Fire
label off=Fire Off
command on=fire 10
command off=fire off
[script probe size]
# button that executes a script on the host (in any language) that talks to smoothie
name=probe size
# set io to true to tell it to communicate with smoothie over stdin/stdout
io= true
# set debug to true to see what it is sending to smoothie
debug= true
# program/script to execute
exec=ruby scripts/probe.rb
# optional arguments which a dialog will prompt for and are passed to the script on the command line
args=--width,--length,--tool-diameter
[script cat]
# simple script that executes a host shell command and displays the result, substitutes a file name with a selected file
name=cat
exec= cat {file}
[script flash]
# script that grabs latest firmware build and flashes it (requires apt-get install dfu-util wget)
name = flash latest
exec = wget -O main.bin https://github.com/Smoothieware/Smoothieware/blob/edge/FirmwareBin/firmware.bin?raw=true && dfu-util -R -d 1d50:6015 -D main.bin
# buttons that can run one of the builtin toolscripts, exec is the name of the toolscript to run
[toolscript circle center]
name = circle center
exec = find_center
[toolscript spindle speed]
name = set RPM
exec = set_rpm
args = RPM # prompts for an RPM argument which is then passed to the toolscript