ja-jp_commands:reference:ipidreset
差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| ja-jp_commands:reference:ipidreset [2026/09/08 00:53] – 바깥 편집 127.0.0.1 | ja-jp_commands:reference:ipidreset [2026/10/25 10:18] (現在) – 外部編集 127.0.0.1 | ||
|---|---|---|---|
| 行 14: | 行 14: | ||
| ===== 使用例 ===== | ===== 使用例 ===== | ||
| + | |||
| + | MPINO-16A8R8TのA0をPIDの現在値として読みます。D22入力がLOWからHIGHに変わると、PIDの内部状態を一度初期化します。計算結果はシリアルモニタにのみ表示します。A0の設定とD22の配線は製品仕様で確認してください。 | ||
| <code cpp> | <code cpp> | ||
| const uint8_t PID_ID = 0; | const uint8_t PID_ID = 0; | ||
| - | const float SETPOINT_C = 45.0F; | ||
| void setup() { | void setup() { | ||
| Serial.begin(115200); | Serial.begin(115200); | ||
| - | | + | IpidSet(PID_ID, |
| - | IpidItermLimit(PID_ID, | + | |
| - | IpidReverse(PID_ID, | + | |
| } | } | ||
| void loop() { | void loop() { | ||
| - | const float temperature | + | |
| - | if (IdigitalRead(0, | + | |
| - | const float demand | + | if (isHigh && !wasHigh) IpidReset(PID_ID); |
| - | const float lastDemand | + | wasHigh = isHigh; |
| - | | + | const float currentValue |
| - | delay(20); | + | const float result |
| + | | ||
| + | delay(100); | ||
| } | } | ||
| </ | </ | ||
| 行 41: | 行 42: | ||
| * '' | * '' | ||
| * 積分項は出力制限を基準に自動制限され、ワインドアップを低減します。追加の制限が必要な場合は'' | * 積分項は出力制限を基準に自動制限され、ワインドアップを低減します。追加の制限が必要な場合は'' | ||
| - | * 微分項は設定値変更による急激な跳ねを抑えるため、PV変化量を基準に計算します。 | + | * 微分項は設定値の変更による急激な変動を抑えるため、PV変化量を基準に計算します。 |
| * '' | * '' | ||
| * 同じ'' | * 同じ'' | ||
ja-jp_commands/reference/ipidreset.1788796400.txt.gz · 最終更新: by 127.0.0.1
