-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
166 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
M98 P"ercf/lib/buzz.g" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
M98 P"ercf/lib/disengage.g" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
M98 P"ercf/lib/engage.g" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
M98 P"ercf/lib/home.g" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
M84 E0 X |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
M98 P"ercf/lib/init.g" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
M98 P"ercf/lib/select.g" S0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
M98 P"ercf/lib/select.g" S1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
M98 P"ercf/lib/select.g" S2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
M98 P"ercf/lib/select.g" S3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
M98 P"ercf/lib/select.g" S4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
M98 P"ercf/lib/select.g" S5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
M98 P"ercf/lib/pulse-counting.g" | ||
echo >{global.ercf_tmp_file} "G92 " ^ global.ercf_extruder_axis ^ "0" | ||
echo >>{global.ercf_tmp_file} "G1 F100 " ^ global.ercf_extruder_axis ^ "2" | ||
echo >>{global.ercf_tmp_file} "M400" | ||
echo >>{global.ercf_tmp_file} "G1 F100 " ^ global.ercf_extruder_axis ^ "-2" | ||
echo >>{global.ercf_tmp_file} "M400" | ||
echo >>{global.ercf_tmp_file} "M84 " ^ global.ercf_extruder_axis | ||
|
||
|
||
G91 | ||
M98 P"ercf/lib/execute-tmp.g" | ||
G90 | ||
M98 P"ercf/lib/filament-sensing.g" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
M280 P{global.ercf_servo_num} S{global.ercf_servo_disengage} | ||
G4 P100 | ||
M400 | ||
M42 P{global.ercf_servo_num} S0 | ||
set global.ercf_servo_engaged = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
if !global.ercf_servo_engaged | ||
M280 P{global.ercf_servo_num} S{global.ercf_servo_engage} | ||
G4 P200 | ||
M98 P"ercf/lib/buzz.g" | ||
M400 | ||
M42 P{global.ercf_servo_num} S0 | ||
|
||
set global.ercf_servo_engaged = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
M98 P{global.ercf_tmp_file} | ||
M30 {"/sys/" ^ global.ercf_tmp_file} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
M591 D0 S0 P0 | ||
M581 T{global.ercf_encoder_trigger} P-1 | ||
M950 J{global.ercf_encoder_trigger} C"nil" | ||
M30 {"/sys/" ^ "trigger" ^ global.ercf_encoder_trigger ^ ".g"} | ||
M591 D0 P7 C{global.ercf_encoder_pin} S1 R70:700 E{global.ercf_pulse_distance * 3} A0 L{global.ercf_pulse_distance} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
if !exists(global.ercf_settings_loaded) | ||
global ercf_settings_loaded = 1 | ||
global ercf_selector_axis = "X" | ||
global ercf_selector_current = 750 | ||
global ercf_selector_axis_min = 0 | ||
global ercf_selector_axis_max = 115 | ||
global ercf_selector_steps = 80 | ||
global ercf_extruder_axis = "E" | ||
global ercf_extruder_steps = 574.28 | ||
global ercf_extruder_current = 700 | ||
global ercf_servo_pin = "exp.heater3" | ||
global ercf_servo_num = 0 | ||
global ercf_servo_disengage = 0 | ||
global ercf_servo_engage = 90 | ||
global ercf_servo_engaged = false | ||
global ercf_slot0_pos = 2 | ||
global ercf_slot1_pos = 23 | ||
global ercf_slot2_pos = 45 | ||
global ercf_slot3_pos = 71 | ||
global ercf_slot4_pos = 92 | ||
global ercf_slot5_pos = 113 | ||
global ercf_pulse_count = 0 | ||
global ercf_pulse_distance = 1.43 | ||
global ercf_encoder_trigger = 2 | ||
global ercf_encoder_pin = "e0stop" | ||
global ercf_tmp_file = "ercf/lib/tmp.g" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
if exists(global.ercf_servo_engaged) && global.ercf_servo_engaged | ||
abort "Cannot home while servo engaged" | ||
|
||
echo >{global.ercf_tmp_file} "G1 H1 F6000 " ^ global.ercf_selector_axis ^ "-355" | ||
echo >>{global.ercf_tmp_file} "G1 F6000 " ^ global.ercf_selector_axis ^ "5" | ||
echo >>{global.ercf_tmp_file} "G1 H1 F360 " ^ global.ercf_selector_axis ^ "-355" | ||
echo >>{global.ercf_tmp_file} "M84 " ^ global.ercf_selector_axis | ||
|
||
G91 ; relative positioning | ||
M98 P"ercf/lib/execute-tmp.g" | ||
G90 ; absolute positioning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
M98 P"ercf/lib/globals.g" | ||
M98 P"ercf/settings.g" | ||
M950 S{global.ercf_servo_num} C{global.ercf_servo_pin} | ||
echo >{global.ercf_tmp_file} "M906 " ^ global.ercf_extruder_axis ^ global.ercf_extruder_current ^ " " ^ global.ercf_selector_axis ^ global.ercf_selector_current | ||
echo >>{global.ercf_tmp_file} "M92 " ^ global.ercf_extruder_axis ^ global.ercf_extruder_steps ^ " " ^ global.ercf_selector_axis ^ global.ercf_selector_steps | ||
echo >>{global.ercf_tmp_file} "M208 S1 " ^ global.ercf_selector_axis ^ global.ercf_selector_axis_min ^ " " ^ global.ercf_extruder_axis ^ "-9999" | ||
echo >>{global.ercf_tmp_file} "M208 S0 " ^ global.ercf_selector_axis ^ global.ercf_selector_axis_max ^ " " ^ global.ercf_extruder_axis ^ "9999" | ||
M98 P"ercf/lib/execute-tmp.g" | ||
M591 D0 S0 P0 | ||
M950 J{global.ercf_encoder_trigger} C"nil" | ||
M98 P"ercf/lib/filament-sensing.g" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
set global.ercf_pulse_count = 0 | ||
|
||
; disassociate the pin first | ||
M950 J{global.ercf_encoder_trigger} C"nil" | ||
M591 D0 S0 P0 | ||
M581 T{global.ercf_encoder_trigger} P-1 | ||
|
||
M950 J{global.ercf_encoder_trigger} C{global.ercf_encoder_pin} | ||
M581 T{global.ercf_encoder_trigger} P{global.ercf_encoder_trigger} | ||
echo >{"trigger" ^ global.ercf_encoder_trigger ^ ".g"} "set global.ercf_pulse_count = global.ercf_pulse_count + 1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
if !exists(param.S) | ||
abort "No Slot selected" | ||
|
||
if exists(global.ercf_servo_engaged) && global.ercf_servo_engaged | ||
abort "Cannot select while servo engaged" | ||
|
||
var axis = -1 | ||
|
||
while var.axis == -1 | ||
if iterations >= #move.axes | ||
break | ||
if move.axes[iterations].letter == global.ercf_selector_axis | ||
set var.axis = iterations | ||
|
||
if var.axis == -1 | ||
abort "Cannot find selector axis" | ||
|
||
var slot_position = 0 | ||
if param.S == 0 | ||
set var.slot_position = global.ercf_slot0_pos | ||
elif param.S == 1 | ||
set var.slot_position = global.ercf_slot1_pos | ||
elif param.S == 2 | ||
set var.slot_position = global.ercf_slot2_pos | ||
elif param.S == 3 | ||
set var.slot_position = global.ercf_slot3_pos | ||
elif param.S == 4 | ||
set var.slot_position = global.ercf_slot4_pos | ||
elif param.S == 5 | ||
set var.slot_position = global.ercf_slot5_pos | ||
else | ||
abort {"Invalid slot selected: " ^ param.S} | ||
|
||
echo >{global.ercf_tmp_file} "G92 " ^ global.ercf_selector_axis ^ move.axes[var.axis].userPosition | ||
echo >>{global.ercf_tmp_file} "G1 F6000 " ^ global.ercf_selector_axis ^ var.slot_position | ||
echo >>{global.ercf_tmp_file} "M84 " ^ global.ercf_selector_axis | ||
M98 P"ercf/lib/execute-tmp.g" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
M98 P"ercf/lib/pulse-counting.g" | ||
|
||
var pulse_count = global.ercf_pulse_count | ||
var retracted = false | ||
|
||
echo >{global.ercf_tmp_file} "G92 " ^ global.ercf_extruder_axis ^ "0" | ||
echo >>{global.ercf_tmp_file} "G1 F2400 " ^ global.ercf_extruder_axis ^ "-1.5" | ||
echo >>{global.ercf_tmp_file} "M400" | ||
|
||
G91 | ||
M98 P{global.ercf_tmp_file} | ||
while var.pulse_count != global.ercf_pulse_count | ||
set var.pulse_count = global.ercf_pulse_count | ||
set var.retracted = true | ||
M98 P{global.ercf_tmp_file} | ||
|
||
if var.retracted | ||
echo >{global.ercf_tmp_file} "G1 F2400 " ^ global.ercf_extruder_axis ^ "-11" | ||
echo >>{global.ercf_tmp_file} "G92 " ^ global.ercf_extruder_axis ^ "0" | ||
echo >>{global.ercf_tmp_file} "M84 " ^ global.ercf_extruder_axis | ||
M98 P"ercf/lib/execute-tmp.g" | ||
|
||
G90 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
set global.ercf_servo_disengage = 0 | ||
set global.ercf_servo_engage = 90 | ||
set global.ercf_extruder_axis = "Y" |