en-us_commands:reference:ictd
This is an old revision of the document!
Table of Contents
Ictd()
Ictd() loads the preset value, then decrements the current value at each input rising edge.
bool Ictd(uint8_t counter_id, bool CD, bool LOAD, int32_t PV)
Commands
| Command | Arguments | Return Value | Operation |
|---|---|---|---|
Ictd(counter_id, CD, LOAD, PV) | uint8_t counter_id — Counter number. Supports 0 ~ 255, the uint8_t rangebool CDbool LOADint32_t PV — Preset value | bool | Loads the preset value, then decrements the current value at each input rising edge. |
Example
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);
Precautions
- The previous fixed 0~31 restriction has been removed. However, the argument type is
uint8_t, so the maximum ID is255. - If insufficient memory prevents allocation of counter state, counter commands return
falseor0. - Once created, counter state is retained while the program runs.
en-us_commands/reference/ictd.1788785566.txt.gz · Last modified: by 127.0.0.1
