Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
marlin-anet-a8
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
c57906b6
Commit
c57906b6
authored
Nov 13, 2011
by
Bernhard Kubicek
Browse files
Options
Downloads
Patches
Plain Diff
fixed bug with adjusting ki in realtime.
parent
9980ceb4
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Marlin/Configuration.h
+4
-4
4 additions, 4 deletions
Marlin/Configuration.h
Marlin/Marlin.pde
+22
-18
22 additions, 18 deletions
Marlin/Marlin.pde
Marlin/temperature.cpp
+7
-0
7 additions, 0 deletions
Marlin/temperature.cpp
Marlin/temperature.h
+1
-0
1 addition, 0 deletions
Marlin/temperature.h
with
34 additions
and
22 deletions
Marlin/Configuration.h
+
4
−
4
View file @
c57906b6
...
@@ -95,11 +95,11 @@
...
@@ -95,11 +95,11 @@
// PID_SWING_AT_CRITIAL is the time for a full period of the oscillations at the critical Gain
// PID_SWING_AT_CRITIAL is the time for a full period of the oscillations at the critical Gain
// usually further manual tunine is necessary.
// usually further manual tunine is necessary.
#define PID_CRITIAL_GAIN
300
0
#define PID_CRITIAL_GAIN
5
0
#define PID_SWING_AT_CRITIAL 4
5
//seconds
#define PID_SWING_AT_CRITIAL 4
7
//seconds
#define PID_PI //no differentail term
//
#define PID_PI //no differentail term
//
#define PID_PID //normal PID
#define PID_PID //normal PID
#ifdef PID_PID
#ifdef PID_PID
//PID according to Ziegler-Nichols method
//PID according to Ziegler-Nichols method
...
...
...
...
This diff is collapsed.
Click to expand it.
Marlin/Marlin.pde
+
22
−
18
View file @
c57906b6
...
@@ -898,12 +898,16 @@ inline void process_commands()
...
@@ -898,12 +898,16 @@ inline void process_commands()
#ifdef PIDTEMP
#ifdef PIDTEMP
case
301
:
// M301
case
301
:
// M301
{
if
(
code_seen
(
'P'
))
Kp
=
code_value
();
if
(
code_seen
(
'P'
))
Kp
=
code_value
();
if
(
code_seen
(
'I'
))
Ki
=
code_value
()
*
PID_dT
;
if
(
code_seen
(
'I'
))
Ki
=
code_value
()
*
PID_dT
;
if
(
code_seen
(
'D'
))
Kd
=
code_value
()
/
PID_dT
;
if
(
code_seen
(
'D'
))
Kd
=
code_value
()
/
PID_dT
;
#ifdef PID_ADD_EXTRUSION_RATE
#ifdef PID_ADD_EXTRUSION_RATE
if
(
code_seen
(
'C'
))
Kc
=
code_value
();
if
(
code_seen
(
'C'
))
Kc
=
code_value
();
#endif
#endif
updatePID
();
SERIAL_PROTOCOL
(
"ok p:"
);
SERIAL_PROTOCOL
(
"ok p:"
);
SERIAL_PROTOCOL
(
Kp
);
SERIAL_PROTOCOL
(
Kp
);
SERIAL_PROTOCOL
(
" i:"
);
SERIAL_PROTOCOL
(
" i:"
);
...
@@ -915,7 +919,7 @@ inline void process_commands()
...
@@ -915,7 +919,7 @@ inline void process_commands()
SERIAL_PROTOCOL
(
Kc
*
PID_dT
);
SERIAL_PROTOCOL
(
Kc
*
PID_dT
);
#endif
#endif
SERIAL_PROTOCOLLN
(
""
);
SERIAL_PROTOCOLLN
(
""
);
}
break
;
break
;
#endif //PIDTEMP
#endif //PIDTEMP
case
400
:
// finish all moves
case
400
:
// finish all moves
...
...
...
...
This diff is collapsed.
Click to expand it.
Marlin/temperature.cpp
+
7
−
0
View file @
c57906b6
...
@@ -111,6 +111,13 @@ static unsigned long previous_millis_heater, previous_millis_bed_heater;
...
@@ -111,6 +111,13 @@ static unsigned long previous_millis_heater, previous_millis_bed_heater;
//=============================functions ============================
//=============================functions ============================
//===========================================================================
//===========================================================================
void
updatePID
()
{
#ifdef PIDTEMP
temp_iState_max
=
PID_INTEGRAL_DRIVE_MAX
/
Ki
;
#endif
}
void
manage_heater
()
void
manage_heater
()
{
{
#ifdef USE_WATCHDOG
#ifdef USE_WATCHDOG
...
...
...
...
This diff is collapsed.
Click to expand it.
Marlin/temperature.h
+
1
−
0
View file @
c57906b6
...
@@ -87,6 +87,7 @@ inline bool isCoolingBed() {return target_raw[TEMPSENSOR_BED] < current_raw[TEMP
...
@@ -87,6 +87,7 @@ inline bool isCoolingBed() {return target_raw[TEMPSENSOR_BED] < current_raw[TEMP
void
disable_heater
();
void
disable_heater
();
void
setWatch
();
void
setWatch
();
void
updatePID
();
#endif
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment