Configuration for Onboard I/Os

  1. In the device tree, double-click the Onboard I/O node (OBIO).

  2. In the Parameters tab set the counting mode Fast Counters for the fast counter.

    ../_images/da41802b56d91b110a317d311ab9b086
  3. In the I/O Mapping tab channel configuration is displayed. Fast Counters

Configuring the Fast Counter

The parameter of the Fast Counter channels of the Onboard I/O must be configured before they can be used. User should take these steps to configure the fast counter:

Channel Direction Width Meaning
Actual value X Input DWORD Current value of the Fast Counter.
State byte X Input BYTE

Bit 0 = CF

If the counter reaches the programmed end value, the counter output is stored permanently as CF = TRUE (end value reached). Only, if the counter is set again (set value), CF is reset to FALSE.

Bit 1 to Bit 7 free

Start value X Output DWORD Each counter can be set to a start value. Start values are loaded into the counter by the user program. Using the set signal (dependent on the operating mode either via a terminal or the bit SET within the control byte X), the values of the double word variables are loaded into the counter X.
End value X Output DWORD The end values for the two counters are stored as comparison values into the module by the user program. Both counters compare continuously, whether or not their programmed end value is equal to their actual value. If the counter (actual value) reaches its programmed end value, the binary output CF of the status byte is set permanently.
Control byte X Output BYTE

Bit 0 = UP/DWN

In some operating modes, the counter can count downwards, too. If counting down is desired, the bit UP/DWN must be set to TRUE. When doing so, the counter starts counting downwards at the start value (set value) to the end value (max. from 4,294,967,295 to 0 or hexadecimal from FF FF FF FF to 00 00 00 00). After reaching 0, the counter jumps to 4,294,967,295.

Bit 1 = EN

The processing of the counter signals must be enabled. Depending on the operating mode, enabling is done via a terminal or by the bit EN = TRUE within the control byte.

Bit 2 = SET

The counter can be set to a start value (see the description of the set values for the counters 1 and 2 at the beginning of this table).

Bit 3 to Bit 7 free