Jump to: navigation, search

Difference between revisions of "Redeem local.cfg"

(Created page with "OK, so you're wanting to set up your shiny new Replicape and get printing, but you can't make heads or tails of the configuration. Never fear (well, maybe fear just a little,...")
(No difference)

Revision as of 14:57, 19 September 2017

OK, so you're wanting to set up your shiny new Replicape and get printing, but you can't make heads or tails of the configuration. Never fear (well, maybe fear just a little, but bear with me..), this will walk you through generating your local.cfg to hopefully get you running. If if have questions, feel free to come over to the Slack channel and ask for help.

This page is also assuming you've read through the Printer 101 page.

Your Redeem local.cfg handles the basic configuration for the system. Redeem will look for a needed option in the local.cfg first, and if it doesn't find it there, will look in printer.cfg (if you have it set), or default.cfg, in that order. Any time you change your local.cfg, you'll need to restart Redeem.

You can edit the file either through the Octoprint interface, or if you're linux-savvy, at the command line. The file is located at /etc/redeem/local.cfg

Any time you add a section to your local.cfg, you do need the section header, which is in brackets.


The first section is System related. For the most part, you don't need this in your local.cfg, as the values probably won't need to be changed.

[System]
# CRITICAL=50, # ERROR=40, # WARNING=30,  INFO=20,  DEBUG=10, NOTSET=0  Very seldom will this need changed.
loglevel =  20

# If set to True, also log to file.
log_to_file = True

# Default file to log to, this can be viewed from octoprint
logfile = /home/octo/.octoprint/logs/plugin_redeem.log

# location to look for data files (temperature charts, etc)
data_path = /etc/redeem

# Plugin to load for redeem, comma separated (i.e. HPX2Max,plugin2,plugin3)
plugins =

# Machine type is used by M115
# to identify the machine connected.
machine_type = Unknown

Next up is the printer geometry. You'll define dimensions of the print volume, directions, and end stop locations here. You probably won't need all axis entries here, so just use the ones you do need (X/Y/Z/E and possibly H usually). A/B/C axis are included in case you're running a Reach board on your Replicape.

[Geometry]
# Select which type of printer you have here
# 0 - Cartesian
# 1 - H-belt
# 2 - Core XY
# 3 - Delta
axis_config = 0

# The total length each axis can travel
# This affects the homing endstop searching length.
# This is not the print volume dimensions, but how far to travel when searching for an endstop. 
# Safe values would be your bed dimension for the axis plus 10mm or 20mm
# Remember, all measurements are in meters
travel_x = 0.2
travel_y = 0.2
travel_z = 0.2
travel_e = 0.2
travel_h = 0.2
travel_a = 0.0
travel_b = 0.0
travel_c = 0.0

# Define the origin in relation to the endstops. 
# Origin is usually the Left Front of the print bed, or in the Center for a Delta.
# 0.0 tells the system that your limit switch for that access is at the minimum (zero) end of travel.
# If you have the limit switch at the maximum end of travel, you need to tell Redeem how far 0.0 is away on that axis
# For example, if your X axis has the end stop at max travel, you would use  offset_x = -0.300  
# to tell the system that 0,0 is 300mm away.
# Note the negative in the above example... this tells the system to go back once it homes on X, instead 
# of trying to continue heading right
offset_x = 0.0
offset_y = 0.0
offset_z = 0.0
offset_e = 0.0
offset_h = 0.0
offset_a = 0.0
offset_b = 0.0
offset_c = 0.0

Not sure about this... Jon??

bed_compensation_matrix = [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]]

This section covers Delta printers and isn't needed unless you're running a Delta

[Delta]
# Distance head extends below the effector.
Hez = 0.0
# Length of the rod
L   = 0.135
# Radius of the columns
r   = 0.144
# Effector offset
Ae  = 0.026
Be  = 0.026
Ce  = 0.026
# Carriage offset
A_radial = 0.0
B_radial = 0.0
C_radial = 0.0

# Compensation for positional error of the columns
# (For details, read: https://github.com/hercek/Marlin/blob/Marlin_v1/calibration.wxm)
# Positive values move the tower to the right, in the +X direction, tangent to it's radius
A_tangential = 0.0
B_tangential = 0.0
C_tangential = 0.0

Now for the stepper motor setup.

# Stepper e is ext 1, h is ext 2
[Steppers]

microstepping_x = 3
microstepping_y = 3
microstepping_z = 3
microstepping_e = 3
microstepping_h = 3
microstepping_a = 3
microstepping_b = 3
microstepping_c = 3

current_x = 0.5
current_y = 0.5
current_z = 0.5
current_e = 0.5
current_h = 0.5
current_a = 0.5
current_b = 0.5
current_c = 0.5

# steps per mm:
#   Defined how many stepper full steps needed to move 1mm.
#   Do not factor in microstepping settings.
#   For example: If the axis will travel 10mm in one revolution and
#                angle per step in 1.8deg (200step/rev), steps_pr_mm is 20.
steps_pr_mm_x = 4.0
steps_pr_mm_y = 4.0
steps_pr_mm_z = 50.0
steps_pr_mm_e = 6.0
steps_pr_mm_h = 6.0
steps_pr_mm_a = 6.0
steps_pr_mm_b = 6.0
steps_pr_mm_c = 6.0

backlash_x = 0.0
backlash_y = 0.0
backlash_z = 0.0
backlash_e = 0.0
backlash_h = 0.0
backlash_a = 0.0
backlash_b = 0.0
backlash_c = 0.0


# Which steppers are enabled
in_use_x = True
in_use_y = True
in_use_z = True
in_use_e = True
in_use_h = True
in_use_a = False
in_use_b = False
in_use_c = False

# Set to -1 if axis is inverted
direction_x =  1
direction_y =  1
direction_z =  1
direction_e =  1
direction_h =  1
direction_a =  1
direction_b =  1
direction_c =  1

# Set to True if slow decay mode is needed
slow_decay_x = 0
slow_decay_y = 0
slow_decay_z = 0
slow_decay_e = 0
slow_decay_h = 0
slow_decay_a = 0
slow_decay_b = 0
slow_decay_c = 0

# A stepper controller can operate in slave mode,
# meaning that it will mirror the position of the
# specified stepper. Typically, H will mirror Y or Z,
# in the case of the former, write this: slave_y = H.
slave_x =
slave_y =
slave_z =
slave_e =
slave_h =
slave_a =
slave_b =
slave_c =

# Stepper timout
use_timeout = True
timeout_seconds = 500


[Planner]

  1. size of the path planning cache

move_cache_size = 1024

  1. time to wait for buffer to fill, (ms)

print_move_buffer_wait = 250

  1. if total buffered time gets below (min_buffered_move_time) then wait for (print_move_buffer_wait) before moving again, (ms)

min_buffered_move_time = 100

  1. total buffered move time should not exceed this much (ms)

max_buffered_move_time = 1000

  1. max segment length

max_length = 0.001

acceleration_x = 0.5 acceleration_y = 0.5 acceleration_z = 0.5 acceleration_e = 0.5 acceleration_h = 0.5 acceleration_a = 0.5 acceleration_b = 0.5 acceleration_c = 0.5

max_jerk_x = 0.01 max_jerk_y = 0.01 max_jerk_z = 0.01 max_jerk_e = 0.01 max_jerk_h = 0.01 max_jerk_a = 0.01 max_jerk_b = 0.01 max_jerk_c = 0.01

  1. Max speed for the steppers in m/s

max_speed_x = 0.2 max_speed_y = 0.2 max_speed_z = 0.02 max_speed_e = 0.2 max_speed_h = 0.2 max_speed_a = 0.2 max_speed_b = 0.2 max_speed_c = 0.2

  1. Max speed for the steppers in m/s

min_speed_x = 0.005 min_speed_y = 0.005 min_speed_z = 0.005 min_speed_e = 0.01 min_speed_h = 0.01 min_speed_a = 0.01 min_speed_b = 0.01 min_speed_c = 0.01

  1. When true, movements on the E axis (eg, G1, G92) will apply
  2. to the active tool (similar to other firmwares). When false,
  3. such movements will only apply to the E axis.

e_axis_active = True

[Cold-ends]

  1. To use the DS18B20 temp sensors, connect them like this.
  2. Enable by setting to True

connect-ds18b20-0-fan-0 = False connect-ds18b20-1-fan-0 = False connect-ds18b20-0-fan-1 = False

  1. This list is for connecting thermistors to fans,
  2. so they are controlled automatically when reaching 60 degrees.

connect-therm-E-fan-0 = False connect-therm-E-fan-1 = False connect-therm-E-fan-2 = False connect-therm-E-fan-3 = False connect-therm-H-fan-0 = False connect-therm-H-fan-1 = False connect-therm-H-fan-2 = False connect-therm-H-fan-3 = False connect-therm-A-fan-0 = False connect-therm-A-fan-1 = False connect-therm-A-fan-2 = False connect-therm-A-fan-3 = False connect-therm-B-fan-0 = False connect-therm-B-fan-1 = False connect-therm-B-fan-2 = False connect-therm-B-fan-3 = False connect-therm-C-fan-0 = False connect-therm-C-fan-1 = False connect-therm-C-fan-2 = False connect-therm-C-fan-3 = False connect-therm-HBP-fan-0 = False connect-therm-HBP-fan-1 = False connect-therm-HBP-fan-2 = False connect-therm-HBP-fan-3 = False

add-fan-0-to-M106 = False add-fan-1-to-M106 = False add-fan-2-to-M106 = False add-fan-3-to-M106 = False

  1. If you want coolers to
  2. have a different 'keep' temp, list it here.

cooler_0_target_temp = 60

  1. If you want the fan-thermitor connetions to have a
  2. different temperature:
  3. therm-e-fan-0-target_temp = 70

[Fans] default-fan-0-value = 0.0 default-fan-1-value = 0.0 default-fan-2-value = 0.0 default-fan-3-value = 0.0

[Heaters]

  1. For list of available temp charts, look in temp_chart.py

sensor_E = B57560G104F pid_Kp_E = 0.1 pid_Ti_E = 100.0 pid_Td_E = 0.3 ok_range_E = 4.0 max_rise_temp_E = 10.0 max_fall_temp_E = 10.0 min_temp_E = 20.0 max_temp_E = 250.0 path_adc_E = /sys/bus/iio/devices/iio:device0/in_voltage4_raw mosfet_E = 5 onoff_E = False prefix_E = T0 max_power_E = 1.0

sensor_H = B57560G104F pid_Kp_H = 0.1 pid_Ti_H = 0.01 pid_Td_H = 0.3 ok_range_H = 4.0 max_rise_temp_H = 10.0 max_fall_temp_H = 10.0 min_temp_H = 20.0 max_temp_H = 250.0 path_adc_H = /sys/bus/iio/devices/iio:device0/in_voltage5_raw mosfet_H = 3 onoff_H = False prefix_H = T1 max_power_H = 1.0

sensor_A = B57560G104F pid_Kp_A = 0.1 pid_Ti_A = 0.01 pid_Td_A = 0.3 ok_range_A = 4.0 max_rise_temp_A = 10.0 max_fall_temp_A = 10.0 min_temp_A = 20.0 max_temp_A = 250.0 path_adc_A = /sys/bus/iio/devices/iio:device0/in_voltage0_raw mosfet_A = 11 onoff_A = False prefix_A = T2 max_power_A = 1.0

sensor_B = B57560G104F pid_Kp_B = 0.1 pid_Ti_B = 0.01 pid_Td_B = 0.3 ok_range_B = 4.0 max_rise_temp_B = 10.0 max_fall_temp_B = 10.0 min_temp_B = 20.0 max_temp_B = 250.0 path_adc_B = /sys/bus/iio/devices/iio:device0/in_voltage3_raw mosfet_B = 12 onoff_B = False prefix_B = T3 max_power_B = 1.0

sensor_C = B57560G104F pid_Kp_C = 0.1 pid_Ti_C = 0.01 pid_Td_C = 0.3 ok_range_C = 4.0 max_rise_temp_C = 10.0 max_fall_temp_C = 10.0 min_temp_C = 20.0 max_temp_C = 250.0 path_adc_C = /sys/bus/iio/devices/iio:device0/in_voltage2_raw mosfet_C = 13 onoff_C = False prefix_C = T4 max_power_C = 1.0

sensor_HBP = B57560G104F pid_Kp_HBP = 0.1 pid_Ti_HBP = 0.01 pid_Td_HBP = 0.3 ok_range_HBP = 4.0 max_rise_temp_HBP = 10.0 max_fall_temp_HBP = 10.0 min_temp_HBP = 20.0 max_temp_HBP = 250.0 path_adc_HBP = /sys/bus/iio/devices/iio:device0/in_voltage6_raw mosfet_HBP = 4 onoff_HBP = False prefix_HBP = B max_power_HBP = 1.0

[Endstops]

  1. Which axis should be homed.

has_x = True has_y = True has_z = True has_e = False has_h = False has_a = False has_b = False has_c = False

inputdev = /dev/input/by-path/platform-ocp:gpio_keys-event

  1. Number of cycles to wait between checking
  2. end stops. CPU frequency is 200 MHz

end_stop_delay_cycles = 1000

  1. Invert =
  2. True means endstop is connected as Normally Open (NO) or not connected
  3. False means endstop is connected as Normally Closed (NC)

invert_X1 = False invert_X2 = False invert_Y1 = False invert_Y2 = False invert_Z1 = False invert_Z2 = False

pin_X1 = GPIO3_21 pin_X2 = GPIO0_30 pin_Y1 = GPIO1_17 pin_Y2 = GPIO3_17 pin_Z1 = GPIO0_31 pin_Z2 = GPIO0_4

keycode_X1 = 112 keycode_X2 = 113 keycode_Y1 = 114 keycode_Y2 = 115 keycode_Z1 = 116 keycode_Z2 = 117

  1. If one endstop is hit, which steppers and directions are masked.
  2. The list is comma separated and has format
  3. x_cw = stepper x clockwise (independent of direction_x)
  4. x_ccw = stepper x counter clockwise (independent of direction_x)
  5. x_neg = setpper x negative direction (affected by direction_x)
  6. x_pos = setpper x positive direction (affected by direction_x)
  7. Steppers e and h (and a, b, c for reach) can also be masked.
  8. For a list of steppers to stop, use this format: x_cw, y_ccw
  9. For Simple XYZ bot, the usual practice would be
  10. end_stop_X1_stops = x_neg, end_stop_X2_stops = x_pos, ...
  11. For CoreXY and similar, two steppers should be stopped if an end stop is hit.
  12. similarly for a delta probe should stop x, y and z.

end_stop_X1_stops = end_stop_Y1_stops = end_stop_Z1_stops = end_stop_X2_stops = end_stop_Y2_stops = end_stop_Z2_stops =

  1. if an endstop should only be used for homing or probing, then add it to
  2. homing_only_endstops in comma separated format.
  3. Example: homing_only_endstops = Z1, Z2
  4. this will make sure that endstop Z1 and Z2 are only used during homing or probing
  5. NOTE: Be very careful with this option.

homing_only_endstops =

soft_end_stop_min_x = -0.5 soft_end_stop_min_y = -0.5 soft_end_stop_min_z = -0.5 soft_end_stop_min_e = -1000.0 soft_end_stop_min_h = -1000.0 soft_end_stop_min_a = -1000.0 soft_end_stop_min_b = -1000.0 soft_end_stop_min_c = -1000.0

soft_end_stop_max_x = 0.5 soft_end_stop_max_y = 0.5 soft_end_stop_max_z = 0.5 soft_end_stop_max_e = 1000.0 soft_end_stop_max_h = 1000.0 soft_end_stop_max_a = 1000.0 soft_end_stop_max_b = 1000.0 soft_end_stop_max_c = 1000.0

[Homing]

  1. Homing speed for the steppers in m/s
  2. Search to minimum ends by default. Negative value for searching to maximum ends.

home_speed_x = 0.1 home_speed_y = 0.1 home_speed_z = 0.1 home_speed_e = 0.01 home_speed_h = 0.01 home_speed_a = 0.01 home_speed_b = 0.01 home_speed_c = 0.01

  1. homing backoff speed

home_backoff_speed_x = 0.01 home_backoff_speed_y = 0.01 home_backoff_speed_z = 0.01 home_backoff_speed_e = 0.01 home_backoff_speed_h = 0.01 home_backoff_speed_a = 0.01 home_backoff_speed_b = 0.01 home_backoff_speed_c = 0.01

  1. homing backoff dist

home_backoff_offset_x = 0.01 home_backoff_offset_y = 0.01 home_backoff_offset_z = 0.01 home_backoff_offset_e = 0.01 home_backoff_offset_h = 0.01 home_backoff_offset_a = 0.01 home_backoff_offset_b = 0.01 home_backoff_offset_c = 0.01

  1. Where should the printer goes after homing.
  2. The default is to stay at the offset position.
  3. This setting is useful if you have a delta printer
  4. and want it to stay at the top position after homing, instead
  5. of moving down to the center of the plate.
  6. In that case, use home_z and set that to the same as the offset values
  7. for X, Y, and Z, only with different sign.

home_x = 0.0 home_y = 0.0 home_z = 0.0 home_e = 0.0 home_h = 0.0 home_a = 0.0 home_b = 0.0 home_c = 0.0

[Servos]

  1. Example servo for Rev A4A, connected to channel 14 on the PWM chip
  2. For Rev B, servo is either P9_14 or P9_16.
  3. Not enabled for now, just kept here for reference.
  4. Angle init is the angle the servo is set to when redeem starts.
  5. pulse min and max is the pulse with for min and max position, as always in SI unit Seconds.
  6. So 0.001 is 1 ms.
  7. Angle min and max is what angles those pulses correspond to.

servo_0_enable = False servo_0_channel = P9_14 servo_0_angle_init = 90 servo_0_angle_min = -90 servo_0_angle_max = 90 servo_0_pulse_min = 0.001 servo_0_pulse_max = 0.002

[Probe] length = 0.01 speed = 0.05 accel = 0.1 offset_x = 0.0 offset_y = 0.0 offset_z = 0.0

[Rotary-encoders] enable-e = False event-e = /dev/input/event1 cpr-e = -360 diameter-e = 0.003

[Filament-sensors]

  1. If the error is > 1 cm, sound the alarm

alarm-level-e = 0.01

[Watchdog] enable_watchdog = True

[Macros] G29 =

   M561                ; Reset the bed level matrix
   M558 P0             ; Set probe type to Servo with switch
   M557 P0 X10 Y20     ; Set probe point 0
   M557 P1 X10 Y180    ; Set probe point 1
   M557 P2 X180 Y100   ; Set probe point 2
   G28 X0 Y0           ; Home X Y
   G28 Z0              ; Home Z
   G0 Z12              ; Move Z up to allow space for probe
   G32                 ; Undock probe
   G92 Z0              ; Reset Z height to 0
   G30 P0 S            ; Probe point 0
   G0 Z0               ; Move the Z up
   G31                 ; Dock probe
   G28 Z0              ; Home Z
   G0 Z12              ; Move Z up to allow space for probe
   G32                 ; Undock probe
   G92 Z0              ; Reset Z height to 0
   G30 P1 S            ; Probe point 1
   G0 Z0               ; Move the Z up
   G31                 ; Dock probe
   G28 Z0              ; Home Z
   G0 Z12              ; Move Z up to allow space for probe
   G32                 ; Undock probe
   G92 Z0              ; Reset Z height to 0
   G30 P2 S            ; Probe point 2
   G0 Z0               ; Move the Z up
   G31                 ; Dock probe
   G28 X0 Y0           ; Home X Y

G31 =

   M280 P0 S320 F3000  ; Probe up (Dock sled)

G32 =

   M280 P0 S-60 F3000  ; Probe down (Undock sled)


  1. Configuration for the HPX2Max plugin (if loaded)

[HPX2MaxPlugin]

  1. The channel on which the servo is connected. The numbering correspond to the Fan number

servo_channel = 1

  1. Extruder 0 angle to set the servo when extruder 0 is selected, in degree

extruder_0_angle = 20

  1. Extruder 1 angle to set the servo when extruder 1 is selected, in degree

extruder_1_angle = 175


  1. Configuration for the Dual extruder by servo plugin
  2. This config is only used if loaded.

[DualServoPlugin]

  1. The pin name of where the servo is located

servo_channel = P9_14 pulse_min = 0.001 pulse_max = 0.002 angle_min = -90 angle_max = 90 extruder_0_angle = -5 extruder_1_angle = 5