ユーザ用ツール

サイト用ツール


ja-jp_commands:reference:ictud

文書の過去の版を表示しています。


Ictud()

Ictud()は増加入力と減少入力を1つのカウンタで処理します。

Ictud コマンドの動作フロー

bool Ictud(uint8_t counter_id, bool CU, bool CD, bool RESET, bool LOAD, int32_t PV)

コマンド

コマンド 引数 戻り値 動作
Ictud(counter_id, CU, CD, RESET, LOAD, PV) uint8_t counter_id — カウンタ番号。uint8_tの範囲のため0 ~ 255を使用可能
bool CU
bool CD
bool RESET
bool LOAD
int32_t PV — 設定値
bool 増加入力と減少入力を1つのカウンタで処理します。

使用例

bool Ictu(uint8_t counter_id, bool CU, bool RESET, int32_t PV);
bool Ictd(uint8_t counter_id, bool CD, bool LOAD, int32_t PV);
bool Ictud(uint8_t counter_id, bool CU, bool CD, bool RESET, bool LOAD, int32_t PV);
int32_t IgetCount(uint8_t counter_id);
void IsetCount(uint8_t counter_id, int32_t value);
bool IctudDownState(uint8_t counter_id);

注意事項

  • 従来の0~31固定制限は削除されました。ただし引数型がuint8_tのため、最大IDは255です。
  • メモリ不足でカウンタ状態を確保できない場合、カウンタコマンドはfalseまたは0を返します。
  • 一度作成したカウンタ状態はプログラム実行中保持されます。

← 内蔵コマンド一覧

ja-jp_commands/reference/ictud.1788785589.txt.gz · 最終更新: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki