Jump to: navigation, search

Redeem


Redeem is the Replicape daemon. It chews G-codes and spits out coordinates. The software can be found in the redeem repository: https://bitbucket.org/intelligentagent/redeem

Contents

Installation

Debian

There is now a Debian Jessie package available. Please see Kamikaze#Manual_installation_of_package_feed for instructions on adding the feed manually, if you are not using the preferred distro which is Kamikaze.

Angstrom

Note: Angstrom version is depricated.
Redeem is available as a an OPKG from the thing-printer feed. This is the preferred way to install the software for Angstrom. If you want to use Ubuntu or any other Debian based distro, you have to install from the source code repository. The repository has detailed instructions for installations on Debian-based systems.

Rules

  • All units are in SI-units internally in Redeem.
  • default.cfg is the bible, all configs must be defined in there.
  • All configurations in default.cfg can be overridden
  • default.cfg and printer.cfg can be changed with updates. local.cfg can not.
  • Here is the config hierachy: local.cfg > printer.cfg > deafult.cfg

Overview

Most of redeem is written in Python, but if you look at a typical G-code file you will see that most of it is G0/G1 codes, so that part has been optimized. That way you can have seldom used routines like homing and bed levelling done in a python with all it's garbage garbage collection and libraries, and just asmall part done in C.

Configuration

For Redeem, the preferred way to handle configuration is through the web interface. The web interface is available through [1] assuming you have your BeagleBone on the local network and you are using Kamikaze

The config files for redeem are present in the folder /etc/redeem/. There are three files for setting the configuration. default.cfg is the catch-all at the bottom. It will contain all the possible options and should not be touched. Second is printer.cfg which is a symlink and specific to a printer. Look in the folder to find one that matches your printer. If you cannot find one, make it! Finally is local.cfg which contains quirks or other individual settings. This should not be overwritten by new software updates and can contain stuff like microstepping, stepper current, offsets as well as any bed compensation matrices etc.

Now normally all settings can come from your specific printer.cfg config file, but if no one has made that file, you need to set this stuff up yourself. Most of the stuff in the config files is in SI units. This is perhaps different than what other firmwares do, where the focus is on optimization rather than ease of use.

There are some comments for the different config variables, but here is a more detailed explanation on some of them:

System

The system section has only Replicape board revision and log level. For debugging purposes, set the log level to 10, but keep it at 20 for normal operations, since logging is very CPU intensive and can cause delays during prints at high speed. On later versions of Redeem, the board revision is read from the EEPROM on the Replicape.

[System]

# CRITICAL=50, # ERROR=40, # WARNING=30,  INFO=20,  DEBUG=10, NOTSET=0
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

# 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

Plugins

Right now, there is only one (two?) plugin(s) defined, HPX2Max. Todo: Write about his...


DualServoPlugin, example config:

# The pin name of where the servo is located
servo_channel = P9_14
# minimum pulse length
pulse_min = 0.01
pulse_max = 0.02
angle_min = 0
angle_max = 180
extruder_0_angle = 87.5
extruder_1_angle = 92.5

Geometry

The geometry section contains stuff about the physical layout of your printer. What the print volume is, what the offset from the end stops is, whether it's a Normal XY style printer, a Delta printer, an H-belt type printer or a CoreXY type printer.
It also contains the bed compensation matrix. The bed compensation matrix is used for compensating any rotation the bed has in relation to the nozzle. This is typically not something you write yourself, but instead it is found by probing the bed at different locations by use of the G-code G29. The G29 command is a macro command, so it only runs other G-codes and you can override it yourself in the local.cfg file or in the printer.cfg file if you are a printer manufacturer.
See below.

Note on homing

travel_*, offset_*, and home_* (not in this section, see the #Homing section) all make up how a homing routine works. They can all be positive or negative. Here is a quick run-down of what is happening internally:

  1. Travel the distance and direction set in travel_*. If an end stop is found, stop.
  2. Move away the distance found in backoff_distance_*, then hit the end stop once more, slower.
  3. Move the distance set in offset_*, opposite of travel_*. The offset_* sign is thus typically the same as the travel_* sign.
  4. If the values in home_* is 0, the routine is done and the position is 0, 0, 0.
  5. If there are values in home_*, use those values in the G92 command, so that the printer will then move to that point, changing the position.


Offset_* does homing in cartesian space, so for a delta, the values, typically have to be the same if you want the nozzle to end up in the centre, right above the platform. After completing the offset_*, a G92 is issued _with_ the values in home_* as arguments. If home_* is 0, the homing routine is done, but if there are some values in home_*, the head will move to those positions. the values in home_* are in the native coordinate system, IE delta coordinates for a delta printer. As a starting point, have home_* values = 0, set the travel_* to a small value and offset_* to an even smaller value. That way you can do some testing without ramming your nozzle into the bed.

[Geometry]
# 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.
#   travel_* can be left undefined.
#   It will be determined by soft_end_stop_min/max_*
# travel_x = 0.2 
# ...

# Define the origin in relation to the endstops
#   offset_* can be left undefined.
#   It will be determined by home_speed and soft_end_stop_min/max_*
# offset_x = 0.0
# ...

# The identity matrix is the default
bed_compensation_matrix = 
		1.0, 0.0, 0.0,
		0.0, 1.0, 0.0,
		0.0, 0.0, 1.0

Delta

Delta support in Redeem is now pretty stable. variables needed for defining the geometry of the delta setup. If your printer is not a Delta printer, leave this. Effector is the thing that is in the centre and moves. The one with the hot end.
The distance from the centre of the effector to where the rods are mounted is the effector offset.
Carriage is those that move up and down along the columns.
I've not figured out what the carriage offset does. You should think this was the offset from the carriages to the rods, but I've not gotten that top work. Seems broken. Instead, add the carriage offset to the effector offset.

calibrating convex/concave behaviour
If your delta printer is exhibiting non-planar behaviour, you can use #M665:_Set_delta_arm_calibration_values to calibrate the values. When you have found the correct values, save them with #M500:_Store_parameters_to_file. The saved settings will be in local.cfg
To see which parameter to change in which direction, looking at this page will guide you in which value to tune which way: Delta Calibration Study
To summarize, set your rod length L according to what you have measured, from center to center of the ball joints. Then adjust the behavior by adjusting the R parameter.
Use a thickness gauge (can be anything that doesn't compress) of a few millimeters thickness as a reference. First set the Z-height properly for X,Y = (0,0). Then move 10, 20 millimeters in X and Y around the center to see if you have a significant error in the planar behavior. If you don't, move out further and check with your thickness gauge how far off you are. A quick example of the order of magnitudes is if you notice a 1 to 1.5mm offset (upwards means you need to shrink R, too far down means you need to increase R) at 40mm off center out of a 3mm gauge. The error in radius was somewhere on the order of 2 or 3mm to adjust it. The further out from the center, the smaller the adjustment to be made to the radius.

Note: while the radial offset values exist, it has been reported that at present they do not behave as expected. The suggested fix is to subtract the offsets directly into your print radius value to get a better behavior. This note will be removed when the release branch of redeem has corrected the behavior.

bed levelling compensation matrix Redeem supports autoprobing the bed to generate a bed levelling compensation matrix. However it is no substitute for a poorly setup machine. Try to get your head as level as possible without bed levelling first, then use the #G29:_Probe_the_bed_at_specified_points command to generate the fine-tuning bed compensation matrix.

[Delta]
# Distance head extends below the effector.
Hez = 0.0    
# Length of the rod
L   = 0.135  
# Radius of the columns (distance from column to the center of the build plate)
r   = 0.144  
# Effector offset (distance between the joints to the rods to the center of the effector)
Ae  = 0.026  
Be  = 0.026
Ce  = 0.026
# Carriage offset (the distance from the column to the carriage's center of the rods' joints)
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

Steppers

Ah, Steppers! This section has the stuff you need for the the steppers, such as the number of steps pr mm for each axis, the stepper max current, the microstepping, acceleration, max speed, the option to invert a stepper (so you don't have to rotate the stepper connector), and finally the decay mode of the current chopping on the motor drives. The decay mode affects the way the stepper motor controllers decays the current. Basically slow decay will give more of a hissing sound while standing still and fast decay will cause the steppers to be silent when stationary, but loud when stepping. The microstepping_ settings is (2^x), so microstepping_x = 2 means 2^2 = 4. 3 is then 2^3 = 8. (One eighth to be precise)
Replicape Rev B On Replicape Rev B, there are 8 levels of decay. Please consult the data sheet for TMC2100 on the different options.
0 -
1 -
2 -
3 -
4 -
5 -
6 -
7 -
Microstepping is value is one of the following:
0 - Full step
1 - Half step
2 - Half step, interpolated to 256
3 - Quarter step
4 - 16th step
5 - Quarter step, interpolated to 256 microsteps
6 - 16th step, interpolated to 256 microsteps
7 - Quarter step, StealthChop, interpolated to 256 microsteps
8 - 16th step, StealthChop, interpolated to 256 microsteps

Important note on the max current for a stepper: Never run the Replicape with the steppers running above 0.5A without cooling. Never exceed 1.2A of regular use either - the TMC2100 drivers aren't rated higher. If you need more current to drive two motors off the same stepper, use slave mode with a second driver (usually H). Yes, it means splitting off your wiring of the stepper motors you had going to a single driver, but it also means you avoid overheating your drivers.

Slave mode

If you want to enable slave mode for a stepper driver, meaning it will mirror the movements of another stepper motor exactly, you need to use "slave_h = Y" if you want the H-stepper motor to mirror the moves produced by the Y-stepper motor. Remember to also set the steps_pr_mm to the same value on the the motors mirroring each other, and also the direction. Most likley you will want the current to be the same as well.

  1. Enable the slave stepper driver (in_use_h = True)
  2. The syntax for selecting which axis is the master and which the slave is:
    I want to slave H to Z (H follows everything Z does) then you use "slave_z = H".
  3. If you have any endstops acting on the master axis, then you should do the same thing for the slave axis, otherwise it will just keep on turning. For example, on a delta with Z1 connected to a bed probe and Z2 connected to the tower limit switch: "end_stop_Z1_stops = x_neg, y_neg, z_neg, h_neg" and "end_stop_Z2_stops = z_pos, h_pos".


# Stepper e is ext 1, h is ext 2
[Steppers]
microstepping_x = 3
...

current_x = 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
...

backlash_x = 0.0
...

# Which steppers are enabled
in_use_x = True
...

# Set to -1 if axis is inverted
direction_x =  1
...

# Set to True if slow decay mode is needed
slow_decay_x = 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_h = Y.
slave_x = 
...

# Stepper timout
use_timeout = True
timeout_seconds = 60

Planner

[Planner]

# size of the path planning cache
move_cache_size = 1024

# time to wait for buffer to fill, (ms)
print_move_buffer_wait = 250

# 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

# total buffered move time should not exceed this much (ms)
max_buffered_move_time = 1000

# max segment length
max_length = 0.001

acceleration_x = 0.5
...
max_jerk_x = 0.01
...

# Max speed for the steppers in m/s
max_speed_x = 0.2
...
# Max speed for the steppers in m/s
min_speed_x = 0.005
...

Cold ends

Replicape has three thermistor inputs and a Dallas one-wire input. Typically, the thermistor inputs are for high temperatures such as hot ends and heated beds, and the Dallas one-wire input is used for monitoring the cold end of a hot end, if you know what I mean... This section is used to connect a fan to one of the temperature probes, so for instance the fan on your extruder will start as soon as the temperature goes above 60 degrees. If you have a Dallas one-wire temperature probe connected on the board, it will show up as a file-like device in Linux under /sys/bus/w1/devices/. Find out the full path and place that in your local.cfg. All Dallas one-wire devices have a unique code, so yours will be different than what you see here.

[Cold-ends]
# To use the DS18B20 temp sensors, connect them like this. 
# Enable by setting to True
connect-ds18b20-0-fan-0 = False
connect-ds18b20-1-fan-0 = False
connect-ds18b20-0-fan-1 = False

# This list is for connecting thermistors to fans, 
# so they are controlled automatically when reaching 60 degrees. 
connect-therm-E-fan-0 = False
...
connect-therm-H-fan-1 = False
...

add-fan-0-to-M106 = False
...

# If you want coolers to 
# have a different 'keep' temp, list it here. 
cooler_0_target_temp = 60

# If you want the fan-thermistor connections to have a 
# different temperature: 
# therm-e-fan-0-target_temp = 70

Heaters

The heater section controls the PID settings and which temperature lookup chart to use for the thermistor. If you do not find your thermistor in the chart, you can generate one using the tool from redeem: [2]. Ok_range sets the range of temperature variation.

[Heaters]
# For list of available temp charts, look in temp_chart.py

temp_chart_E = B57560G104F
pid_p_E = 0.1
pid_i_E = 0.01
pid_d_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
resistance_E = 4700.0

...

Endstops

Use this section to specify whether or not you have end stops on the different axes and how the end stop inputs on the board interacts with the steppers. The lookup mask is useful for the latter. In the default setup, the connector marked X1 is connected to the stepper on the X-axis. For CoreXY and H-bot this is different in that two steppers are denied movement in one direction, but allowed movement in the other direction given that one of the end stops has been hit.

Also of interest is the use of two different inputs for a single axis and direction. Imagine using one input to control the lower end of the Z-axis and a different input to probe the bed with G20/G30.

If you are not seeing any movement even though no end stop has been hit, try inverting the end stop.

See also this blog post and video for a more thorough explanation

Soft end stops

Soft end stops can be used to prevent the print head from moving beyond a specified point. For delta printers this is useful since they cannot have end stops preventing movement outside the build area.

[Endstops]
# Which axis should be homed. 
has_x = True
...
# Number of cycles to wait between checking 
# end stops. CPU frequency is 200 MHz
end_stop_delay_cycles = 1000

# Invert =
#   True means endstop is connected as Normally Open (NO) or not connected
#   False means endstop is connected as Normally Closed (NC) 
invert_X1 = False
...
# If one endstop is hit, which steppers and directions are masked.
#   The list is comma separated and has format
#     x_cw = stepper x clockwise (independent of direction_x)
#     x_ccw = stepper x counter clockwise (independent of direction_x)
#     x_neg = setpper x negative direction (affected by direction_x)
#     x_pos = setpper x positive direction (affected by direction_x)
#   Steppers e and h (and a, b, c for reach) can also be masked.
#   
#   For a list of steppers to stop, use this format: x_cw, y_ccw
#   For Simple XYZ bot, the usual practice would be
#     end_stop_X1_stops = x_neg, end_stop_X2_stops = x_pos, ...
#   For CoreXY and similar, two steppers should be stopped if an end stop is hit.
#     similarly for a delta probe should stop x, y and z.
end_stop_X1_stops =
...
soft_end_stop_min_x = -0.5
...
soft_end_stop_max_x = 0.5
...

Homing

This section has to do with the speed of the homing and how much the stepper should back away for each axis to do fine search. Please note that there are two other variables in #Geometry section that are related to the homing routine: travel_* and offset_*. The offset_* values will move the print head immediately after homing, while the home_* settings found in this section can be used to set an offset to delta printers, so the head is kept by the end stops.

[Homing]

# Homing speed for the steppers in m/s
#   Search to minimum ends by default. Negative value for searching to maximum ends.
home_speed_x = 0.1

# homing backoff speed                
home_backoff_speed_x = 0.01
                                      
# homing backoff dist                             
home_backoff_offset_x = 0.01                                                          

# Where should the printer goes after homing
#   home_* can be left undefined. It will stay at the end stop.
# home_x = 0.0
# ...

Servos

Rev A

You can control servos through Redeem and the way you do it is by using one of the left over channels on the PWM chip. A total of six channels are broken out through the expansion header named expand on Replicape A4A. Here is a list of the pins and which channel it is connected to:

  • Pin 9 -> Channel 14
  • Pin 8 -> Channel 15
  • Pin 7 -> Channel 7
  • Pin 5 -> Channel 11
  • Pin 3 -> Channel 12
  • Pin 1 -> Channel 13

The control signal is 3.3 V square waves which will probably not be sufficient to power larger servos without a level shifter, but some miniature servos can both be operated and powered with 3.3 V.

Rev B

Servos are controlled by two on-chip PWMs and share connector with Endstop X2 and Y2. TODO: How to configure... Servo 0 is on pin P9_14 Servo 1 is on pin P9_16

Use G-code M280 to set the servo position. Note that multiple servos can be present, the init script will continue to initialize servos as long as there are higher indexes, so keep the indexes increasing for multiple servos.

[Servos]
# For Rev B, servo is either P9_14 or P9_16.
# Not enabled for now, just kept here for reference.
# Angle init is the angle the servo is set to when redeem starts.
# pulse min and max is the pulse with for min and max position, as always in SI unit Seconds.
# So 0.001 is 1 ms.
# 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


Z-Probe

The standard configs for Z-probe should work for most. The real difficulty lies in making the macro for the whole probing procedure. The offsets are the distance from the probe point to the nozzle. Here are the standard values:

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

Rotary-encoders

Note: work in progress.
Meanwhile, see this blog post: http://www.thing-printer.com/filament-sensor-3d-printer-replicape/

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

Filament-Sensors

TODO: Write this section Note: work in progress.

[Filament-sensors]
# If the error is > 1 cm, sound the alarm
alarm-level-e = 0.01

Watchdog

The watchdog is a time-out alarm that will kick in if the /dev/watchdog file is not written at least once pr. minute. This is a safety issue that will cause the BeagleBone to issue a hard reset if the Redeem daemon were to enter a faulty state and not be able to regulate the heater elements. For the watchdog to start, it requires the watchdog to be resettable, with the proper kernel command line: omap_wdt.nowayout=0

[Watchdog]
enable_watchdog = True

</pre>

Macros

The macro-section contains macros. Duh. Right now, only G29, G31 and G32 has macro definitions and it's basically a set of other G-codes. To make a new macro, you need to also define the actual g-code file for it. That is beyond this wiki, but look at G29 in the repository, for instance: [3]

[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)


On the latest Thing-image, there is a configuration page where you can choose what printer.cfg links to and edit local.cfg.

Implemented Gcodes

You can always get the updated list of implemeted gcodes by writing "G" or "M" in the terminal on Octoprint. For a longer description of each gcode write the code + "?" in the terminal. So to get a description of G1, write

 G1?

The list on the reprap wiki has been used a starting point for the implementation, but some codes, such as stepper decay etc. has been added separately. Some G-codes have not been implemented, specifically those related to SD card uploads etc. They are for old fashioned controller boards, and do not apply to a 4 GB MMC drive.

G: List of currently implemented G-codes

This list has been autogenerated by issuing 'G F0' in Redeem

G: List all implemented G-codes

Lists all the G-codes implemented by this firmware. To get a long description of each code use '?' after the code name, for instance, G0? will give a long decription of G0

G0: Control the printer head position as well as the currently selected tool.

Long description missing

G1: Control the printer head position as well as the currently selected tool.

Long description missing

G2: Control the printer head position as well as the currently selected tool.

Long description missing

G21: Set units to millimeters

Long description missing

G28: Move the steppers to their homing position (and find it as well)

Long description missing

G29: Probe the bed at specified points

Probe the bed at specified points and update the bed compensation matrix based on the found points. Add 'S' to NOT update the bed matrix.

G3: Control the printer head position as well as the currently selected tool.

Long description missing

G30: Probe the bed at current point

Probe the bed at the current position, or if specified, a point previously set by M557. X, Y, and Z starting probe positions can be overridden, D sets the probe length, or taken from config if nothing is specified. F sets the probe speed. If not present, it's taken from the configA sets the probe acceleration. If not present, it's taken from the config

G31: Dock sled

Long description missing

G32: Undock sled

Long description missing

G4: Dwell for P (milliseconds) or S (seconds)

Long description missing

G90: Set movement mode to absolute

Long description missing

G91: Set movement mode to relative

Long description missing

G92: Set the current position of steppers without moving them

Long description missing

M: List of currently implemented M-codes

This list has been autogenerated by issuing M F0 in redeem

M: List all M-codes

Lists all the M-codes implemented by this firmware. To get a long description of each code use '?' after the code name, for instance, M92? will give a decription of M92. To get all g-codes with wiki formatting, add token 'F0'.

M101: Deprecated

Long description missing

M103: Deprecated

Long description missing

M104: Set extruder temperature

Set extruder temperature. Use either T<index> or P<index> to choose heater, use S for the target temp

M105: Get extruder temperature

Gets the current extruder temperatures, power and cold end temperatures. Extruders have prefix T, cold endsa have prefix C, power has prefix @

M106: Set fan power.

Set the current fan power. Specify S parameter for the power (between 0 and 255) and the P parameter for the fan number. P=0 and S=255 by default. If no P, use fan from config. If no fan configured, use fan 0. If 'R' is present, ramp to the value

M107: set fan off

Set the current fan off. Specify P parameter for the fan number. If no P, use fan from config. If no fan configured, use fan 0

M108: Deprecated

Long description missing

M109: Set extruder temperature and wait for it to be reached

Long description missing

M110: Set current gcode line number

Long description missing

M111: Set debug level

set debug level, S sets the level. If no S is present, it is set to 20 = Info

M112: Cancel all the planned move in emergency.

Long description missing

M114: Get current printer head position

Long description missing

M115: Get Firmware Version and Capabilities

Get Firmware Version and CapabilitiesWill return the version of Redeem running, the machine type and the extruder count.

M116: Wait for all temperature to be reached

Long description missing

M117: Send a message to a connected display

Use 'M117 message' to send a message to a connected display. Typically this will be a Manga Screen or similar.

M119: Get current endstops state or set invert setting

Get current endstops state. If two tokens are supplied, the first is end stop, the second is invert state. Ex: M119 X1 1 to invert ends stop X1

M130: Set PID P-value, Format (M130 P0 S8.0)

Long description missing

M131: Set PID I-value, Format (M131 P0 S8.0)

Long description missing

M132: Set PID D-value, Format (M132 P0 S8.0)

Long description missing

M140: Set heated bed temperature

Long description missing

M141: Set fan power and PWM frequency

Long description missing

M151: Enable min temperature alarm

Should be enabled after target temperatures have been reached, typically after an M116 G-code or similar. Once enabled, if the temperature drops below the set point, the print will stop and all heaters will be disabled. The min temp will be disabled once a new temperture is set. Example: M151

M17: Enable steppers

Power on and enable all steppers. Motors are active after this command.

M18: Disable all steppers

Disable all steppers. No more current is applied to the stepper motors after this command.

M19: Reset the stepper controllers

Long description missing

M190: Set heated bed temperature and wait for it to be reached

Long description missing

M201: Set print acceleration

Sets the acceleration that axes can do in units/second^2 for print moves. For consistency with the rest of G Code movement this should be in units/(minute^2) Example: M201 X1000 Y1000 Z100 E2000

M202: Set travel acceleration

Sets the acceleration that axes can do in units/second^2 for travel moves. For consistency with the rest of G Code movement this should be in units/(minute^2) Example: M201 X1000 Y1000 Z100 E2000

M206: Set or get end stop offsets

If no parameters are given, get the current X, Y and Z end stop offsets. To set offset, first token is axis, second is offset. Negative values are OKExample: M206 X 0.01

M21: Deprecated

Long description missing

M220: Set speed override percentage

M220 S<factor in percent> - set speed factor override percentage

M221: Set extruder override percentage

M221 S<factor in percent> - set extrude factor override percentage

M24: Resume the print where it was paused by the M25 command.

Long description missing

M25: Pause the current print.

Long description missing

M270: Set coordinate system

Set coordinate system. Parameter S set the type, which is 0 = Cartesian, 1 = H-belt, 2 = CoreXY, 3 = Delta

M280: Set servo position

Set servo position. Use 'S' to specify angle, use 'P' to specify index, use F to specify speed.

M303: Run PID tuning

PID Tuning refers to a control algorithm used in some repraps to tune heating behavior for hot ends and heated beds. This command generates Proportional (Kp), Integral (Ki), and Derivative (Kd) values for the hotend or bed (E-1). Send the appropriate code and wait for the output to update the firmware. E<0 or 1> overrides the extruder. Use E-1 for heated bed. Default is the 'E' extruder.S overrides the temperature to calibrate for. Default is 100. C overrides the number of cycles to run. Default is 3

M31: Set stepper current limit settings

Long description missing

M350: Set microstepping value

Set microstepping mode for the axes present with a token. Microstepping will be 2^val. Steps pr. mm. is changed accordingly.

M400: Wait until all buffered paths are executed

Long description missing

M409: Get a status report from each filament sensor connected

Long description missing

M500: Store parameters to file

Save all changed parameters to file. Send: M105

M557: Set probe point

Long description missing

M558: Set probe type

Long description missing

M561: Reset bed level matrix to identity

This cancels any bed-plane fitting as the result of probing (or anything else) and returns the machine to moving in the user's coordinate system.

M562: Reset temperature fault.

Reset a temperature fault on heater/sensor If the priner has switched off and locked a heater because it has detected a fault, this will reset the fault condition and allow you to use the heater again. Obviously to be used with caution. If the fault persists it will lock out again after you have issued this command. P0 is the bed; P1 the first extruder, and so on.

M569: Set stepper direction

Set the direction for each axis. Use <axis><direction> for each of the axes you want.Axis is one of X, Y, Z, E, H, A, B, C and direction is 1 or -1Note: This will store the result in the local config and restart the path planner

M574: Set or get end stop config

If not tokens are given, return the current end stop config. To set the end stop config: This G-code takes one end stop, and one configuration where the configuration is which stepper motors to stop and the direction in which to stop it. Example: M574 X1 x_ccw This will cause the X axis to stop moving in the counter clock wise direction. Note that this recompiles and restarts the firmware

M608: Set stepper slave mode

Set stepper slave mode, making one stepper follow the other. If no tokens are given, return the current setup For each token, set the second argument as slave to the first So M608 XY will set Y as a slave to X If only the axis is given, no slave is set.

M665: Set delta arm calibration values

L sets the length of the arm. If the objects printed are too small, try increasing(?) the length of the arm, R sets the radius of the towers. If the measured points are too convex, try increasing the radius

M666: Set axis offset values

Long description missing

M667: Set delta column calibration values

Set delta column calibration values.

M668: Adjust backlash compensation for each named axis

Long description missing

M81: Shutdown or restart Replicape

Shutdown the whole Replicape controller board. If paramter P is present, only exit loop. If R is present, restart daemon

M84: Disable all steppers

Disable all steppers. No more current is applied to the stepper motors after this command.

M906: Set stepper current in mA

Set the stepper current. Unit is mA. Typical use is 'M906 X400'.This sets the current to 0.4A on the X stepper motor driver.Can be set for multiple stepper motor drivers at once.

M907: Set stepper current in A

Long description missing

M909: Set stepper microstepping settings

Example: M909 X3 Y5 Z2 E3Set the microstepping value foreach of the steppers. In Redeem this is implementedas 2^value, so M909 X2 sets microstepping to 2^2 = 4, M909 Y3 sets microstepping to 2^3 = 8 etc.

M910: Set stepper controller decay mode

Example: M910 X3 Y5 Z2 E3Set the decay mode foreach of the steppers. In Redeem this is implementedfor Replicape rev B as a combination of CFG0, CFG4, CFG5.A value between 0 and 7 is allowed, setting the three registers to the binary value represented by CFG0, CFG4, CFG5. CFG0 is chopper off time, the duration of slow decay phase. CFG4 is chopper hysteresis, the tuning of zero crossing precision. CFG5 is the chopper blank time, the dureation of banking of switching spike. Please refer to the data sheet for further details on the configs.

M92: Set number of steps per millimeters for each steppers

Long description missing

Troubleshooting

Log into your board with SSH:

ssh root@kamikaze.local

If you want to see the current status for Redeem:

root@kamikaze:~# systemctl status redeem -n 100
* redeem.service - The Replicape Dameon
   Loaded: loaded (/lib/systemd/system/redeem.service; enabled)
   Active: active (running) since Thu 2016-04-28 15:55:28 UTC; 33s ago
 Main PID: 312 (redeem)
   CGroup: /system.slice/redeem.service
           |-312 /usr/bin/python /usr/bin/redeem
           |-530 socat -d -d -lf /var/log/redeem2octoprint pty,mode=777,raw,echo=0,link=/dev/octoprint_0 pty,mode=777,raw,echo=0,link=/dev/octoprint_1
           |-532 socat -d -d -lf /var/log/redeem2toggle pty,mode=777,raw,echo=0,link=/dev/toggle_0 pty,mode=777,raw,echo=0,link=/dev/toggle_1
           |-534 socat -d -d -lf /var/log/redeem2testing pty,mode=777,raw,echo=0,link=/dev/testing_0 pty,mode=777,raw,echo=0,link=/dev/testing_1
           `-536 socat -d -d -lf /var/log/redeem2testing_noret pty,mode=777,raw,echo=0,link=/dev/testing_noret_0 pty,mode=777,raw,echo=0,link=/dev/testing_noret_1

Apr 28 15:55:37 kamikaze redeem[312]: 04-28 15:55 root         INFO     Redeem initializing 1.2.2~Predator
Apr 28 15:55:37 kamikaze redeem[312]: 04-28 15:55 root         INFO     Using config file /etc/redeem/default.cfg
Apr 28 15:55:37 kamikaze redeem[312]: 04-28 15:55 root         INFO     Using config file /etc/redeem/kossel_mini.cfg
Apr 28 15:55:37 kamikaze redeem[312]: 04-28 15:55 root         INFO     Using config file /etc/redeem/local.cfg
Apr 28 15:55:37 kamikaze redeem[312]: 04-28 15:55 root         INFO     -- Logfile configured --
Apr 28 15:55:38 kamikaze redeem[312]: 04-28 15:55 root         INFO     Found Replicape rev. 00B3
Apr 28 15:55:39 kamikaze redeem[312]: 04-28 15:55 root         INFO     Cooler connects therm E with fan 1
Apr 28 15:55:39 kamikaze redeem[312]: 04-28 15:55 root         INFO     Added fan 0 to M106/M107
Apr 28 15:55:39 kamikaze redeem[312]: 04-28 15:55 root         INFO     Added fan 3 to M106/M107
Apr 28 15:55:39 kamikaze redeem[312]: 04-28 15:55 root         INFO     Stepper watchdog started, timeout 60 s
Apr 28 15:55:39 kamikaze redeem[312]: 04-28 15:55 root         INFO     Ethernet bound to port 50000
Apr 28 15:55:39 kamikaze redeem[312]: 04-28 15:55 root         INFO     Pipe octoprint open. Use '/dev/octoprint_1' to communicate with it
Apr 28 15:55:40 kamikaze redeem[312]: 04-28 15:55 root         INFO     Pipe toggle open. Use '/dev/toggle_1' to communicate with it
Apr 28 15:55:40 kamikaze redeem[312]: 04-28 15:55 root         INFO     Pipe testing open. Use '/dev/testing_1' to communicate with it
Apr 28 15:55:40 kamikaze redeem[312]: 04-28 15:55 root         INFO     Pipe testing_noret open. Use '/dev/testing_noret_1' to communicate with it
Apr 28 15:55:40 kamikaze redeem[312]: 04-28 15:55 root         INFO     Alarm: Operational
Apr 28 15:55:40 kamikaze redeem[312]: 04-28 15:55 root         INFO     Watchdog started, refresh 30 s
Apr 28 15:55:40 kamikaze redeem[312]: 04-28 15:55 root         INFO     Redeem ready
root@kamikaze:~#