You are here

GPIO_SUSPEND_PLS_CNT (0x2B)

The GPIO_SUSPEND_PLS_CNT command suspends specified pulse counter. This command can suspend time counting and/or pulse counting.

GPIO_SUSPEND_PLS_CNT Command

Go to Response

Byte 0 GPIO_SUSPEND_PLS_CNT Command ID
Byte 1 ECHO Echo to associate the command with the response
Byte 2 PLS_CNT_NUMBER ID number of the pulse counter to be suspended
Byte 3 RESET_TIMER Byte to reset time count
Byte 4 RESET_COUNTER Byte to reset pulse count
Bytes 5..7 Reserved Reserved

Command is an 8-byte array of the following format:

Byte 0: GPIO_SUSPEND_PLS_CNT (0x2B)

This byte contains command ID (command type). It must be set to 0x2B.

Byte 1: ECHO

This byte can be used to associate a response received from GPIO-24 adapter with a specific command. Response will contain exactly the same value in its echo byte.

Byte 2: PLS_CNT_NUMBER

The ID number of the pulse counter:

  • 0 – pulse counter on A.3 pin;

  • 1 – pulse counter on A.4 pin.

 

Byte 3: RESET_TIMER

This byte resets time count:

  • 1 – time count will be set to 0;

  • 0 – time count is just suspended and will not be set to 0.

 

Byte 4: RESET_COUNTER

This byte resets pulse count:

  • 1 – pulse count will be set to 0;

  • 0 – pulse count is just suspended and will not be set to 0.

 

Bytes 5..7: Reserved

These bytes are reserved for future usage and must be set to 0.

For convenience GPIO_SUSPEND_PLS_CNT_CMD structure is declared in reports.h file.

GPIO-24 adapter sends GPIO_SUSPEND_PLS_CNT response after command execution.

GPIO_SUSPEND_PLS_CNT Response

Go to Command

Byte 0 GPIO_SUSPEND_PLS_CNT Response ID
Byte 1 ECHO Echo to associate command with the response
Byte 2 ST Command execution status
Bytes 3..7 Reserved Reserved (must be 0)

Response is an 8-byte array of the following format:

Byte 0: GPIO_SUSPEND_PLS_CNT (0x2B)

Response ID (response type). This byte will contain 0x2B.

Byte 1: ECHO

Echo byte copied from the corresponding command. It can be used to associate the response with the specific command.

Byte 2: ST

Status of the command execution:

  • GPIO_ST_SUCCESS (0x00) – Pulse counter has succesfully been suspended;

  • GPIO_ST_INVALID_PLS_CNT_NUMBER (0x0A) – Invalid ID of the pulse counter has been specified (only 0 and 1 values are valid);

  • GPIO_ST_INVALID_PARAMETER (0x0B) – Invalid reset timer parameter or reset counter parameter has been specified (only 0 and 1 values are valid).

 

Bytes 3..7: Reserved

These bytes are reserved for future usage.

For convenience GPIO_SUSPEND_PLS_CNT_RSP structure is declared in reports.h file.