| cmdCTR_SET | Index |
Command Code:
The Packet:
| 0 | 1 | 2 | 3 | 4 | 5 | |||||
| address | 4 | cmdCTR_SET | CtrID | COUNTH | COUNTL |
| CtrID - | Index of the counter. Range is 0-7. |
| COUNTH - | High byte of count |
| COUNTL - | Low byte of count |
Description:
This command sets the 2-byte value for a counter. An ID that is out of range will generate an error message. There is no reply packet.
This BrainStem module has eight 2-byte counters. Reflexes may use these counters to record events. A counter generates a raw input when the count reaches zero after a decrement or increment operation.
If the command packet does not have a COUNTH and COUNTL byte, the Stem will send a cmdCTR_SET reply packet with the counter ID and current COUNTH and COUNTL bytes.