Reversed X Axis

All things related to the Rostock MAX 3D Printer, the worlds FIRST Delta kit!
Post Reply
User avatar
Zodd
Plasticator
Posts: 15
Joined: Wed Mar 06, 2013 3:23 pm
Location: Austria

Reversed X Axis

Post by Zodd »

Hello
For 4 days now, I'm the proud owner of a Rostock Max and I was able to successfully print a few testing figures. When I'm manually controlling the axes I found out that the X-axis moves into the wrong direction. Instead of moving into the + direction, it moves into the opposite, the - direction. So every model I'm printing out is mirrored at the x axis.

Is there an easy way to solve this? Like changing some parameters in the .h file?
User avatar
aehM_Key
Printmaster!
Posts: 200
Joined: Sun Nov 18, 2012 4:46 am
Location: Germany
Contact:

Re: Reversed X Axis

Post by aehM_Key »

How do you define positive X for you?
User avatar
Zodd
Plasticator
Posts: 15
Joined: Wed Mar 06, 2013 3:23 pm
Location: Austria

Re: Reversed X Axis

Post by Zodd »

When you sitting in front of the printer where the Rambo board is then is right from it the x axis, left from the board the y and in the back the z axis.The properly moving positions should be: delta arms moving right = x+, left is x-, forward is y-, backward y+, up z+ and down is z-.

For me the x movings are: moving left is x+ and right x-
User avatar
Zodd
Plasticator
Posts: 15
Joined: Wed Mar 06, 2013 3:23 pm
Location: Austria

Re: Reversed X Axis

Post by Zodd »

Anyone have an idea what i need change here that my printer stop printing objectc X axis mirrored? :|

Code: Select all

#ifndef CONFIGURATION_H
#define CONFIGURATION_H

// This configurtion file contains the basic settings.
// Advanced settings can be found in Configuration_adv.h 
// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration

//User specified version info of THIS file to display in [Pronterface, etc] terminal window during startup.
//Implementation of an idea by Prof Braino to inform user that any changes made
//to THIS file by the user have been successfully uploaded into firmware.
#define STRING_VERSION_CONFIG_H "02-08-2013" //Personal revision number for changes to THIS file.
#define STRING_CONFIG_H_AUTHOR "SeeMeCNC FOR 1.1 and later RAMBo w/ 16 stepping" //Who made the changes.

// This determines the communication speed of the printer
#define BAUDRATE 250000
//#define BAUDRATE 115200

//// The following define selects which electronics board you have. Please choose the one that matches your setup
// Gen7 custom (Alfons3 Version) = 10 "https://github.com/Alfons3/Generation_7_Electronics"
// Gen7 v1.1, v1.2 = 11
// Gen7 v1.3 = 12
// Gen7 v1.4 = 13
// MEGA/RAMPS up to 1.2 = 3
// RAMPS 1.3 = 33 (Power outputs: Extruder, Bed, Fan)
// RAMPS 1.3 = 34 (Power outputs: Extruder0, Extruder1, Bed)
// Gen6 = 5
// Gen6 deluxe = 51
// Sanguinololu 1.2 and above = 62
// Melzi = 63
// Ultimaker = 7
// Teensylu = 8
// Gen3+ =9
// Rambo = 301

#ifndef MOTHERBOARD
#define MOTHERBOARD 301
#endif



//===========================================================================
//=============================Thermal Settings  ============================
//===========================================================================
//
//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
//
//// Temperature sensor settings:
// -2 is thermocouple with MAX6675 (only for sensor 0)
// -1 is thermocouple with AD595
// 0 is not used
// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
// 3 is mendel-parts thermistor (4.7k pullup)
// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan) (4.7k pullup)
// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
//
//    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k 
//                          (but gives greater accuracy and more stable PID)
// 51 is 100k thermistor - EPCOS (1k pullup)
// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan) (1k pullup)

#define TEMP_SENSOR_0 5
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_BED 5

// Actual temperature must be close to target for this long before M109 returns success
#define TEMP_RESIDENCY_TIME 3	// (seconds)
#define TEMP_HYSTERESIS 3       // (degC) range of +/- temperatures considered "close" to the target one
#define TEMP_WINDOW     1       // (degC) Window around target to start the recidency timer x degC early.

// The minimal temperature defines the temperature below which the heater will not be enabled It is used
// to check that the wiring to the thermistor is not broken. 
// Otherwise this would lead to the heater being powered on all the time.
#define HEATER_0_MINTEMP 15
#define HEATER_1_MINTEMP 15
#define HEATER_2_MINTEMP 15
#define BED_MINTEMP 15

// When temperature exceeds max temp, your heater will be switched off.
// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
// You should use MINTEMP for thermistor short/failure protection.
#define HEATER_0_MAXTEMP 265
#define HEATER_1_MAXTEMP 265
#define HEATER_2_MAXTEMP 265
#define BED_MAXTEMP 120

// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4

// PID settings:
// Comment the following line to disable PID and enable bang-bang.
#define PIDTEMP
#define PID_MAX 255 // limits current to nozzle; 255=full current
#ifdef PIDTEMP
  //#define PID_DEBUG // Sends debug data to the serial port. 
  //#define PID_OPENLOOP 1 // Puts PID in open loop. M104 sets the output power in %
  #define PID_INTEGRAL_DRIVE_MAX 255  //limit for the integral term
  #define K1 0.95 //smoothing factor withing the PID
  #define PID_dT ((16.0 * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the

// If DEFAULT_Kp 46.78 DEFAULT_Kd 204 you are using a preconfigured hotend then you can use one of the value sets by uncommenting it

// SeeMeCNC "Steve's Hot-End"
    #define  DEFAULT_Kp 26.8
    #define  DEFAULT_Ki 1.10 
    #define  DEFAULT_Kd 164 


// Ultimaker
   // #define  DEFAULT_Kp 22.2
   // #define  DEFAULT_Ki 1.08  
    //#define  DEFAULT_Kd 114  

// Makergear
//    #define  DEFAULT_Kp 7.0
//    #define  DEFAULT_Ki 0.1  
//    #define  DEFAULT_Kd 12  

// Mendel Parts V9 on 12V    
//    #define  DEFAULT_Kp 63.0
//    #define  DEFAULT_Ki 2.25
//    #define  DEFAULT_Kd 440
#endif // PIDTEMP

//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
//can be software-disabled for whatever purposes by
#define PREVENT_DANGEROUS_EXTRUDE
//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately.
#define PREVENT_LENGTHY_EXTRUDE

#define EXTRUDE_MINTEMP 175
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.

//===========================================================================
//=============================Mechanical Settings===========================
//===========================================================================

// Uncomment the following line to enable CoreXY kinematics
// #define COREXY

// corse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors

#ifndef ENDSTOPPULLUPS
  // fine Enstop settings: Individual Pullups. will be ignord if ENDSTOPPULLUPS is defined
  #define ENDSTOPPULLUP_XMAX
  #define ENDSTOPPULLUP_YMAX
  #define ENDSTOPPULLUP_ZMAX
  #define ENDSTOPPULLUP_XMIN
  #define ENDSTOPPULLUP_YMIN
  #define ENDSTOPPULLUP_ZMIN
#endif

#ifdef ENDSTOPPULLUPS
  #define ENDSTOPPULLUP_XMAX
  #define ENDSTOPPULLUP_YMAX
  #define ENDSTOPPULLUP_ZMAX
  #define ENDSTOPPULLUP_XMIN
  #define ENDSTOPPULLUP_YMIN
  #define ENDSTOPPULLUP_ZMIN
#endif

// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool X_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
const bool Y_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.

//#define DISABLE_MAX_ENDSTOPS
#define DISABLE_MIN_ENDSTOPS


// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
#define X_ENABLE_ON 0
#define Y_ENABLE_ON 0
#define Z_ENABLE_ON 0
#define E_ENABLE_ON 0 // For all extruders

// Disables axis when it's not being used.
#define DISABLE_X false
#define DISABLE_Y false
#define DISABLE_Z false
#define DISABLE_E false // For all extruders

#define INVERT_X_DIR true   // for Mendel set to false, for Orca set to true
#define INVERT_Y_DIR true   // for Mendel set to true, for Orca set to false
#define INVERT_Z_DIR true   // for Mendel set to false, for Orca set to true
#define INVERT_E0_DIR true   // for direct drive extruder v9 set to true, for geared extruder set to false
#define INVERT_E1_DIR true    // for direct drive extruder v9 set to true, for geared extruder set to false
#define INVERT_E2_DIR true   // for direct drive extruder v9 set to true, for geared extruder set to false

// ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN
#define X_HOME_DIR 1
#define Y_HOME_DIR 1
#define Z_HOME_DIR 1

#define min_software_endstops false //If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops false //If true, axis won't move to coordinates greater than the defined lengths below.

// Travel limits after homing
// For Rostock, the MAX_POS doesn't have to be exact, it will be recalculated from Z_HOME_POS below.
#define X_MAX_POS 620
#define X_MIN_POS 0
#define Y_MAX_POS 620
#define Y_MIN_POS 0
#define Z_MAX_POS 620
#define Z_MIN_POS 0

#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)

// The home position of the print head.
// For Rostock this means top and center of the cartesian print volume.
#define X_HOME_POS 0
#define Y_HOME_POS 0
#define Z_HOME_POS 366.9 // Distance between nozzle and print surface after homing.

//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
#define HOMING_FEEDRATE {500, 500, 500, 0}  // set the homing speeds (mm/min)

// default settings 

#define DEFAULT_AXIS_STEPS_PER_UNIT   {106.666, 106.666, 106.666, 578.0}  // default steps per unit for rostockmax
#define DEFAULT_MAX_FEEDRATE          {300, 300, 300, 60}  // (mm/sec)
#define DEFAULT_MAX_ACCELERATION      {2000, 2000, 2000, 12000}  // X, Y, Z, E maximum start speed for accelerated moves.

#define DEFAULT_ACCELERATION          800   // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION  4500   // X, Y, Z and E max acceleration in mm/s^2 for r retracts

// 
#define DEFAULT_XYJERK                20.0   // (mm/sec)
#define DEFAULT_ZJERK                 20.0   // (mm/sec)
#define DEFAULT_EJERK                 20.0   // (mm/sec)

//===========================================================================
//=============================Additional Features===========================
//===========================================================================

// EEPROM
// the microcontroller can store settings in the EEPROM, e.g. max velocity...
// M500 - stores paramters in EEPROM
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).  
// M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
//define this to enable eeprom support
//#define EEPROM_SETTINGS
//to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
// please keep turned on if you can.
//#define EEPROM_CHITCHAT

//LCD and SD support
//#define ULTRA_LCD  //general lcd support, also 16x2
//#define SDSUPPORT // Enable SD Card Support in Hardware Console

//#define ULTIMAKERCONTROLLER //as available from the ultimaker online store.
//#define ULTIPANEL  //the ultipanel as on thingiverse


#ifdef ULTIMAKERCONTROLLER    //automatic expansion
 #define ULTIPANEL
 #define NEWPANEL
#endif 
 

#ifdef ULTIPANEL
//  #define NEWPANEL  //enable this if you have a click-encoder panel
  #define SDSUPPORT
  #define ULTRA_LCD
  #define LCD_WIDTH 20
  #define LCD_HEIGHT 4
  
// Preheat Constants
  #define PLA_PREHEAT_HOTEND_TEMP 180 
  #define PLA_PREHEAT_HPB_TEMP 70
  #define PLA_PREHEAT_FAN_SPEED 255		// Insert Value between 0 and 255

  #define ABS_PREHEAT_HOTEND_TEMP 230
  #define ABS_PREHEAT_HPB_TEMP 40
  #define ABS_PREHEAT_FAN_SPEED 255		// Insert Value between 0 and 255

#else //no panel but just lcd 
  #ifdef ULTRA_LCD
    #define LCD_WIDTH 16
    #define LCD_HEIGHT 2    
  #endif
#endif

// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
//#define FAST_PWM_FAN

// M240  Triggers a camera by emulating a Canon RC-1 Remote
// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
// #define PHOTOGRAPH_PIN     23

#include "Configuration_adv.h"
#include "thermistortables.h"

#endif //__CONFIGURATION_H
Bill Havins
Printmaster!
Posts: 88
Joined: Sun Mar 03, 2013 6:46 pm
Location: Abilene, Texas
Contact:

Re: Reversed X Axis

Post by Bill Havins »

Zodd,

Go to pages 84 and 85 of the most recent revision of the Rostock Max build manual. There you'll find a discussion of checking and reversing wires on the "misbehaving" stepper motor. You'll also see that, indeed, one of the lines of code in your post can be changed to correct the problem. Change the line that reads "#define INVERT_X_DIR true // for Mendel set to false, for Orca set to true" to: "#define INVERT_X_DIR false // for Mendel set to false, for Orca set to true".

Understand that I do not have my Rosotck MAX - it's on order. But I have expertise programming in C and the code you posted is pretty transparent. If I'm wrong about this surely someone will correct me.

Good luck!

Bill
"So many windmills, so little time." - Don Quixote
Post Reply

Return to “Rostock MAX”