mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-12-16 05:09:56 +01:00
generic_cartesian: Added option 'axis' for primary carriages
This also enables arbitrary using names for primary carriages with generic_cartesian kinematics. Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
This commit is contained in:
committed by
KevinOConnor
parent
0ba01beaa8
commit
79189203e2
@@ -7,36 +7,39 @@
|
|||||||
|
|
||||||
# See docs/Config_Reference.md for a description of parameters.
|
# See docs/Config_Reference.md for a description of parameters.
|
||||||
|
|
||||||
[carriage x]
|
[carriage carriage_x]
|
||||||
|
axis: x
|
||||||
position_endstop: 0
|
position_endstop: 0
|
||||||
position_max: 300
|
position_max: 300
|
||||||
homing_speed: 50
|
homing_speed: 50
|
||||||
endstop_pin: ^PE5
|
endstop_pin: ^PE5
|
||||||
|
|
||||||
[carriage y]
|
[carriage carriage_y]
|
||||||
|
axis: y
|
||||||
position_endstop: 0
|
position_endstop: 0
|
||||||
position_max: 200
|
position_max: 200
|
||||||
homing_speed: 50
|
homing_speed: 50
|
||||||
endstop_pin: ^PJ1
|
endstop_pin: ^PJ1
|
||||||
|
|
||||||
[extra_carriage y1]
|
[extra_carriage carriage_y1]
|
||||||
primary_carriage: y
|
primary_carriage: carriage_y
|
||||||
endstop_pin: ^PB6
|
endstop_pin: ^PB6
|
||||||
|
|
||||||
[carriage z]
|
[carriage carriage_z]
|
||||||
|
axis: z
|
||||||
position_endstop: 0.5
|
position_endstop: 0.5
|
||||||
position_max: 100
|
position_max: 100
|
||||||
endstop_pin: ^PD3
|
endstop_pin: ^PD3
|
||||||
|
|
||||||
[dual_carriage u]
|
[dual_carriage carriage_u]
|
||||||
primary_carriage: x
|
primary_carriage: carriage_x
|
||||||
position_endstop: 300
|
position_endstop: 300
|
||||||
position_max: 300
|
position_max: 300
|
||||||
homing_speed: 50
|
homing_speed: 50
|
||||||
endstop_pin: ^PE4
|
endstop_pin: ^PE4
|
||||||
|
|
||||||
[stepper my_stepper_x]
|
[stepper my_stepper_x]
|
||||||
carriages: x+y
|
carriages: carriage_x+carriage_y
|
||||||
step_pin: PF0
|
step_pin: PF0
|
||||||
dir_pin: PF1
|
dir_pin: PF1
|
||||||
enable_pin: !PD7
|
enable_pin: !PD7
|
||||||
@@ -44,7 +47,7 @@ microsteps: 16
|
|||||||
rotation_distance: 40
|
rotation_distance: 40
|
||||||
|
|
||||||
[stepper my_stepper_u]
|
[stepper my_stepper_u]
|
||||||
carriages: u-y1
|
carriages: carriage_u-carriage_y1
|
||||||
step_pin: PH1
|
step_pin: PH1
|
||||||
dir_pin: PH0
|
dir_pin: PH0
|
||||||
enable_pin: !PA1
|
enable_pin: !PA1
|
||||||
@@ -52,7 +55,7 @@ microsteps: 16
|
|||||||
rotation_distance: 40
|
rotation_distance: 40
|
||||||
|
|
||||||
[stepper my_stepper_y0]
|
[stepper my_stepper_y0]
|
||||||
carriages: y
|
carriages: carriage_y
|
||||||
step_pin: PF6
|
step_pin: PF6
|
||||||
dir_pin: !PF7
|
dir_pin: !PF7
|
||||||
enable_pin: !PF2
|
enable_pin: !PF2
|
||||||
@@ -60,7 +63,7 @@ microsteps: 16
|
|||||||
rotation_distance: 40
|
rotation_distance: 40
|
||||||
|
|
||||||
[stepper my_stepper_y1]
|
[stepper my_stepper_y1]
|
||||||
carriages: y1
|
carriages: carriage_y1
|
||||||
step_pin: PE3
|
step_pin: PE3
|
||||||
dir_pin: !PH6
|
dir_pin: !PH6
|
||||||
enable_pin: !PG5
|
enable_pin: !PG5
|
||||||
@@ -68,7 +71,7 @@ microsteps: 16
|
|||||||
rotation_distance: 40
|
rotation_distance: 40
|
||||||
|
|
||||||
[stepper my_stepper_z0]
|
[stepper my_stepper_z0]
|
||||||
carriages: z
|
carriages: carriage_z
|
||||||
step_pin: PL3
|
step_pin: PL3
|
||||||
dir_pin: PL1
|
dir_pin: PL1
|
||||||
enable_pin: !PK0
|
enable_pin: !PK0
|
||||||
@@ -76,7 +79,7 @@ microsteps: 16
|
|||||||
rotation_distance: 8
|
rotation_distance: 8
|
||||||
|
|
||||||
[stepper my_stepper_z1]
|
[stepper my_stepper_z1]
|
||||||
carriages: z
|
carriages: carriage_z
|
||||||
step_pin: PG1
|
step_pin: PG1
|
||||||
dir_pin: PG0
|
dir_pin: PG0
|
||||||
enable_pin: !PH3
|
enable_pin: !PH3
|
||||||
|
|||||||
@@ -3,28 +3,30 @@
|
|||||||
|
|
||||||
# See docs/Config_Reference.md for a description of parameters.
|
# See docs/Config_Reference.md for a description of parameters.
|
||||||
|
|
||||||
[carriage x]
|
[carriage carriage_x]
|
||||||
|
axis: x
|
||||||
position_endstop: 0
|
position_endstop: 0
|
||||||
position_max: 300
|
position_max: 300
|
||||||
homing_speed: 50
|
homing_speed: 50
|
||||||
endstop_pin: ^PE5
|
endstop_pin: ^PE5
|
||||||
|
|
||||||
[carriage y]
|
[carriage carriage_y]
|
||||||
|
axis: y
|
||||||
position_endstop: 0
|
position_endstop: 0
|
||||||
position_max: 200
|
position_max: 200
|
||||||
homing_speed: 50
|
homing_speed: 50
|
||||||
endstop_pin: ^PJ1
|
endstop_pin: ^PJ1
|
||||||
|
|
||||||
[dual_carriage u]
|
[dual_carriage carriage_u]
|
||||||
primary_carriage: x
|
primary_carriage: carriage_x
|
||||||
safe_distance: 70
|
safe_distance: 70
|
||||||
position_endstop: 300
|
position_endstop: 300
|
||||||
position_max: 300
|
position_max: 300
|
||||||
homing_speed: 50
|
homing_speed: 50
|
||||||
endstop_pin: ^PE4
|
endstop_pin: ^PE4
|
||||||
|
|
||||||
[dual_carriage v]
|
[dual_carriage carriage_v]
|
||||||
primary_carriage: y
|
primary_carriage: carriage_y
|
||||||
safe_distance: 50
|
safe_distance: 50
|
||||||
position_endstop: 200
|
position_endstop: 200
|
||||||
position_max: 200
|
position_max: 200
|
||||||
@@ -32,7 +34,7 @@ homing_speed: 50
|
|||||||
endstop_pin: ^PD4
|
endstop_pin: ^PD4
|
||||||
|
|
||||||
[stepper a]
|
[stepper a]
|
||||||
carriages: x+y
|
carriages: carriage_x+carriage_y
|
||||||
step_pin: PF0
|
step_pin: PF0
|
||||||
dir_pin: PF1
|
dir_pin: PF1
|
||||||
enable_pin: !PD7
|
enable_pin: !PD7
|
||||||
@@ -40,7 +42,7 @@ microsteps: 16
|
|||||||
rotation_distance: 40
|
rotation_distance: 40
|
||||||
|
|
||||||
[stepper b]
|
[stepper b]
|
||||||
carriages: u-v
|
carriages: carriage_u-carriage_v
|
||||||
step_pin: PH1
|
step_pin: PH1
|
||||||
dir_pin: PH0
|
dir_pin: PH0
|
||||||
enable_pin: !PA1
|
enable_pin: !PA1
|
||||||
@@ -48,7 +50,7 @@ microsteps: 16
|
|||||||
rotation_distance: 40
|
rotation_distance: 40
|
||||||
|
|
||||||
[stepper c]
|
[stepper c]
|
||||||
carriages: x-y
|
carriages: carriage_x-carriage_y
|
||||||
step_pin: PF6
|
step_pin: PF6
|
||||||
dir_pin: !PF7
|
dir_pin: !PF7
|
||||||
enable_pin: !PF2
|
enable_pin: !PF2
|
||||||
@@ -56,7 +58,7 @@ microsteps: 16
|
|||||||
rotation_distance: 40
|
rotation_distance: 40
|
||||||
|
|
||||||
[stepper d]
|
[stepper d]
|
||||||
carriages: u+v
|
carriages: carriage_u+carriage_v
|
||||||
step_pin: PE3
|
step_pin: PE3
|
||||||
dir_pin: !PH6
|
dir_pin: !PH6
|
||||||
enable_pin: !PG5
|
enable_pin: !PG5
|
||||||
@@ -83,8 +85,8 @@ max_temp: 250
|
|||||||
|
|
||||||
[gcode_macro PARK_extruder]
|
[gcode_macro PARK_extruder]
|
||||||
gcode:
|
gcode:
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=x
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_x
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=y
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_y
|
||||||
G90
|
G90
|
||||||
G1 X0 Y0
|
G1 X0 Y0
|
||||||
|
|
||||||
@@ -92,8 +94,8 @@ gcode:
|
|||||||
gcode:
|
gcode:
|
||||||
PARK_{printer.toolhead.extruder}
|
PARK_{printer.toolhead.extruder}
|
||||||
ACTIVATE_EXTRUDER EXTRUDER=extruder
|
ACTIVATE_EXTRUDER EXTRUDER=extruder
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=x
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_x
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=y
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_y
|
||||||
|
|
||||||
[extruder1]
|
[extruder1]
|
||||||
step_pin: PC1
|
step_pin: PC1
|
||||||
@@ -115,8 +117,8 @@ max_temp: 250
|
|||||||
|
|
||||||
[gcode_macro PARK_extruder1]
|
[gcode_macro PARK_extruder1]
|
||||||
gcode:
|
gcode:
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=u
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_u
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=v
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_v
|
||||||
G90
|
G90
|
||||||
G1 X300 Y200
|
G1 X300 Y200
|
||||||
|
|
||||||
@@ -124,35 +126,35 @@ gcode:
|
|||||||
gcode:
|
gcode:
|
||||||
PARK_{printer.toolhead.extruder}
|
PARK_{printer.toolhead.extruder}
|
||||||
ACTIVATE_EXTRUDER EXTRUDER=extruder1
|
ACTIVATE_EXTRUDER EXTRUDER=extruder1
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=u
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_u
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=v
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_v
|
||||||
|
|
||||||
# A helper script to activate copy mode
|
# A helper script to activate copy mode
|
||||||
[gcode_macro ACTIVATE_COPY_MODE]
|
[gcode_macro ACTIVATE_COPY_MODE]
|
||||||
gcode:
|
gcode:
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=x MODE=PRIMARY
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_x MODE=PRIMARY
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=y MODE=PRIMARY
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_y MODE=PRIMARY
|
||||||
G1 X0 Y0
|
G1 X0 Y0
|
||||||
ACTIVATE_EXTRUDER EXTRUDER=extruder
|
ACTIVATE_EXTRUDER EXTRUDER=extruder
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=u MODE=PRIMARY
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_u MODE=PRIMARY
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=v MODE=PRIMARY
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_v MODE=PRIMARY
|
||||||
G1 X150 Y100
|
G1 X150 Y100
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=u MODE=COPY
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_u MODE=COPY
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=v MODE=COPY
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_v MODE=COPY
|
||||||
SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=extruder
|
SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=extruder
|
||||||
|
|
||||||
# A helper script to activate mirror mode
|
# A helper script to activate mirror mode
|
||||||
[gcode_macro ACTIVATE_MIRROR_MODE]
|
[gcode_macro ACTIVATE_MIRROR_MODE]
|
||||||
gcode:
|
gcode:
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=x MODE=PRIMARY
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_x MODE=PRIMARY
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=y MODE=PRIMARY
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_y MODE=PRIMARY
|
||||||
G1 X0 Y0
|
G1 X0 Y0
|
||||||
ACTIVATE_EXTRUDER EXTRUDER=extruder
|
ACTIVATE_EXTRUDER EXTRUDER=extruder
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=u MODE=PRIMARY
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_u MODE=PRIMARY
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=v MODE=PRIMARY
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_v MODE=PRIMARY
|
||||||
G1 X300 Y100
|
G1 X300 Y100
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=u MODE=MIRROR
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_u MODE=MIRROR
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=v MODE=COPY
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_v MODE=COPY
|
||||||
SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=extruder
|
SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=extruder
|
||||||
|
|
||||||
[printer]
|
[printer]
|
||||||
@@ -169,9 +171,9 @@ max_z_accel: 100
|
|||||||
#[delayed_gcode init_shaper]
|
#[delayed_gcode init_shaper]
|
||||||
#initial_duration: 0.1
|
#initial_duration: 0.1
|
||||||
#gcode:
|
#gcode:
|
||||||
# SET_DUAL_CARRIAGE CARRIAGE=u
|
# SET_DUAL_CARRIAGE CARRIAGE=carriage_u
|
||||||
# SET_DUAL_CARRIAGE CARRIAGE=v
|
# SET_DUAL_CARRIAGE CARRIAGE=carriage_v
|
||||||
# SET_INPUT_SHAPER SHAPER_TYPE_X=<dual_carriage_x_shaper> SHAPER_FREQ_X=<dual_carriage_x_freq> SHAPER_TYPE_Y=<dual_carriage_y_shaper> SHAPER_FREQ_Y=<dual_carriage_y_freq>
|
# SET_INPUT_SHAPER SHAPER_TYPE_X=<carriage_u_shaper> SHAPER_FREQ_X=<carriage_u_freq> SHAPER_TYPE_Y=<carriage_v_shaper> SHAPER_FREQ_Y=<carriage_v_freq>
|
||||||
# SET_DUAL_CARRIAGE CARRIAGE=x MODE=PRIMARY
|
# SET_DUAL_CARRIAGE CARRIAGE=carriage_x MODE=PRIMARY
|
||||||
# SET_DUAL_CARRIAGE CARRIAGE=y MODE=PRIMARY
|
# SET_DUAL_CARRIAGE CARRIAGE=carriage_y MODE=PRIMARY
|
||||||
# SET_INPUT_SHAPER SHAPER_TYPE_X=<primary_carriage_x_shaper> SHAPER_FREQ_X=<primary_carriage_x_freq> SHAPER_TYPE_Y=<primary_carriage_y_shaper> SHAPER_FREQ_Y=<primary_carriage_y_freq>
|
# SET_INPUT_SHAPER SHAPER_TYPE_X=<carriage_x_shaper> SHAPER_FREQ_X=<carriage_x_freq> SHAPER_TYPE_Y=<carriage_y_shaper> SHAPER_FREQ_Y=<carriage_y_freq>
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ All dates in this document are approximate.
|
|||||||
|
|
||||||
## Changes
|
## Changes
|
||||||
|
|
||||||
|
20251122: An option `axis` has been added to `[carriage <name>]` sections
|
||||||
|
for `generic_cartesian` kinematics, allowing arbitrary names for primary
|
||||||
|
carriages. Users are encouraged to explicitly specify `axis` option now.
|
||||||
|
|
||||||
20251106: The status fields `{printer.toolhead.position}`,
|
20251106: The status fields `{printer.toolhead.position}`,
|
||||||
`{printer.gcode_move.position}`,
|
`{printer.gcode_move.position}`,
|
||||||
`{printer.gcode_move.gcode_position}`, and
|
`{printer.gcode_move.gcode_position}`, and
|
||||||
|
|||||||
@@ -743,10 +743,12 @@ max_accel:
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Then a user must define the following three carriages: `[carriage x]`,
|
Then a user must define three carriages for X, Y, and Z axes, e.g.:
|
||||||
`[carriage y]`, and `[carriage z]`, e.g.
|
|
||||||
```
|
```
|
||||||
[carriage x]
|
[carriage carriage_x]
|
||||||
|
axis:
|
||||||
|
# Axis of a carriage, either x, y, or z. This parameter must be provided,
|
||||||
|
# unless a carriage name is x, y, or z itself.
|
||||||
endstop_pin:
|
endstop_pin:
|
||||||
# Endstop switch detection pin. If this endstop pin is on a
|
# Endstop switch detection pin. If this endstop pin is on a
|
||||||
# different mcu than the stepper motor(s) moving this carriage,
|
# different mcu than the stepper motor(s) moving this carriage,
|
||||||
@@ -788,7 +790,8 @@ for instance
|
|||||||
carriages:
|
carriages:
|
||||||
# A string describing the carriages the stepper moves. All defined
|
# A string describing the carriages the stepper moves. All defined
|
||||||
# carriages can be specified here, as well as their linear combinations,
|
# carriages can be specified here, as well as their linear combinations,
|
||||||
# e.g. x, x+y, y-0.5*z, x-z, etc. This parameter must be provided.
|
# e.g. carriage_x, carriage_x+carriage_y, carriage_y-0.5*carriage_z,
|
||||||
|
# carriage_x-carriage_z, etc. This parameter must be provided.
|
||||||
step_pin:
|
step_pin:
|
||||||
dir_pin:
|
dir_pin:
|
||||||
enable_pin:
|
enable_pin:
|
||||||
@@ -800,28 +803,29 @@ microsteps:
|
|||||||
```
|
```
|
||||||
See [stepper](#stepper) section for more information on the regular
|
See [stepper](#stepper) section for more information on the regular
|
||||||
stepper parameters. The `carriages` parameter defines how the stepper
|
stepper parameters. The `carriages` parameter defines how the stepper
|
||||||
affects the motion of the carriages. For example, `x+y` indicates that
|
affects the motion of the carriages. For example, `carriage_x+carriage_y`
|
||||||
the motion of the stepper in the positive direction by the distance `d`
|
indicates that the motion of the stepper in the positive direction by the
|
||||||
moves the carriages `x` and `y` by the same distance `d` in the positive
|
distance `d` moves the carriages `carriage_x` and `carriage_y` by the same
|
||||||
direction, while `x-0.5*y` means the motion of the stepper in the positive
|
distance `d` in the positive direction, while `carriage_x-0.5*carriage_y`
|
||||||
direction by the distance `d` moves the carriage `x` by the distance `d`
|
means the motion of the stepper in the positive direction by the distance
|
||||||
in the positive direction, but the carriage `y` will travel distance `d/2`
|
`d` moves the carriage `carriage_x` by the distance `d` in the positive
|
||||||
in the negative direction.
|
direction, but the carriage `carriage_y` will travel distance `d/2` in
|
||||||
|
the negative direction.
|
||||||
|
|
||||||
More than a single stepper motor can be defined to drive the same axis
|
More than a single stepper motor can be defined to drive the same axis
|
||||||
or belt. For example, on a CoreXY AWD setups two motors driving the same
|
or belt. For example, on a CoreXY AWD setups two motors driving the same
|
||||||
belt can be defined as
|
belt can be defined as
|
||||||
```
|
```
|
||||||
[carriage x]
|
[carriage carriage_x]
|
||||||
endstop_pin: ...
|
endstop_pin: ...
|
||||||
...
|
...
|
||||||
|
|
||||||
[carriage y]
|
[carriage carriage_y]
|
||||||
endstop_pin: ...
|
endstop_pin: ...
|
||||||
...
|
...
|
||||||
|
|
||||||
[stepper a0]
|
[stepper a0]
|
||||||
carriages: x-y
|
carriages: carriage_x-carriage_y
|
||||||
step_pin: ...
|
step_pin: ...
|
||||||
dir_pin: ...
|
dir_pin: ...
|
||||||
enable_pin: ...
|
enable_pin: ...
|
||||||
@@ -829,7 +833,7 @@ rotation_distance: ...
|
|||||||
...
|
...
|
||||||
|
|
||||||
[stepper a1]
|
[stepper a1]
|
||||||
carriages: x-y
|
carriages: carriage_x-carriage_y
|
||||||
step_pin: ...
|
step_pin: ...
|
||||||
dir_pin: ...
|
dir_pin: ...
|
||||||
enable_pin: ...
|
enable_pin: ...
|
||||||
@@ -842,7 +846,7 @@ sharing the same `carriages` and corresponding endstops.
|
|||||||
There are situations when a user wants to have more than one endstop
|
There are situations when a user wants to have more than one endstop
|
||||||
per axis. Examples of such configurations include Y axis driven by
|
per axis. Examples of such configurations include Y axis driven by
|
||||||
two independent stepper motors with belts attached to both ends of the
|
two independent stepper motors with belts attached to both ends of the
|
||||||
X beam, with effectively two carriages on Y axis each having an
|
X gantry, with effectively two carriages on Y axis each having an
|
||||||
independent endstop, and multi-stepper Z axis with each stepper having
|
independent endstop, and multi-stepper Z axis with each stepper having
|
||||||
its own endstop (not to be confused with the configurations with
|
its own endstop (not to be confused with the configurations with
|
||||||
multiple Z motors but only a single endstop). These configurations
|
multiple Z motors but only a single endstop). These configurations
|
||||||
@@ -860,12 +864,12 @@ endstop_pin:
|
|||||||
|
|
||||||
and the corresponding stepper motors, for example:
|
and the corresponding stepper motors, for example:
|
||||||
```
|
```
|
||||||
[extra_carriage y1]
|
[extra_carriage carriage_y1]
|
||||||
primary_carriage: y
|
primary_carriage: carriage_y
|
||||||
endstop_pin: ...
|
endstop_pin: ...
|
||||||
|
|
||||||
[stepper sy1]
|
[stepper sy1]
|
||||||
carriages: y1
|
carriages: carriage_y1
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
Notably, an `[extra_carriage]` does not define parameters such as
|
Notably, an `[extra_carriage]` does not define parameters such as
|
||||||
@@ -2450,7 +2454,7 @@ from the configuration described above:
|
|||||||
[dual_carriage my_dc_carriage]
|
[dual_carriage my_dc_carriage]
|
||||||
primary_carriage:
|
primary_carriage:
|
||||||
# Defines the matching primary carriage of this dual carriage and
|
# Defines the matching primary carriage of this dual carriage and
|
||||||
# the corresponding IDEX axis. Valid choices are x, y, z.
|
# the corresponding IDEX axis. Must match a name of a defined `[carriage]`.
|
||||||
# This parameter must be provided.
|
# This parameter must be provided.
|
||||||
#safe_distance:
|
#safe_distance:
|
||||||
# The minimum distance (in mm) to enforce between the dual and the primary
|
# The minimum distance (in mm) to enforce between the dual and the primary
|
||||||
@@ -2478,18 +2482,18 @@ on the regular `carriage` parameters.
|
|||||||
Then a user must define one or more stepper motors moving the dual carriage
|
Then a user must define one or more stepper motors moving the dual carriage
|
||||||
(and other carriages as appropriate), for instance
|
(and other carriages as appropriate), for instance
|
||||||
```
|
```
|
||||||
[carriage x]
|
[carriage carriage_x]
|
||||||
...
|
...
|
||||||
|
|
||||||
[carriage y]
|
[carriage carriage_y]
|
||||||
...
|
...
|
||||||
|
|
||||||
[dual_carriage u]
|
[dual_carriage carriage_u]
|
||||||
primary_carriage: x
|
primary_carriage: carriage_x
|
||||||
...
|
...
|
||||||
|
|
||||||
[stepper dc_stepper]
|
[stepper dc_stepper]
|
||||||
carriages: u-y
|
carriages: carriage_u-carriage_y
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -2505,14 +2509,14 @@ example above:
|
|||||||
[delayed_gcode init_shaper]
|
[delayed_gcode init_shaper]
|
||||||
initial_duration: 0.1
|
initial_duration: 0.1
|
||||||
gcode:
|
gcode:
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=u
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_u
|
||||||
SET_INPUT_SHAPER SHAPER_TYPE_X=<dual_carriage_x_shaper> SHAPER_FREQ_X=<dual_carriage_x_freq> SHAPER_TYPE_Y=<y_shaper> SHAPER_FREQ_Y=<y_freq>
|
SET_INPUT_SHAPER SHAPER_TYPE_X=<carriage_u_shaper> SHAPER_FREQ_X=<carriage_x_freq> SHAPER_TYPE_Y=<carriage_y_shaper> SHAPER_FREQ_Y=<carriage_y_freq>
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=x
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_x
|
||||||
SET_INPUT_SHAPER SHAPER_TYPE_X=<primary_carriage_x_shaper> SHAPER_FREQ_X=<primary_carriage_x_freq> SHAPER_TYPE_Y=<y_shaper> SHAPER_FREQ_Y=<y_freq>
|
SET_INPUT_SHAPER SHAPER_TYPE_X=<carriage_x_shaper> SHAPER_FREQ_X=<carriage_x_freq> SHAPER_TYPE_Y=<carriage_y_shaper> SHAPER_FREQ_Y=<carriage_y_freq>
|
||||||
```
|
```
|
||||||
Note that `SHAPER_TYPE_Y` and `SHAPER_FREQ_Y` must be the same in both
|
Note that `SHAPER_TYPE_Y` and `SHAPER_FREQ_Y` must be the same in both
|
||||||
commands in this case, since the same motors drive Y axis when either
|
commands in this case, since the same motors drive Y axis when either
|
||||||
of the `x` and `u` carriages are active.
|
of the `carriage_x` and `carriage_u` carriages are active.
|
||||||
|
|
||||||
It is worth noting that `generic_cartesian` kinematic can support two
|
It is worth noting that `generic_cartesian` kinematic can support two
|
||||||
dual carriages for X and Y axes. For reference, see for instance a
|
dual carriages for X and Y axes. For reference, see for instance a
|
||||||
|
|||||||
@@ -753,11 +753,11 @@ stepper at a time, some sequences of changes can lead to invalid
|
|||||||
intermediate kinematic configurations, even if the final configuration
|
intermediate kinematic configurations, even if the final configuration
|
||||||
is valid. In such cases a user can pass `DISABLE_CHECKS=1` parameters to
|
is valid. In such cases a user can pass `DISABLE_CHECKS=1` parameters to
|
||||||
all but the last command to disable intermediate checks. For example,
|
all but the last command to disable intermediate checks. For example,
|
||||||
if `stepper a` and `stepper b` initially have `x-y` and `x+y` carriages
|
if `stepper a` and `stepper b` initially have `carriage_x-carriage_y` and
|
||||||
correspondingly, then the following sequence of commands will let a user
|
`carriage_x+carriage_y` carriages correspondingly, then the following
|
||||||
effectively swap the carriage controls:
|
sequence of commands will let a user effectively swap the carriage controls:
|
||||||
`SET_STEPPER_CARRIAGES STEPPER=a CARRIAGES=x+y DISABLE_CHECKS=1`
|
`SET_STEPPER_CARRIAGES STEPPER=a CARRIAGES=carriage_x+carriage_y DISABLE_CHECKS=1`
|
||||||
and `SET_STEPPER_CARRIAGES STEPPER=b CARRIAGES=x-y`, while
|
and `SET_STEPPER_CARRIAGES STEPPER=b CARRIAGES=carriage_x-carriage_y`, while
|
||||||
still validating the final kinematics state.
|
still validating the final kinematics state.
|
||||||
|
|
||||||
### [hall_filament_width_sensor]
|
### [hall_filament_width_sensor]
|
||||||
|
|||||||
@@ -438,6 +438,8 @@ gcode:
|
|||||||
SET_DUAL_CARRIAGE CARRIAGE=0
|
SET_DUAL_CARRIAGE CARRIAGE=0
|
||||||
SET_INPUT_SHAPER SHAPER_TYPE_X=<primary_carriage_shaper> SHAPER_FREQ_X=<primary_carriage_freq> SHAPER_TYPE_Y=<y_shaper> SHAPER_FREQ_Y=<y_freq>
|
SET_INPUT_SHAPER SHAPER_TYPE_X=<primary_carriage_shaper> SHAPER_FREQ_X=<primary_carriage_freq> SHAPER_TYPE_Y=<y_shaper> SHAPER_FREQ_Y=<y_freq>
|
||||||
```
|
```
|
||||||
|
However, users of `generic_cartesian` kinematics should specify carriage names
|
||||||
|
in `CARRIAGE=` parameters of `SET_DUAL_CARRIAGE` instead of their numbers.
|
||||||
Note that `SHAPER_TYPE_Y` and `SHAPER_FREQ_Y` should be the same in both
|
Note that `SHAPER_TYPE_Y` and `SHAPER_FREQ_Y` should be the same in both
|
||||||
commands. If you need to configure an input shaper for Z axis, include
|
commands. If you need to configure an input shaper for Z axis, include
|
||||||
its parameters in both `SET_INPUT_SHAPER` commands.
|
its parameters in both `SET_INPUT_SHAPER` commands.
|
||||||
|
|||||||
@@ -9,8 +9,11 @@ import logging, bisect
|
|||||||
def lookup_z_endstop_config(config):
|
def lookup_z_endstop_config(config):
|
||||||
if config.has_section('stepper_z'):
|
if config.has_section('stepper_z'):
|
||||||
return config.getsection('stepper_z')
|
return config.getsection('stepper_z')
|
||||||
elif config.has_section('carriage z'):
|
for cconfig in config.get_prefix_sections('carriage '):
|
||||||
return config.getsection('carriage z')
|
carriage_name = cconfig.get_name().split()[-1].strip()
|
||||||
|
axis_name = cconfig.get('axis', carriage_name, note_valid=False)
|
||||||
|
if axis_name == 'z':
|
||||||
|
return cconfig
|
||||||
return None
|
return None
|
||||||
|
|
||||||
class ManualProbe:
|
class ManualProbe:
|
||||||
|
|||||||
@@ -32,10 +32,16 @@ def mat_pseudo_inverse(m):
|
|||||||
return pinv
|
return pinv
|
||||||
|
|
||||||
class MainCarriage:
|
class MainCarriage:
|
||||||
def __init__(self, config, axis):
|
def __init__(self, config):
|
||||||
self.rail = stepper.GenericPrinterRail(config)
|
self.rail = stepper.GenericPrinterRail(config)
|
||||||
self.axis = ord(axis) - ord('x')
|
carriage_name = self.rail.get_name(short=True)
|
||||||
self.axis_name = axis
|
valid_axes = ['x', 'y', 'z']
|
||||||
|
if carriage_name in valid_axes:
|
||||||
|
axis_name = config.getchoice('axis', valid_axes, carriage_name)
|
||||||
|
else:
|
||||||
|
axis_name = config.getchoice('axis', valid_axes)
|
||||||
|
self.axis = ord(axis_name) - ord('x')
|
||||||
|
self.axis_name = axis_name
|
||||||
self.dual_carriage = None
|
self.dual_carriage = None
|
||||||
def get_name(self):
|
def get_name(self):
|
||||||
return self.rail.get_name(short=True)
|
return self.rail.get_name(short=True)
|
||||||
@@ -83,7 +89,7 @@ class DualCarriage:
|
|||||||
self.axis = self.primary_carriage.get_axis()
|
self.axis = self.primary_carriage.get_axis()
|
||||||
if self.axis > 1:
|
if self.axis > 1:
|
||||||
raise config.error("Invalid axis '%s' for dual_carriage" %
|
raise config.error("Invalid axis '%s' for dual_carriage" %
|
||||||
self.primary_carriage.get_axis_name())
|
"xyz"[self.axis])
|
||||||
self.safe_dist = config.getfloat('safe_distance', None, minval=0.)
|
self.safe_dist = config.getfloat('safe_distance', None, minval=0.)
|
||||||
def get_name(self):
|
def get_name(self):
|
||||||
return self.rail.get_name(short=True)
|
return self.rail.get_name(short=True)
|
||||||
@@ -146,11 +152,19 @@ class GenericCartesianKinematics:
|
|||||||
self.cmd_SET_STEPPER_CARRIAGES,
|
self.cmd_SET_STEPPER_CARRIAGES,
|
||||||
desc=self.cmd_SET_STEPPER_CARRIAGES_help)
|
desc=self.cmd_SET_STEPPER_CARRIAGES_help)
|
||||||
def _load_kinematics(self, config):
|
def _load_kinematics(self, config):
|
||||||
carriages = {a : MainCarriage(config.getsection('carriage ' + a), a)
|
carriages = {}
|
||||||
for a in 'xyz'}
|
for mcconfig in config.get_prefix_sections('carriage '):
|
||||||
|
c = MainCarriage(mcconfig)
|
||||||
|
axis = c.get_axis()
|
||||||
|
dups = [mc for mc in carriages.values() if mc.get_axis() == axis]
|
||||||
|
if dups:
|
||||||
|
raise config.error(
|
||||||
|
"Axis '%s' referenced by multiple carriages (%s, %s)"
|
||||||
|
% ("xyz"[axis], c.get_name(), dups[0].get_name()))
|
||||||
|
carriages[c.get_name()] = c
|
||||||
dc_carriages = []
|
dc_carriages = []
|
||||||
for c in config.get_prefix_sections('dual_carriage '):
|
for dcconfig in config.get_prefix_sections('dual_carriage '):
|
||||||
dc_carriages.append(DualCarriage(c, carriages))
|
dc_carriages.append(DualCarriage(dcconfig, carriages))
|
||||||
for dc in dc_carriages:
|
for dc in dc_carriages:
|
||||||
name = dc.get_name()
|
name = dc.get_name()
|
||||||
if name in carriages:
|
if name in carriages:
|
||||||
@@ -159,8 +173,8 @@ class GenericCartesianKinematics:
|
|||||||
self.carriages = dict(carriages)
|
self.carriages = dict(carriages)
|
||||||
self.dc_carriages = dc_carriages
|
self.dc_carriages = dc_carriages
|
||||||
ec_carriages = []
|
ec_carriages = []
|
||||||
for c in config.get_prefix_sections('extra_carriage '):
|
for ecconfig in config.get_prefix_sections('extra_carriage '):
|
||||||
ec_carriages.append(ExtraCarriage(c, carriages))
|
ec_carriages.append(ExtraCarriage(ecconfig, carriages))
|
||||||
for ec in ec_carriages:
|
for ec in ec_carriages:
|
||||||
name = ec.get_name()
|
name = ec.get_name()
|
||||||
if name in carriages:
|
if name in carriages:
|
||||||
@@ -193,13 +207,16 @@ class GenericCartesianKinematics:
|
|||||||
def get_steppers(self):
|
def get_steppers(self):
|
||||||
return [s.get_stepper() for s in self.kin_steppers]
|
return [s.get_stepper() for s in self.kin_steppers]
|
||||||
def get_primary_carriages(self):
|
def get_primary_carriages(self):
|
||||||
carriages = [self.carriages[a] for a in "xyz"]
|
carriages = [None] * 3
|
||||||
if self.dc_module:
|
for carriage in self.carriages.values():
|
||||||
for a in self.dc_module.get_axes():
|
a = carriage.get_axis()
|
||||||
|
if carriage.get_dual_carriage() is not None:
|
||||||
primary_rail = self.dc_module.get_primary_rail(a)
|
primary_rail = self.dc_module.get_primary_rail(a)
|
||||||
for c in self.carriages.values():
|
for c in self.carriages.values():
|
||||||
if c.get_rail() == primary_rail:
|
if c.get_rail() == primary_rail:
|
||||||
carriages[a] = c
|
carriages[a] = c
|
||||||
|
else:
|
||||||
|
carriages[a] = carriage
|
||||||
return carriages
|
return carriages
|
||||||
def _get_kinematics_coeffs(self):
|
def _get_kinematics_coeffs(self):
|
||||||
matr = {s.get_name() : list(s.get_kin_coeffs())
|
matr = {s.get_name() : list(s.get_kin_coeffs())
|
||||||
@@ -274,11 +291,14 @@ class GenericCartesianKinematics:
|
|||||||
self._check_kinematics(self.printer.command_error)
|
self._check_kinematics(self.printer.command_error)
|
||||||
# Each axis is homed independently and in order
|
# Each axis is homed independently and in order
|
||||||
for axis in homing_state.get_axes():
|
for axis in homing_state.get_axes():
|
||||||
carriage = self.carriages["xyz"[axis]]
|
for carriage in self.carriages.values():
|
||||||
|
if carriage.get_axis() != axis:
|
||||||
|
continue
|
||||||
if carriage.get_dual_carriage() != None:
|
if carriage.get_dual_carriage() != None:
|
||||||
self.dc_module.home(homing_state, axis)
|
self.dc_module.home(homing_state, axis)
|
||||||
else:
|
else:
|
||||||
self.home_axis(homing_state, axis, carriage.get_rail())
|
self.home_axis(homing_state, axis, carriage.get_rail())
|
||||||
|
break
|
||||||
def _check_endstops(self, move):
|
def _check_endstops(self, move):
|
||||||
end_pos = move.end_pos
|
end_pos = move.end_pos
|
||||||
for i in (0, 1, 2):
|
for i in (0, 1, 2):
|
||||||
|
|||||||
@@ -1,35 +1,38 @@
|
|||||||
# Test config for generic cartesian kinematics with dual carriage
|
# Test config for generic cartesian kinematics with dual carriage
|
||||||
[carriage x]
|
[carriage carriage_x]
|
||||||
|
axis: x
|
||||||
position_endstop: 0
|
position_endstop: 0
|
||||||
position_max: 300
|
position_max: 300
|
||||||
homing_speed: 50
|
homing_speed: 50
|
||||||
endstop_pin: ^PE5
|
endstop_pin: ^PE5
|
||||||
|
|
||||||
[carriage y]
|
[carriage carriage_y]
|
||||||
|
axis: y
|
||||||
position_endstop: 0
|
position_endstop: 0
|
||||||
position_max: 200
|
position_max: 200
|
||||||
homing_speed: 50
|
homing_speed: 50
|
||||||
endstop_pin: ^PJ1
|
endstop_pin: ^PJ1
|
||||||
|
|
||||||
[carriage z]
|
[carriage carriage_z]
|
||||||
|
axis: z
|
||||||
position_endstop: 0.5
|
position_endstop: 0.5
|
||||||
position_max: 100
|
position_max: 100
|
||||||
endstop_pin: ^PD3
|
endstop_pin: ^PD3
|
||||||
|
|
||||||
[extra_carriage z1]
|
[extra_carriage carriage_z1]
|
||||||
primary_carriage: z
|
primary_carriage: carriage_z
|
||||||
endstop_pin: ^PD2
|
endstop_pin: ^PD2
|
||||||
|
|
||||||
[dual_carriage u]
|
[dual_carriage carriage_u]
|
||||||
primary_carriage: x
|
primary_carriage: carriage_x
|
||||||
safe_distance: 70
|
safe_distance: 70
|
||||||
position_endstop: 300
|
position_endstop: 300
|
||||||
position_max: 300
|
position_max: 300
|
||||||
homing_speed: 50
|
homing_speed: 50
|
||||||
endstop_pin: ^PE4
|
endstop_pin: ^PE4
|
||||||
|
|
||||||
[dual_carriage v]
|
[dual_carriage carriage_v]
|
||||||
primary_carriage: y
|
primary_carriage: carriage_y
|
||||||
safe_distance: 50
|
safe_distance: 50
|
||||||
position_endstop: 200
|
position_endstop: 200
|
||||||
position_max: 200
|
position_max: 200
|
||||||
@@ -37,7 +40,7 @@ homing_speed: 50
|
|||||||
endstop_pin: ^PD4
|
endstop_pin: ^PD4
|
||||||
|
|
||||||
[stepper a]
|
[stepper a]
|
||||||
carriages: x+y
|
carriages: carriage_x+carriage_y
|
||||||
step_pin: PF0
|
step_pin: PF0
|
||||||
dir_pin: PF1
|
dir_pin: PF1
|
||||||
enable_pin: !PD7
|
enable_pin: !PD7
|
||||||
@@ -45,7 +48,7 @@ microsteps: 16
|
|||||||
rotation_distance: 40
|
rotation_distance: 40
|
||||||
|
|
||||||
[stepper b]
|
[stepper b]
|
||||||
carriages: u-v
|
carriages: carriage_u-carriage_v
|
||||||
step_pin: PH1
|
step_pin: PH1
|
||||||
dir_pin: PH0
|
dir_pin: PH0
|
||||||
enable_pin: !PA1
|
enable_pin: !PA1
|
||||||
@@ -53,7 +56,7 @@ microsteps: 16
|
|||||||
rotation_distance: 40
|
rotation_distance: 40
|
||||||
|
|
||||||
[stepper c]
|
[stepper c]
|
||||||
carriages: x-y
|
carriages: carriage_x-carriage_y
|
||||||
step_pin: PF6
|
step_pin: PF6
|
||||||
dir_pin: !PF7
|
dir_pin: !PF7
|
||||||
enable_pin: !PF2
|
enable_pin: !PF2
|
||||||
@@ -61,7 +64,7 @@ microsteps: 16
|
|||||||
rotation_distance: 40
|
rotation_distance: 40
|
||||||
|
|
||||||
[stepper d]
|
[stepper d]
|
||||||
carriages: u+v
|
carriages: carriage_u+carriage_v
|
||||||
step_pin: PE3
|
step_pin: PE3
|
||||||
dir_pin: !PH6
|
dir_pin: !PH6
|
||||||
enable_pin: !PG5
|
enable_pin: !PG5
|
||||||
@@ -69,7 +72,7 @@ microsteps: 16
|
|||||||
rotation_distance: 40
|
rotation_distance: 40
|
||||||
|
|
||||||
[stepper z]
|
[stepper z]
|
||||||
carriages: z
|
carriages: carriage_z
|
||||||
step_pin: PL3
|
step_pin: PL3
|
||||||
dir_pin: PL1
|
dir_pin: PL1
|
||||||
enable_pin: !PK0
|
enable_pin: !PK0
|
||||||
@@ -77,7 +80,7 @@ microsteps: 16
|
|||||||
rotation_distance: 8
|
rotation_distance: 8
|
||||||
|
|
||||||
[stepper z1]
|
[stepper z1]
|
||||||
carriages: z1
|
carriages: carriage_z1
|
||||||
step_pin: PG1
|
step_pin: PG1
|
||||||
dir_pin: PG0
|
dir_pin: PG0
|
||||||
enable_pin: !PH3
|
enable_pin: !PH3
|
||||||
@@ -104,8 +107,8 @@ max_temp: 250
|
|||||||
|
|
||||||
[gcode_macro PARK_extruder]
|
[gcode_macro PARK_extruder]
|
||||||
gcode:
|
gcode:
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=x
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_x
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=y
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_y
|
||||||
G90
|
G90
|
||||||
G1 X0 Y0
|
G1 X0 Y0
|
||||||
|
|
||||||
@@ -114,8 +117,8 @@ gcode:
|
|||||||
PARK_{printer.toolhead.extruder}
|
PARK_{printer.toolhead.extruder}
|
||||||
SET_SERVO SERVO=my_servo angle=100
|
SET_SERVO SERVO=my_servo angle=100
|
||||||
ACTIVATE_EXTRUDER EXTRUDER=extruder
|
ACTIVATE_EXTRUDER EXTRUDER=extruder
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=x
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_x
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=y
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_y
|
||||||
|
|
||||||
[extruder1]
|
[extruder1]
|
||||||
step_pin: PC1
|
step_pin: PC1
|
||||||
@@ -137,8 +140,8 @@ max_temp: 250
|
|||||||
|
|
||||||
[gcode_macro PARK_extruder1]
|
[gcode_macro PARK_extruder1]
|
||||||
gcode:
|
gcode:
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=u
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_u
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=v
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_v
|
||||||
G90
|
G90
|
||||||
G1 X300 Y200
|
G1 X300 Y200
|
||||||
|
|
||||||
@@ -147,8 +150,8 @@ gcode:
|
|||||||
PARK_{printer.toolhead.extruder}
|
PARK_{printer.toolhead.extruder}
|
||||||
SET_SERVO SERVO=my_servo angle=50
|
SET_SERVO SERVO=my_servo angle=50
|
||||||
ACTIVATE_EXTRUDER EXTRUDER=extruder1
|
ACTIVATE_EXTRUDER EXTRUDER=extruder1
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=u
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_u
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=v
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_v
|
||||||
|
|
||||||
[servo my_servo]
|
[servo my_servo]
|
||||||
pin: PH4
|
pin: PH4
|
||||||
|
|||||||
@@ -10,12 +10,12 @@ G28
|
|||||||
G1 X10 Y20 F6000
|
G1 X10 Y20 F6000
|
||||||
|
|
||||||
# Activate alternate carriage
|
# Activate alternate carriage
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=u
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_u
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=v
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_v
|
||||||
G1 X170 Y190 F6000
|
G1 X170 Y190 F6000
|
||||||
|
|
||||||
# Go back to main carriage on X axis
|
# Go back to main carriage on X axis
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=x
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_x
|
||||||
G1 X20 F6000
|
G1 X20 F6000
|
||||||
|
|
||||||
# Save dual carriage state
|
# Save dual carriage state
|
||||||
@@ -24,7 +24,7 @@ SAVE_DUAL_CARRIAGE_STATE
|
|||||||
G1 Y150 F6000
|
G1 Y150 F6000
|
||||||
|
|
||||||
# Go back to main carriage on Y axis
|
# Go back to main carriage on Y axis
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=y
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_y
|
||||||
G1 X10 Y50 F6000
|
G1 X10 Y50 F6000
|
||||||
|
|
||||||
# Restore dual carriage state
|
# Restore dual carriage state
|
||||||
|
|||||||
@@ -1,38 +1,41 @@
|
|||||||
# Test config for generic cartesian kinematics with dual carriage
|
# Test config for generic cartesian kinematics with dual carriage
|
||||||
[carriage x]
|
[carriage carriage_x]
|
||||||
|
axis: x
|
||||||
position_endstop: 0
|
position_endstop: 0
|
||||||
position_max: 300
|
position_max: 300
|
||||||
homing_speed: 50
|
homing_speed: 50
|
||||||
endstop_pin: ^PE5
|
endstop_pin: ^PE5
|
||||||
|
|
||||||
[carriage y]
|
[carriage carriage_y]
|
||||||
|
axis: y
|
||||||
position_endstop: 0
|
position_endstop: 0
|
||||||
position_max: 200
|
position_max: 200
|
||||||
homing_speed: 50
|
homing_speed: 50
|
||||||
endstop_pin: ^PJ1
|
endstop_pin: ^PJ1
|
||||||
|
|
||||||
[extra_carriage y1]
|
[extra_carriage carriage_y1]
|
||||||
primary_carriage: y
|
primary_carriage: carriage_y
|
||||||
endstop_pin: ^PB6
|
endstop_pin: ^PB6
|
||||||
|
|
||||||
[carriage z]
|
[carriage carriage_z]
|
||||||
|
axis: z
|
||||||
position_endstop: 0.5
|
position_endstop: 0.5
|
||||||
position_max: 100
|
position_max: 100
|
||||||
endstop_pin: ^PD3
|
endstop_pin: ^PD3
|
||||||
|
|
||||||
[extra_carriage z1]
|
[extra_carriage carriage_z1]
|
||||||
primary_carriage: z
|
primary_carriage: carriage_z
|
||||||
endstop_pin: ^PD2
|
endstop_pin: ^PD2
|
||||||
|
|
||||||
[dual_carriage u]
|
[dual_carriage carriage_u]
|
||||||
primary_carriage: x
|
primary_carriage: carriage_x
|
||||||
position_endstop: 300
|
position_endstop: 300
|
||||||
position_max: 300
|
position_max: 300
|
||||||
homing_speed: 50
|
homing_speed: 50
|
||||||
endstop_pin: ^PE4
|
endstop_pin: ^PE4
|
||||||
|
|
||||||
[stepper stepper_x]
|
[stepper stepper_x]
|
||||||
carriages: x+y
|
carriages: carriage_x+carriage_y
|
||||||
step_pin: PF0
|
step_pin: PF0
|
||||||
dir_pin: PF1
|
dir_pin: PF1
|
||||||
enable_pin: !PD7
|
enable_pin: !PD7
|
||||||
@@ -40,7 +43,7 @@ microsteps: 16
|
|||||||
rotation_distance: 40
|
rotation_distance: 40
|
||||||
|
|
||||||
[stepper dual_carriage]
|
[stepper dual_carriage]
|
||||||
carriages: u-y1
|
carriages: carriage_u-carriage_y1
|
||||||
step_pin: PH1
|
step_pin: PH1
|
||||||
dir_pin: PH0
|
dir_pin: PH0
|
||||||
enable_pin: !PA1
|
enable_pin: !PA1
|
||||||
@@ -48,7 +51,7 @@ microsteps: 16
|
|||||||
rotation_distance: 40
|
rotation_distance: 40
|
||||||
|
|
||||||
[stepper stepper_y]
|
[stepper stepper_y]
|
||||||
carriages: 1*y+0.5*z
|
carriages: 1*carriage_y+0.5*carriage_z
|
||||||
step_pin: PF6
|
step_pin: PF6
|
||||||
dir_pin: !PF7
|
dir_pin: !PF7
|
||||||
enable_pin: !PF2
|
enable_pin: !PF2
|
||||||
@@ -56,7 +59,7 @@ microsteps: 16
|
|||||||
rotation_distance: 40
|
rotation_distance: 40
|
||||||
|
|
||||||
[stepper stepper_y1]
|
[stepper stepper_y1]
|
||||||
carriages: 1*y1-0.5*z1
|
carriages: 1*carriage_y1-0.5*carriage_z1
|
||||||
step_pin: PE3
|
step_pin: PE3
|
||||||
dir_pin: !PH6
|
dir_pin: !PH6
|
||||||
enable_pin: !PG5
|
enable_pin: !PG5
|
||||||
@@ -64,7 +67,7 @@ microsteps: 16
|
|||||||
rotation_distance: 40
|
rotation_distance: 40
|
||||||
|
|
||||||
[stepper stepper_z]
|
[stepper stepper_z]
|
||||||
carriages: z
|
carriages: carriage_z
|
||||||
step_pin: PL3
|
step_pin: PL3
|
||||||
dir_pin: PL1
|
dir_pin: PL1
|
||||||
enable_pin: !PK0
|
enable_pin: !PK0
|
||||||
@@ -72,7 +75,7 @@ microsteps: 16
|
|||||||
rotation_distance: 8
|
rotation_distance: 8
|
||||||
|
|
||||||
[stepper stepper_z1]
|
[stepper stepper_z1]
|
||||||
carriages: z1
|
carriages: carriage_z1
|
||||||
step_pin: PG1
|
step_pin: PG1
|
||||||
dir_pin: PG0
|
dir_pin: PG0
|
||||||
enable_pin: !PH3
|
enable_pin: !PH3
|
||||||
@@ -99,7 +102,7 @@ max_temp: 250
|
|||||||
|
|
||||||
[gcode_macro PARK_extruder]
|
[gcode_macro PARK_extruder]
|
||||||
gcode:
|
gcode:
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=x
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_x
|
||||||
G90
|
G90
|
||||||
G1 X0
|
G1 X0
|
||||||
|
|
||||||
@@ -108,7 +111,7 @@ gcode:
|
|||||||
PARK_{printer.toolhead.extruder}
|
PARK_{printer.toolhead.extruder}
|
||||||
SET_SERVO SERVO=my_servo angle=100
|
SET_SERVO SERVO=my_servo angle=100
|
||||||
ACTIVATE_EXTRUDER EXTRUDER=extruder
|
ACTIVATE_EXTRUDER EXTRUDER=extruder
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=x
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_x
|
||||||
|
|
||||||
[extruder1]
|
[extruder1]
|
||||||
step_pin: PC1
|
step_pin: PC1
|
||||||
@@ -130,7 +133,7 @@ max_temp: 250
|
|||||||
|
|
||||||
[gcode_macro PARK_extruder1]
|
[gcode_macro PARK_extruder1]
|
||||||
gcode:
|
gcode:
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=u
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_u
|
||||||
G90
|
G90
|
||||||
G1 X300
|
G1 X300
|
||||||
|
|
||||||
@@ -139,7 +142,7 @@ gcode:
|
|||||||
PARK_{printer.toolhead.extruder}
|
PARK_{printer.toolhead.extruder}
|
||||||
SET_SERVO SERVO=my_servo angle=50
|
SET_SERVO SERVO=my_servo angle=50
|
||||||
ACTIVATE_EXTRUDER EXTRUDER=extruder1
|
ACTIVATE_EXTRUDER EXTRUDER=extruder1
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=u
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_u
|
||||||
|
|
||||||
[servo my_servo]
|
[servo my_servo]
|
||||||
pin: PH4
|
pin: PH4
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ CONFIG generic_cartesian.cfg
|
|||||||
DICTIONARY atmega2560.dict
|
DICTIONARY atmega2560.dict
|
||||||
|
|
||||||
# Configure the input shaper
|
# Configure the input shaper
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=u
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_u
|
||||||
SET_INPUT_SHAPER SHAPER_TYPE_X=ei SHAPER_FREQ_X=50 SHAPER_TYPE_Y=2hump_ei SHAPER_FREQ_Y=80
|
SET_INPUT_SHAPER SHAPER_TYPE_X=ei SHAPER_FREQ_X=50 SHAPER_TYPE_Y=2hump_ei SHAPER_FREQ_Y=80
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=x
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_x
|
||||||
SET_INPUT_SHAPER SHAPER_TYPE_X=ei SHAPER_FREQ_X=50 SHAPER_TYPE_Y=2hump_ei SHAPER_FREQ_Y=80
|
SET_INPUT_SHAPER SHAPER_TYPE_X=ei SHAPER_FREQ_X=50 SHAPER_TYPE_Y=2hump_ei SHAPER_FREQ_Y=80
|
||||||
|
|
||||||
# Then home the printer
|
# Then home the printer
|
||||||
@@ -16,11 +16,11 @@ G28
|
|||||||
G1 X10 F6000
|
G1 X10 F6000
|
||||||
|
|
||||||
# Activate alternate carriage
|
# Activate alternate carriage
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=u
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_u
|
||||||
G1 X190 F6000
|
G1 X190 F6000
|
||||||
|
|
||||||
# Go back to main carriage
|
# Go back to main carriage
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=x
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_x
|
||||||
G1 X100 F6000
|
G1 X100 F6000
|
||||||
|
|
||||||
# Save dual carriage state
|
# Save dual carriage state
|
||||||
@@ -29,7 +29,7 @@ SAVE_DUAL_CARRIAGE_STATE
|
|||||||
G1 X50 F6000
|
G1 X50 F6000
|
||||||
|
|
||||||
# Go back to alternate carriage
|
# Go back to alternate carriage
|
||||||
SET_DUAL_CARRIAGE CARRIAGE=u
|
SET_DUAL_CARRIAGE CARRIAGE=carriage_u
|
||||||
G1 X130 F6000
|
G1 X130 F6000
|
||||||
|
|
||||||
# Restore dual carriage state
|
# Restore dual carriage state
|
||||||
@@ -46,8 +46,8 @@ G1 X20 E.2
|
|||||||
G90
|
G90
|
||||||
|
|
||||||
# Test changing the stepper kinematics
|
# Test changing the stepper kinematics
|
||||||
SET_STEPPER_CARRIAGES STEPPER=dual_carriage CARRIAGES=u+y1
|
SET_STEPPER_CARRIAGES STEPPER=dual_carriage CARRIAGES=carriage_u+carriage_y1
|
||||||
SET_STEPPER_CARRIAGES STEPPER=stepper_x CARRIAGES=x-y
|
SET_STEPPER_CARRIAGES STEPPER=stepper_x CARRIAGES=carriage_x-carriage_y
|
||||||
|
|
||||||
G1 X30 E.2
|
G1 X30 E.2
|
||||||
G1 Z3
|
G1 Z3
|
||||||
|
|||||||
Reference in New Issue
Block a user