Operands for Counting FunctionΒΆ

Input information for the counter < Output information for the user program
Counter settings 0 < Output double word 0
High word < Output word 0.0
Low word < Output word 0.1
Control Byte 0 < Output byte 0
Outputs counter 0 < Output byte 1
Counter settings 1 < Output double word 1
High word < Output word 2.0
Low word < Output word 2.1
Control Byte 1 < Output byte 2
Outputs counter 1 < Output byte 3
Meaning of the input information for the counter:
Counter settings 0 DWORD Dependent on status bit 0 within output counter 0

- SET value for the counter 0

If bit 0 = FALSE, the counter can be set to a start value. The start value is loaded into the counter by the user program using the SET signal.

- END value for the counter 0

If bit 0 = TRUE, the end value for the counter is stored as comparison value into the module by the user program. The counter compares continuously whether the  programmed end value is greater than or equal to its actual counter value or not. When the counter value reaches its programmed end value, the binary outputs C4 to C7 (output counter 0) can be set permanently.

This value of the double word variable is loaded into the counter 0.

Note: In mode 2 16 bit counters, the higher word is the value for counter A and the lower word is the value for counter B.

Counter settings 1 DWORD Dependent on status bit 0 within output counter 1

- SET value for the counter 1

If bit 0 = FALSE, the counter can be set to a start value. The start value is loaded into the counter by the user program using the SET signal.

- END value for the counter 1

If bit 0 = TRUE, the end value for the counter is stored as comparison value into the module by the user program. The counter compares continuously whether the  programmed end value is greater than or equal to its actual counter value or not. When the counter value reaches its programmed end value, the binary outputs C12 to C15 (output counter 1) can be set permanently.

This value of the double word variable is loaded into the counter 0.

Note: In mode 2 16 bit counters, the higher word is the value for counter A and the lower word is the value for counter B.

Control byte 0 BYTE

Control byte for the counter 0:

Depending on operating modes, the different bits of Control byte 0 are used to manage and control the counting (see below table)

Control byte 1 BYTE

Control byte for the counter 1:

Depending on operating modes, the different bits of Control byte 1 are used to manage and control the counting (see below table)

Output counter 0 BYTE Outputs for the counters 0:
Bit 0 Select SET/END value: FALSE= SET and TRUE = END
Bit 1-3 Digital outputs unused
Bit 4 Digital output C4, can be configured to indicate END value
Bit 5 Digital output C5, can be configured to indicate END value
Bit 6 Digital output C6, can be configured to indicate END value
Bit 7 Digital output C7, can be configured to indicate END value
Output counter 1 BYTE Outputs for the counters 1:
Bit 0 Select SET/END value: FALSE= SET and TRUE = END
Bit 1-3 Digital outputs unused
Bit 4 Digital output C12, can be configured to indicate END value
Bit 5 Digital output C13, can be configured to indicate END value
Bit 6 Digital output C14, can be configured to indicate END value
Bit 7 Digital output C15, can be configured to indicate END value