Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MarlinKimbra
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
MarlinKimbra
Commits
b5c2d02a
Commit
b5c2d02a
authored
Aug 17, 2015
by
MagoKimbra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix COREXY and COREXZ
parent
303c6865
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
22 deletions
+33
-22
Configuration.h
MarlinKimbra/Configuration.h
+0
-7
Configuration_Core.h
MarlinKimbra/Configuration_Core.h
+15
-0
planner.cpp
MarlinKimbra/planner.cpp
+18
-15
No files found.
MarlinKimbra/Configuration.h
View file @
b5c2d02a
...
...
@@ -63,13 +63,6 @@
//#define SCARA
/***********************************************************************\
/***********************************************************************\
************************ CORE X (YZ) MOLTIPLICATOR ********************
***********************************************************************/
// This define the moltiplicator axis from X to Y or Z in COREXY or
// COREXZ. Normally is equal 1.
#define COREX_MOLTIPLICATOR 1
/***********************************************************************\
********************** Do not touch this section **********************
***********************************************************************/
...
...
MarlinKimbra/Configuration_Core.h
View file @
b5c2d02a
...
...
@@ -6,6 +6,21 @@
//=============================Mechanical Settings===========================
//===========================================================================
/***********************************************************************
************************ CORE X (YZ) MOLTIPLICATOR ********************
***********************************************************************
* This define the moltiplicator axis from X to Y or Z in COREXY or
* COREXZ.
* Example:
* COREXY set COREX_XZ_FACTOR 1
* The result is:
* X = dX + COREX_YZ_FACTOR * dY = dX + 1 * dY = dX + dY
* Y = dX - COREX_YZ_FACTOR * dY = dX - 1 * dY = dX - dY
* Z = dZ
*/
#define COREX_YZ_FACTOR 1
// coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
...
...
MarlinKimbra/planner.cpp
View file @
b5c2d02a
...
...
@@ -521,9 +521,12 @@ float junction_deviation = 0.1;
dy
=
target
[
Y_AXIS
]
-
position
[
Y_AXIS
],
dz
=
target
[
Z_AXIS
]
-
position
[
Z_AXIS
],
de
=
target
[
E_AXIS
]
-
position
[
E_AXIS
];
#if ENABLED(COREXY) || ENABLED(COREXZ)
int
MX
=
COREX_MOLTIPLICATOR
;
#if ENABLED(COREXY)
float
da
=
dx
+
COREX_YZ_FACTOR
*
dy
;
float
db
=
dx
-
COREX_YZ_FACTOR
*
dy
;
#elif ENABLED(COREXZ)
float
da
=
dx
+
COREX_YZ_FACTOR
*
dz
;
float
dc
=
dx
-
COREX_YZ_FACTOR
*
dz
;
#endif
#if ENABLED(PREVENT_DANGEROUS_EXTRUDE)
...
...
@@ -566,14 +569,14 @@ float junction_deviation = 0.1;
#if ENABLED(COREXY)
// corexy planning
// these equations follow the form of the dA and dB equations on http://www.corexy.com/theory.html
block
->
steps
[
A_AXIS
]
=
labs
(
d
x
+
MX
*
dy
);
block
->
steps
[
B_AXIS
]
=
labs
(
d
x
-
MX
*
dy
);
block
->
steps
[
A_AXIS
]
=
labs
(
d
a
);
block
->
steps
[
B_AXIS
]
=
labs
(
d
b
);
block
->
steps
[
Z_AXIS
]
=
labs
(
dz
);
#elif ENABLED(COREXZ)
// corexz planning
block
->
steps
[
A_AXIS
]
=
labs
(
d
x
+
MX
*
dz
);
block
->
steps
[
A_AXIS
]
=
labs
(
d
a
);
block
->
steps
[
Y_AXIS
]
=
labs
(
dy
);
block
->
steps
[
C_AXIS
]
=
labs
(
d
x
-
MX
*
dz
);
block
->
steps
[
C_AXIS
]
=
labs
(
d
c
);
#else
// default non-h-bot planning
block
->
steps
[
X_AXIS
]
=
labs
(
dx
);
...
...
@@ -607,14 +610,14 @@ float junction_deviation = 0.1;
if
(
dx
<
0
)
db
|=
BIT
(
X_HEAD
);
// Save the real Extruder (head) direction in X Axis
if
(
dy
<
0
)
db
|=
BIT
(
Y_HEAD
);
// ...and Y
if
(
dz
<
0
)
db
|=
BIT
(
Z_AXIS
);
if
(
d
x
+
MX
*
dy
<
0
)
db
|=
BIT
(
A_AXIS
);
// Motor A direction
if
(
d
x
-
MX
*
dy
<
0
)
db
|=
BIT
(
B_AXIS
);
// Motor B direction
if
(
d
a
<
0
)
db
|=
BIT
(
A_AXIS
);
// Motor A direction
if
(
d
b
<
0
)
db
|=
BIT
(
B_AXIS
);
// Motor B direction
#elif ENABLED(COREXZ)
if
(
dx
<
0
)
db
|=
BIT
(
X_HEAD
);
// Save the real Extruder (head) direction in X Axis
if
(
dy
<
0
)
db
|=
BIT
(
Y_AXIS
);
if
(
dz
<
0
)
db
|=
BIT
(
Z_HEAD
);
// ...and Z
if
(
d
x
+
MX
*
dz
<
0
)
db
|=
BIT
(
A_AXIS
);
// Motor A direction
if
(
d
x
-
MX
*
dz
<
0
)
db
|=
BIT
(
C_AXIS
);
// Motor B direction
if
(
d
a
<
0
)
db
|=
BIT
(
A_AXIS
);
// Motor A direction
if
(
d
c
<
0
)
db
|=
BIT
(
C_AXIS
);
// Motor B direction
#else
if
(
dx
<
0
)
db
|=
BIT
(
X_AXIS
);
if
(
dy
<
0
)
db
|=
BIT
(
Y_AXIS
);
...
...
@@ -749,15 +752,15 @@ float junction_deviation = 0.1;
delta_mm
[
X_HEAD
]
=
dx
/
axis_steps_per_unit
[
A_AXIS
];
delta_mm
[
Y_HEAD
]
=
dy
/
axis_steps_per_unit
[
B_AXIS
];
delta_mm
[
Z_AXIS
]
=
dz
/
axis_steps_per_unit
[
Z_AXIS
];
delta_mm
[
A_AXIS
]
=
(
dx
+
MX
*
dy
)
/
axis_steps_per_unit
[
A_AXIS
];
delta_mm
[
B_AXIS
]
=
(
dx
-
MX
*
dy
)
/
axis_steps_per_unit
[
B_AXIS
];
delta_mm
[
A_AXIS
]
=
da
/
axis_steps_per_unit
[
A_AXIS
];
delta_mm
[
B_AXIS
]
=
db
/
axis_steps_per_unit
[
B_AXIS
];
#elif ENABLED(COREXZ)
float
delta_mm
[
6
];
delta_mm
[
X_HEAD
]
=
dx
/
axis_steps_per_unit
[
A_AXIS
];
delta_mm
[
Y_AXIS
]
=
dy
/
axis_steps_per_unit
[
Y_AXIS
];
delta_mm
[
Z_HEAD
]
=
dz
/
axis_steps_per_unit
[
C_AXIS
];
delta_mm
[
A_AXIS
]
=
(
dx
+
MX
*
dz
)
/
axis_steps_per_unit
[
A_AXIS
];
delta_mm
[
C_AXIS
]
=
(
dx
-
MX
*
dz
)
/
axis_steps_per_unit
[
C_AXIS
];
delta_mm
[
A_AXIS
]
=
da
/
axis_steps_per_unit
[
A_AXIS
];
delta_mm
[
C_AXIS
]
=
dc
/
axis_steps_per_unit
[
C_AXIS
];
#else
float
delta_mm
[
4
];
delta_mm
[
X_AXIS
]
=
dx
/
axis_steps_per_unit
[
X_AXIS
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment