Sample Counter

Modbus Motion Interface

Read_Word(System_+_SampleCounter_w);

Description

The Sample Counter register increments each controller sample period and provides a measurement of discrete time in the controller. Because the value is being returned in a 16 bit word the value will wrap around every minute if the controller is running at a default 1 kHz sample rate. This can be used to verify controller activity. It is often more useful to have a user variable "still alive" counter that is incremented by task relating to the application as this confirms that both the controller is running and the resident task is also running.

Escapes

The Sample Counter register does not produce any escapes.

Examples

Read the sample counter to confirm it is changing.

Read_Word(System_+_SampleCounter_w);

Related Topics

Sample Rate