Defines

config.gen3.h File Reference

Gen3 Electronics Sample Configuration. More...

#include "arduino.h"

Go to the source code of this file.

Defines

#define HOST
 This is the motherboard, as opposed to the extruder.
#define STEPS_PER_MM_X   320.000
#define STEPS_PER_MM_Y   320.000
#define STEPS_PER_MM_Z   200.000
#define STEPS_PER_MM_E   320.000
 http://blog.arcol.hu/?p=157 may help with this one
#define MAXIMUM_FEEDRATE_X   200
 used for G0 rapid moves and as a cap for all other feedrates
#define MAXIMUM_FEEDRATE_Y   200
#define MAXIMUM_FEEDRATE_Z   100
#define MAXIMUM_FEEDRATE_E   200
#define SEARCH_FEEDRATE_X   50
 used when searching endstops and as default feedrate
#define SEARCH_FEEDRATE_Y   50
#define SEARCH_FEEDRATE_Z   50
#define SEARCH_FEEDRATE_E   50
#define E_STARTSTOP_STEPS   20
 this is how many steps to suck back the filament by when we stop. set to zero to disable
#define X_MIN   0.0
 Soft axis limits, in mm undefine if you don't want to use them.
#define X_MAX   200.0
#define Y_MIN   0.0
#define Y_MAX   200.0
#define Z_MIN   0.0
#define Z_MAX   140.0
#define ACCELERATION_RAMPING
 acceleration and deceleration ramping.
#define ACCELERATION_STEEPNESS   500000
 how fast to accelerate when using ACCELERATION_RAMPING smaller values give quicker acceleration valid range = 1 to 8,000,000; 500,000 is a good starting point
#define TX_ENABLE_PIN   DIO12
 this is the official gen3 reprap motherboard pinout
#define RX_ENABLE_PIN   DIO13
#define X_STEP_PIN   DIO15
#define X_DIR_PIN   DIO18
#define X_MIN_PIN   DIO20
#define X_MAX_PIN   DIO21
#define X_ENABLE_PIN   DIO19
#define Y_STEP_PIN   DIO23
#define Y_DIR_PIN   DIO22
#define Y_MIN_PIN   AIO6
#define Y_MAX_PIN   AIO5
#define Y_ENABLE_PIN   DIO7
#define Z_STEP_PIN   AIO4
#define Z_DIR_PIN   AIO3
#define Z_MIN_PIN   AIO1
#define Z_MAX_PIN   AIO0
#define Z_ENABLE_PIN   AIO2
#define E_STEP_PIN   DIO16
#define E_DIR_PIN   DIO17
#define SD_CARD_DETECT   DIO2
#define SD_WRITE_PROTECT   DIO3
#define TEMP_HYSTERESIS   20
 TEMP_HYSTERESIS: actual temperature must be target +/- hysteresis before target temperature can be achieved.
#define TEMP_RESIDENCY_TIME   60
 TEMP_RESIDENCY_TIME: actual temperature must be close to target for this long before target is achieved.
#define TEMP_INTERCOM
#define DEFINE_TEMP_SENSOR(...)
#define DEFINE_HEATER(...)
#define REPRAP_HOST_COMPATIBILITY   20100806
 RepRap Host changes it's communications protocol from time to time and intentionally avoids backwards compatibility.
#define BAUD   115200
 Baud rate for the connection to the host.
#define MOVEBUFFER_SIZE   8
 move buffer size, in number of moves note that each move takes a fair chunk of ram (69 bytes as of this writing) so don't make the buffer too big - a bigger serial readbuffer may help more than increasing this unless your gcodes are more than 70 characters long on average.
#define REFERENCE   REFERENCE_AVCC
 analog subsystem stuff REFERENCE - which analog reference to use.
#define STEP_INTERRUPT_INTERRUPTIBLE   1
 this option makes the step interrupt interruptible (nested).
#define TH_COUNT   8
 temperature history count.
#define PID_SCALE   1024L
 this is the scaling of internally stored PID values. 1024L is a good value

Detailed Description

Gen3 Electronics Sample Configuration.


Define Documentation

#define ACCELERATION_RAMPING

acceleration and deceleration ramping.

Each movement starts at (almost) no speed, linearly accelerates to target speed and decelerates just in time to smoothly stop at the target. alternative to ACCELERATION_REPRAP

#define BAUD   115200

Baud rate for the connection to the host.

Usually 115200, other common values are 19200, 38400 or 57600.

Referenced by serial_init().

#define HOST

This is the motherboard, as opposed to the extruder.

See extruder/ directory for GEN3 extruder firmware

#define MOVEBUFFER_SIZE   8

move buffer size, in number of moves note that each move takes a fair chunk of ram (69 bytes as of this writing) so don't make the buffer too big - a bigger serial readbuffer may help more than increasing this unless your gcodes are more than 70 characters long on average.

however, a larger movebuffer will probably help with lots of short consecutive moves, as each move takes a bunch of math (hence time) to set up so a longer buffer allows more of the math to be done during preceding longer moves

Referenced by enqueue(), next_move(), and queue_full().

#define REFERENCE   REFERENCE_AVCC

analog subsystem stuff REFERENCE - which analog reference to use.

see analog.h for choices

Referenced by analog_init(), and ISR().

#define REPRAP_HOST_COMPATIBILITY   20100806

RepRap Host changes it's communications protocol from time to time and intentionally avoids backwards compatibility.

Set this to the date the source code of your Host was fetched from RepRap's repository, which is likely also the build date. See the discussion on the reprap-dev mailing list from 11 Oct. 2010.

Undefine it for best human readability, set it to an old date for compatibility with hosts before August 2010

#define STEP_INTERRUPT_INTERRUPTIBLE   1

this option makes the step interrupt interruptible (nested).

this should help immensely with dropped serial characters, but may also make debugging infuriating due to the complexities arising from nested interrupts

#define TEMP_HYSTERESIS   20

TEMP_HYSTERESIS: actual temperature must be target +/- hysteresis before target temperature can be achieved.

NOTE: format is 30.2 fixed point, so value of 20 actually means +/- 5 degrees

Referenced by heater_tick(), and temp_sensor_tick().

#define TEMP_RESIDENCY_TIME   60

TEMP_RESIDENCY_TIME: actual temperature must be close to target for this long before target is achieved.

temperature is "achieved" for purposes of M109 and friends when actual temperature is within [hysteresis] of target for [residency] seconds

Referenced by temp_achieved(), and temp_sensor_tick().

#define TH_COUNT   8

temperature history count.

This is how many temperature readings to keep in order to calculate derivative in PID loop higher values make PID derivative term more stable at the expense of reaction time

Referenced by heater_tick().

 All Data Structures Files Functions Variables Defines