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
eb06a886
Commit
eb06a886
authored
Sep 17, 2012
by
Mark Finn
Browse files
Options
Downloads
Patches
Plain Diff
missed
parent
04631d22
Branches
Branches containing commit
Tags
Tags containing commit
Loading
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Marlin/temperature.cpp
+10
-8
10 additions, 8 deletions
Marlin/temperature.cpp
with
10 additions
and
8 deletions
Marlin/temperature.cpp
+
10
−
8
View file @
eb06a886
...
...
@@ -173,8 +173,8 @@ void PID_autotune(float temp, int extruder, int ncycles)
if
(
extruder
<
0
)
{
soft_pwm_bed
=
(
PID_
MAX_BED
)
/
2
;
bias
=
d
=
(
PID_
MAX_BED
)
/
2
;
soft_pwm_bed
=
(
MAX_BED
_POWER
)
/
2
;
bias
=
d
=
(
MAX_BED
_POWER
)
/
2
;
}
else
{
...
...
@@ -214,8 +214,8 @@ void PID_autotune(float temp, int extruder, int ncycles)
t_low
=
t2
-
t1
;
if
(
cycles
>
0
)
{
bias
+=
(
d
*
(
t_high
-
t_low
))
/
(
t_low
+
t_high
);
bias
=
constrain
(
bias
,
20
,(
extruder
<
0
?
(
PID_
MAX_BED
)
:
(
PID_MAX
))
-
20
);
if
(
bias
>
(
extruder
<
0
?
(
PID_
MAX_BED
)
:
(
PID_MAX
))
/
2
)
d
=
(
extruder
<
0
?
(
PID_
MAX_BED
)
:
(
PID_MAX
))
-
1
-
bias
;
bias
=
constrain
(
bias
,
20
,(
extruder
<
0
?
(
MAX_BED
_POWER
)
:
(
PID_MAX
))
-
20
);
if
(
bias
>
(
extruder
<
0
?
(
MAX_BED
_POWER
)
:
(
PID_MAX
))
/
2
)
d
=
(
extruder
<
0
?
(
MAX_BED
_POWER
)
:
(
PID_MAX
))
-
1
-
bias
;
else
d
=
bias
;
SERIAL_PROTOCOLPGM
(
" bias: "
);
SERIAL_PROTOCOL
(
bias
);
...
...
@@ -299,6 +299,8 @@ void updatePID()
for
(
int
e
=
0
;
e
<
EXTRUDERS
;
e
++
)
{
temp_iState_max
[
e
]
=
PID_INTEGRAL_DRIVE_MAX
/
Ki
;
}
#endif
#ifdef PIDTEMPBED
temp_iState_max_bed
=
PID_INTEGRAL_DRIVE_MAX
/
bedKi
;
#endif
}
...
...
@@ -419,10 +421,10 @@ void manage_heater()
dTerm_bed
=
(
bedKd
*
(
pid_input
-
temp_dState_bed
))
*
K2
+
(
K1
*
dTerm_bed
);
temp_dState_bed
=
pid_input
;
pid_output
=
constrain
(
pTerm_bed
+
iTerm_bed
-
dTerm_bed
,
0
,
PID_
MAX_BED
);
pid_output
=
constrain
(
pTerm_bed
+
iTerm_bed
-
dTerm_bed
,
0
,
MAX_BED
_POWER
);
#else
pid_output
=
constrain
(
pid_setpoint_bed
,
0
,
PID_
MAX_BED
);
pid_output
=
constrain
(
pid_setpoint_bed
,
0
,
MAX_BED
_POWER
);
#endif //PID_OPENLOOP
if
((
current_raw_bed
>
bed_minttemp
)
&&
(
current_raw_bed
<
bed_maxttemp
))
...
...
@@ -442,7 +444,7 @@ void manage_heater()
}
else
{
soft_pwm_bed
=
PID_
MAX_BED
>>
1
;
soft_pwm_bed
=
MAX_BED
_POWER
>>
1
;
}
}
else
{
...
...
@@ -459,7 +461,7 @@ void manage_heater()
else
if
(
current_raw_bed
<=
target_bed_low_temp
)
{
soft_pwm_bed
=
PID_
MAX_BED
>>
1
;
soft_pwm_bed
=
MAX_BED
_POWER
>>
1
;
}
}
else
{
...
...
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