Welcome! Log In Create A New Profile

Advanced

Question Regarding Marlin Firmware Code

Posted by Joe112 
Question Regarding Marlin Firmware Code
October 31, 2016 04:05PM
Hello All,

I believe that Arduino Code and Marlin are generating a effective print radius smaller than I want (refer to image attached). Could anyone tell me if this is true, and if so, is there any solution to gain an effective print radius?(please also see attached image)

My Arduino H configuration;

// Effective X/Y positions of the three vertical towers.
#define SIN_60 0.8660254037844386
#define COS_60 0.5
#define DELTA_TOWER1_X -SIN_60*DELTA_RADIUS // front left tower
#define DELTA_TOWER1_Y -COS_60*DELTA_RADIUS
#define DELTA_TOWER2_X SIN_60*DELTA_RADIUS // front right tower
#define DELTA_TOWER2_Y -COS_60*DELTA_RADIUS
#define DELTA_TOWER3_X 0.5 // back middle tower
#define DELTA_TOWER3_Y DELTA_RADIUS

My Marlin Main;

void calculate_delta(float cartesian[3])
{
delta[X_AXIS] = sqrt(sq(DELTA_DIAGONAL_ROD)
- sq(DELTA_TOWER1_X-cartesian[X_AXIS])
- sq(DELTA_TOWER1_Y-cartesian[Y_AXIS])
) + cartesian[Z_AXIS];
delta[Y_AXIS] = sqrt(sq(DELTA_DIAGONAL_ROD)
- sq(DELTA_TOWER2_X-cartesian[X_AXIS])
- sq(DELTA_TOWER2_Y-cartesian[Y_AXIS])
) + cartesian[Z_AXIS];
delta[Z_AXIS] = sqrt(sq(DELTA_DIAGONAL_ROD)
- sq(DELTA_TOWER3_X-cartesian[X_AXIS])
- sq(DELTA_TOWER3_Y-cartesian[Y_AXIS])
) + cartesian[Z_AXIS];
/*
SERIAL_ECHOPGM("cartesian x="); SERIAL_ECHO(cartesian[X_AXIS]);
SERIAL_ECHOPGM(" y="); SERIAL_ECHO(cartesian[Y_AXIS]);
SERIAL_ECHOPGM(" z="); SERIAL_ECHOLN(cartesian[Z_AXIS]);

SERIAL_ECHOPGM("delta x="); SERIAL_ECHO(delta[X_AXIS]);
SERIAL_ECHOPGM(" y="); SERIAL_ECHO(delta[Y_AXIS]);
SERIAL_ECHOPGM(" z="); SERIAL_ECHOLN(delta[Z_AXIS]);
*/
}

void adjust_delta(float cartesian[3])
{
int grid_x = max(0, min(7, int(cartesian[X_AXIS]/25.0 + 3.5)));
int grid_y = max(0, min(7, int(cartesian[Y_AXIS]/25.0 + 3.5)));
float offset = bed_level[grid_x][grid_y];

delta[X_AXIS] += offset;
delta[Y_AXIS] += offset;
delta[Z_AXIS] += offset;

/*
SERIAL_ECHOPGM("grid_x="); SERIAL_ECHO(grid_x);
SERIAL_ECHOPGM(" grid_y="); SERIAL_ECHO(grid_y);
SERIAL_ECHOPGM(" offset="); SERIAL_ECHOLN(offset);
*/
}





Thanks!
Attachments:
open | download - IMG_26051.jpg (127.6 KB)
Sorry, only registered users may post in this forum.

Click here to login