Go Down

Topic: another cnc mill questionaire (Read 32 times) previous topic - next topic

mmcp42

sounds like you may have the steps per inch or steps per mm set wrong
It's meant to move by 1 cm in the direction indicated
there are only 10 types of people
them that understands binary
and them that doesn't

theMPloc

i think so. i calculated that i have 4064 steps per inch, as my stepper makes 200 steps per turn and my threaded rod makes a movement of 1.25mm per turn. i put that into init.pde and uploaded it.

in the init.pde there is only a section of steps per inch and no section of steps per mm. is that correct?

today i will add the switches to the machine.

have a nice day, me needs one or two more espressi ;)

mmcp42

hmm
I must admit I did hide it
at the very top of the code
with comments!!!!!
have another coffee
cheers
Mike

Code: [Select]
//=====================================
// define the parameters of our machine
//=====================================
#define X_STEPS_PER_INCH 6400
#define X_STEPS_PER_MM   252

#define Y_STEPS_PER_INCH 20000
#define Y_STEPS_PER_MM   2362.2

#define Z_STEPS_PER_INCH 6400
#define Z_STEPS_PER_MM   252.0
there are only 10 types of people
them that understands binary
and them that doesn't

theMPloc

#58
Jan 10, 2011, 04:03 pm Last Edit: Jan 10, 2011, 04:07 pm by theMPloc Reason: 1
hej, thanx. funny - after having some more coffee and double checking - only the steps per inch are in my init.pde.

now i add the milimeter ones ;) so that´s what my ini.pde looks like now. is this ok?
Code: [Select]
// constant for mm conversions
//============================
#define MM_PER_INCH 25.4

//=====================================
// define the parameters of our machine
//=====================================
#define X_STEPS_PER_INCH 4064
#define X_STEPS_PER_MM   160

#define Y_STEPS_PER_INCH 4064
#define Y_STEPS_PER_MM   160

#define Z_STEPS_PER_INCH 4064
#define Z_STEPS_PER_MM   160

//==================================
//our maximum feedrates units/minute
//==================================
#define FAST_XY_FEEDRATE_INCH 20.0
#define FAST_Z_FEEDRATE_INCH  20.0

//=======================
// Units in curve section
//=======================
#define CURVE_SECTION_MM 0.5

//=========================================
// Set to one if sensor outputs inverting
// (ie: 1 means open, 0 means closed)
// RepRap opto endstops are *not* inverting
//=========================================
#define SENSORS_INVERTING 0

//===============================================
// digital i/o pin assignment
// odd choices are for convenience to connectors
// NB Arduino pins 14-19 correspond to analog 0-5
//===============================================

//============================
// pin 0 used for serial comms
// pin 1 used for serial comms
//============================
#define SERIAL_RX_PIN 0
#define SERIAL_TX_PIN 1

//=======================================================
// shared enable pin (for rapid shutdown off all motors!)
//=======================================================
#define X_ENABLE_PIN 8
#define Y_ENABLE_PIN 18  // sb8
#define Z_ENABLE_PIN 19  // sb8

//===========================
// cartesian bot pins X-plane
// 6 7 A0 A1
//===========================
#define X_STEP_PIN 7
#define X_DIR_PIN 6
#define X_MIN_PIN 14
#define X_MAX_PIN 15

//===========================
// cartesian bot pins Y-plane
// 2 3 4 5
//===========================
#define Y_STEP_PIN 2
#define Y_DIR_PIN 3
#define Y_MIN_PIN 5
#define Y_MAX_PIN 4

//==================================================
// pin 13 used for heartbeat as it already has a LED
//==================================================
# define HEARTBEAT_PIN 13

//===========================
// cartesian bot pins Z-plane
// 9 10 11 12
//===========================
#define Z_STEP_PIN 9
#define Z_DIR_PIN 10
#define Z_MIN_PIN 5  // sb 11
#define Z_MAX_PIN 4  // sb 12

//==============
// motor control
// A4
//==============
#define MOTOR_ON_PIN 18           // HIGH = ON, LOW = OFF

//========================================
// motor direction doesn't have a pin yet!
//========================================
// #define MOTOR_DIRECTION_PIN 20    // HIGH = Clockwise, LOW = Anti-clockwise

//======================
// panic stop/reset
// A2 A3
//======================
#define PANIC_STOP_PIN 16
#define PANIC_OVER_PIN 17

//==================================================
// pin 19 (A5) is used for serial output to display
//==================================================
# define LCD_SERIAL_PIN 19




theMPloc

#59
Jan 10, 2011, 04:34 pm Last Edit: Jan 10, 2011, 04:58 pm by theMPloc Reason: 1
call me stupid but when i press the jog y button, the stepper motor makes exactly one turn what is 1.25 mm in the direction of the axis. what am i doing wrong?

if i send the following code:
Code: [Select]
G21
G1Y500.000


the machine moves 62.5mm

Go Up