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
23f5f244
Commit
23f5f244
authored
Jan 10, 2015
by
MagoKimbra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Del Kc
parent
1a6d824d
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
278 additions
and
310 deletions
+278
-310
Configuration.h
MarlinKimbra/Configuration.h
+33
-2
ConfigurationStore.cpp
MarlinKimbra/ConfigurationStore.cpp
+20
-24
Configuration_adv.h
MarlinKimbra/Configuration_adv.h
+0
-10
Marlin_main.cpp
MarlinKimbra/Marlin_main.cpp
+29
-22
dogm_lcd_implementation.h
MarlinKimbra/dogm_lcd_implementation.h
+194
-238
language_an.h
MarlinKimbra/language_an.h
+0
-1
language_ca.h
MarlinKimbra/language_ca.h
+0
-1
language_de.h
MarlinKimbra/language_de.h
+0
-1
language_en.h
MarlinKimbra/language_en.h
+0
-1
language_es.h
MarlinKimbra/language_es.h
+0
-1
language_eu.h
MarlinKimbra/language_eu.h
+0
-1
language_it.h
MarlinKimbra/language_it.h
+0
-1
temperature.cpp
MarlinKimbra/temperature.cpp
+0
-3
temperature.h
MarlinKimbra/temperature.h
+2
-4
No files found.
MarlinKimbra/Configuration.h
View file @
23f5f244
...
@@ -87,7 +87,31 @@
...
@@ -87,7 +87,31 @@
//**********************************************************************
//**********************************************************************
#if !defined(MKR4)
/***********************************************************************
*********************** Multiextruder NPr2 ***************************
***********************************************************************
* *
* Setting fot color meccanism NPr2 by NicolaP (www.3dmakerlab.it) *
* *
* Firmware by MagoKimbra magokimbra@hotmail.com *
* *
* Find angle setting by g-Code "M997 Cxxx" *
* *
***********************************************************************/
//#define NPR2
#ifdef NPR2
#define COLOR_STEP {120,25,-65,-155} // CARTER ANGLE
#define COLOR_SLOWRATE 170 // MICROSECOND delay for carter motor routine (Carter Motor Feedrate: upper value-slow feedrate)
#define COLOR_HOMERATE 4 // FEEDRATE for carter home
#define MOTOR_ANGLE 1.8 // Nema angle for single step
#define DRIVER_MICROSTEP 4 // Microstep moltiplicator driver (set jumper MS1-2-3) off-on-off 1/4 microstepping.
#define CARTER_MOLTIPLICATOR 14.22 // CARTER MOLTIPLICATOR (gear ratio 13/31-10/31)
#define DRIVER_EXTRUDERS 2 // This defines the number of Driver extruders
#endif
//**********************************************************************
#if !defined(MKR4) && !defined(NPR2)
#define DRIVER_EXTRUDERS EXTRUDERS // This defines the number of Driver extruders
#define DRIVER_EXTRUDERS EXTRUDERS // This defines the number of Driver extruders
#endif
#endif
...
@@ -515,7 +539,8 @@
...
@@ -515,7 +539,8 @@
#define LCD_UNLOAD_FEEDRATE 8 // mm/s
#define LCD_UNLOAD_FEEDRATE 8 // mm/s
#endif
#endif
// Show a progress bar on the LCD when printing from SD?
// Show a progress bar on HD44780 LCDs for SD printing
//#define LCD_PROGRESS_BAR
//#define LCD_PROGRESS_BAR
#ifdef LCD_PROGRESS_BAR
#ifdef LCD_PROGRESS_BAR
// Amount of time (ms) to show the bar
// Amount of time (ms) to show the bar
...
@@ -526,6 +551,12 @@
...
@@ -526,6 +551,12 @@
#define PROGRESS_BAR_MSG_EXPIRE 0
#define PROGRESS_BAR_MSG_EXPIRE 0
// Enable this to show messages for MSG_TIME then hide them
// Enable this to show messages for MSG_TIME then hide them
//#define PROGRESS_BAR_MSG_ONCE
//#define PROGRESS_BAR_MSG_ONCE
#ifdef DOGLCD
#warning LCD_PROGRESS_BAR does not apply to graphical displays at this time.
#endif
#ifdef FILAMENT_LCD_DISPLAY
#error LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both.
#endif
#endif
#endif
...
...
MarlinKimbra/ConfigurationStore.cpp
View file @
23f5f244
...
@@ -91,13 +91,7 @@ void Config_StoreSettings()
...
@@ -91,13 +91,7 @@ void Config_StoreSettings()
EEPROM_WRITE_VAR
(
i
,
Kp
);
EEPROM_WRITE_VAR
(
i
,
Kp
);
EEPROM_WRITE_VAR
(
i
,
Ki
);
EEPROM_WRITE_VAR
(
i
,
Ki
);
EEPROM_WRITE_VAR
(
i
,
Kd
);
EEPROM_WRITE_VAR
(
i
,
Kd
);
#else
#endif // PIDTEMP
float
dummy
=
3000.0
f
;
EEPROM_WRITE_VAR
(
i
,
dummy
);
dummy
=
0.0
f
;
EEPROM_WRITE_VAR
(
i
,
dummy
);
EEPROM_WRITE_VAR
(
i
,
dummy
);
#endif
#ifndef DOGLCD
#ifndef DOGLCD
int
lcd_contrast
=
32
;
int
lcd_contrast
=
32
;
#endif
#endif
...
@@ -270,12 +264,17 @@ void Config_PrintSettings()
...
@@ -270,12 +264,17 @@ void Config_PrintSettings()
#ifdef PIDTEMP
#ifdef PIDTEMP
SERIAL_ECHO_START
;
SERIAL_ECHO_START
;
SERIAL_ECHOLNPGM
(
"PID settings:"
);
SERIAL_ECHOLNPGM
(
"PID settings:"
);
SERIAL_ECHO_START
;
for
(
int
e
=
0
;
e
<
EXTRUDERS
;
e
++
)
SERIAL_ECHOPAIR
(
" M301 P"
,
Kp
[
active_extruder
]);
{
SERIAL_ECHOPAIR
(
" I"
,
unscalePID_i
(
Ki
[
active_extruder
]));
SERIAL_ECHO_START
;
SERIAL_ECHOPAIR
(
" D"
,
unscalePID_d
(
Kd
[
active_extruder
]));
SERIAL_ECHOPAIR
(
" M301 E"
,
(
long
unsigned
int
)
e
);
SERIAL_ECHOLN
(
""
);
SERIAL_ECHOPAIR
(
" P"
,
Kp
[
e
]);
#endif
SERIAL_ECHOPAIR
(
" I"
,
unscalePID_i
(
Ki
[
e
]));
SERIAL_ECHOPAIR
(
" D"
,
unscalePID_d
(
Kd
[
e
]));
SERIAL_ECHOLN
(
""
);
}
#endif // PIDTEMP
#ifdef FWRETRACT
#ifdef FWRETRACT
SERIAL_ECHO_START
;
SERIAL_ECHO_START
;
SERIAL_ECHOLNPGM
(
"Retract: S=Length (mm) F:Speed (mm/m) Z: ZLift (mm)"
);
SERIAL_ECHOLNPGM
(
"Retract: S=Length (mm) F:Speed (mm/m) Z: ZLift (mm)"
);
...
@@ -391,13 +390,14 @@ void Config_RetrieveSettings()
...
@@ -391,13 +390,14 @@ void Config_RetrieveSettings()
EEPROM_READ_VAR
(
i
,
gumPreheatHotendTemp
);
EEPROM_READ_VAR
(
i
,
gumPreheatHotendTemp
);
EEPROM_READ_VAR
(
i
,
gumPreheatHPBTemp
);
EEPROM_READ_VAR
(
i
,
gumPreheatHPBTemp
);
EEPROM_READ_VAR
(
i
,
gumPreheatFanSpeed
);
EEPROM_READ_VAR
(
i
,
gumPreheatFanSpeed
);
#ifndef PIDTEMP
float
Kp
,
Ki
,
Kd
;
#ifdef PIDTEMP
#endif
// do not need to scale PID values as the values in EEPROM are already scaled
// do not need to scale PID values as the values in EEPROM are already scaled
EEPROM_READ_VAR
(
i
,
Kp
);
EEPROM_READ_VAR
(
i
,
Kp
);
EEPROM_READ_VAR
(
i
,
Ki
);
EEPROM_READ_VAR
(
i
,
Ki
);
EEPROM_READ_VAR
(
i
,
Kd
);
EEPROM_READ_VAR
(
i
,
Kd
);
#endif // PIDTEMP
#ifndef DOGLCD
#ifndef DOGLCD
int
lcd_contrast
;
int
lcd_contrast
;
#endif
#endif
...
@@ -461,7 +461,7 @@ void Config_ResetDefault()
...
@@ -461,7 +461,7 @@ void Config_ResetDefault()
float
tmp5
[]
=
DEFAULT_Kp
;
float
tmp5
[]
=
DEFAULT_Kp
;
float
tmp6
[]
=
DEFAULT_Ki
;
float
tmp6
[]
=
DEFAULT_Ki
;
float
tmp7
[]
=
DEFAULT_Kd
;
float
tmp7
[]
=
DEFAULT_Kd
;
#endif
#endif
// PIDTEMP
for
(
short
i
=
0
;
i
<
7
;
i
++
)
for
(
short
i
=
0
;
i
<
7
;
i
++
)
{
{
...
@@ -517,6 +517,8 @@ void Config_ResetDefault()
...
@@ -517,6 +517,8 @@ void Config_ResetDefault()
lcd_contrast
=
DEFAULT_LCD_CONTRAST
;
lcd_contrast
=
DEFAULT_LCD_CONTRAST
;
#endif
#endif
#ifdef PIDTEMP
#ifdef PIDTEMP
// call updatePID (similar to when we have processed M301)
updatePID
();
for
(
short
i
=
0
;
i
<
4
;
i
++
)
for
(
short
i
=
0
;
i
<
4
;
i
++
)
{
{
#ifdef SINGLENOZZLE
#ifdef SINGLENOZZLE
...
@@ -528,14 +530,8 @@ void Config_ResetDefault()
...
@@ -528,14 +530,8 @@ void Config_ResetDefault()
Ki
[
i
]
=
scalePID_i
(
tmp6
[
i
]);
Ki
[
i
]
=
scalePID_i
(
tmp6
[
i
]);
Kd
[
i
]
=
scalePID_d
(
tmp7
[
i
]);
Kd
[
i
]
=
scalePID_d
(
tmp7
[
i
]);
#endif
#endif
}
}
// call updatePID (similar to when we have processed M301)
updatePID
();
#ifdef PID_ADD_EXTRUSION_RATE
Kc
=
DEFAULT_Kc
;
#endif//PID_ADD_EXTRUSION_RATE
#endif//PIDTEMP
#endif//PIDTEMP
#ifdef FWRETRACT
#ifdef FWRETRACT
...
...
MarlinKimbra/Configuration_adv.h
View file @
23f5f244
...
@@ -28,16 +28,6 @@
...
@@ -28,16 +28,6 @@
//#define WATCH_TEMP_PERIOD 40000 //40 seconds
//#define WATCH_TEMP_PERIOD 40000 //40 seconds
//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds
//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds
#ifdef PIDTEMP
// this adds an experimental additional term to the heating power, proportional to the extrusion speed.
// if Kc is chosen well, the additional required power due to increased melting should be compensated.
#define PID_ADD_EXTRUSION_RATE
#ifdef PID_ADD_EXTRUSION_RATE
#define DEFAULT_Kc (1) //heating power=Kc*(e_speed)
#endif
#endif
//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
//The maximum buffered steps/sec of the extruder motor are called "se".
//The maximum buffered steps/sec of the extruder motor are called "se".
//You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>
//You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>
...
...
MarlinKimbra/Marlin_main.cpp
View file @
23f5f244
...
@@ -4497,28 +4497,35 @@ Sigma_Exit:
...
@@ -4497,28 +4497,35 @@ Sigma_Exit:
#ifdef PIDTEMP
#ifdef PIDTEMP
case
301
:
// M301
case
301
:
// M301
{
{
if
(
code_seen
(
'P'
))
Kp
[
active_extruder
]
=
code_value
();
// multi-extruder PID patch: M301 updates or prints a single extruder's PID values
if
(
code_seen
(
'I'
))
Ki
[
active_extruder
]
=
scalePID_i
(
code_value
());
// default behaviour (omitting E parameter) is to update for extruder 0 only
if
(
code_seen
(
'D'
))
Kd
[
active_extruder
]
=
scalePID_d
(
code_value
());
int
e
=
0
;
// extruder being updated
if
(
code_seen
(
'E'
))
#ifdef PID_ADD_EXTRUSION_RATE
{
if
(
code_seen
(
'C'
))
Kc
=
code_value
();
e
=
(
int
)
code_value
();
#endif
}
if
(
e
<
EXTRUDERS
)
// catch bad input value
updatePID
();
{
SERIAL_PROTOCOL
(
MSG_OK
);
if
(
code_seen
(
'P'
))
Kp
[
e
]
=
code_value
();
SERIAL_PROTOCOL
(
" p:"
);
if
(
code_seen
(
'I'
))
Ki
[
e
]
=
scalePID_i
(
code_value
());
SERIAL_PROTOCOL
(
Kp
[
active_extruder
]);
if
(
code_seen
(
'D'
))
Kd
[
e
]
=
scalePID_d
(
code_value
());
SERIAL_PROTOCOL
(
" i:"
);
updatePID
();
SERIAL_PROTOCOL
(
unscalePID_i
(
Ki
[
active_extruder
]));
SERIAL_PROTOCOL
(
MSG_OK
);
SERIAL_PROTOCOL
(
" d:"
);
SERIAL_PROTOCOL
(
" e:"
);
// specify extruder in serial output
SERIAL_PROTOCOL
(
unscalePID_d
(
Kd
[
active_extruder
]));
SERIAL_PROTOCOL
(
e
);
#ifdef PID_ADD_EXTRUSION_RATE
SERIAL_PROTOCOL
(
" p:"
);
SERIAL_PROTOCOL
(
" c:"
);
SERIAL_PROTOCOL
(
Kp
[
e
]);
//Kc does not have scaling applied above, or in resetting defaults
SERIAL_PROTOCOL
(
" i:"
);
SERIAL_PROTOCOL
(
Kc
);
SERIAL_PROTOCOL
(
unscalePID_i
(
Ki
[
e
]));
#endif
SERIAL_PROTOCOL
(
" d:"
);
SERIAL_PROTOCOLLN
(
""
);
SERIAL_PROTOCOL
(
unscalePID_d
(
Kd
[
e
]));
SERIAL_PROTOCOLLN
(
""
);
}
else
{
SERIAL_ECHO_START
;
SERIAL_ECHOLN
(
MSG_INVALID_EXTRUDER
);
}
}
}
break
;
break
;
#endif //PIDTEMP
#endif //PIDTEMP
...
...
MarlinKimbra/dogm_lcd_implementation.h
View file @
23f5f244
This diff is collapsed.
Click to expand it.
MarlinKimbra/language_an.h
View file @
23f5f244
...
@@ -79,7 +79,6 @@
...
@@ -79,7 +79,6 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Acel"
#define MSG_ACC "Acel"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VZ_JERK "Vz-jerk"
...
...
MarlinKimbra/language_ca.h
View file @
23f5f244
...
@@ -66,7 +66,6 @@
...
@@ -66,7 +66,6 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Accel"
#define MSG_ACC "Accel"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VZ_JERK "Vz-jerk"
...
...
MarlinKimbra/language_de.h
View file @
23f5f244
...
@@ -79,7 +79,6 @@
...
@@ -79,7 +79,6 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Acc"
#define MSG_ACC "Acc"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VZ_JERK "Vz-jerk"
...
...
MarlinKimbra/language_en.h
View file @
23f5f244
...
@@ -79,7 +79,6 @@
...
@@ -79,7 +79,6 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Accel"
#define MSG_ACC "Accel"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VZ_JERK "Vz-jerk"
...
...
MarlinKimbra/language_es.h
View file @
23f5f244
...
@@ -66,7 +66,6 @@
...
@@ -66,7 +66,6 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Acel"
#define MSG_ACC "Acel"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VZ_JERK "Vz-jerk"
...
...
MarlinKimbra/language_eu.h
View file @
23f5f244
...
@@ -66,7 +66,6 @@
...
@@ -66,7 +66,6 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Azelerazioa"
#define MSG_ACC "Azelerazioa"
#define MSG_VXY_JERK "Vxy-astindua"
#define MSG_VXY_JERK "Vxy-astindua"
#define MSG_VZ_JERK "Vz-astindua"
#define MSG_VZ_JERK "Vz-astindua"
...
...
MarlinKimbra/language_it.h
View file @
23f5f244
...
@@ -79,7 +79,6 @@
...
@@ -79,7 +79,6 @@
#define MSG_PID_P "PID-P"
#define MSG_PID_P "PID-P"
#define MSG_PID_I "PID-I"
#define MSG_PID_I "PID-I"
#define MSG_PID_D "PID-D"
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Accel"
#define MSG_ACC "Accel"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VZ_JERK "Vz-jerk"
...
...
MarlinKimbra/temperature.cpp
View file @
23f5f244
...
@@ -60,9 +60,6 @@ float current_temperature_bed = 0.0;
...
@@ -60,9 +60,6 @@ float current_temperature_bed = 0.0;
float
Kp
[
4
];
float
Kp
[
4
];
float
Ki
[
4
];
float
Ki
[
4
];
float
Kd
[
4
];
float
Kd
[
4
];
#ifdef PID_ADD_EXTRUSION_RATE
float
Kc
;
#endif
#endif //PIDTEMP
#endif //PIDTEMP
#ifdef PIDTEMPBED
#ifdef PIDTEMPBED
...
...
MarlinKimbra/temperature.h
View file @
23f5f244
...
@@ -23,9 +23,7 @@
...
@@ -23,9 +23,7 @@
#include "Marlin.h"
#include "Marlin.h"
#include "planner.h"
#include "planner.h"
#ifdef PID_ADD_EXTRUSION_RATE
#include "stepper.h"
#endif
// public functions
// public functions
void
tp_init
();
//initialize the heating
void
tp_init
();
//initialize the heating
...
@@ -68,7 +66,7 @@ extern float current_temperature_bed;
...
@@ -68,7 +66,7 @@ extern float current_temperature_bed;
#endif
#endif
#ifdef PIDTEMP
#ifdef PIDTEMP
extern
float
Kp
[
4
],
Ki
[
4
],
Kd
[
4
]
,
Kc
;
extern
float
Kp
[
4
],
Ki
[
4
],
Kd
[
4
];
float
scalePID_i
(
float
i
);
float
scalePID_i
(
float
i
);
float
scalePID_d
(
float
d
);
float
scalePID_d
(
float
d
);
float
unscalePID_i
(
float
i
);
float
unscalePID_i
(
float
i
);
...
...
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