Counter

Four independent counters are available. The counters can be used, for example, for counting numbers of items.

The process data objects for controlling and evaluating the counters are disabled in the factory settings. Enabling.

The counter values of the counters are saved every 15 minutes in a non-volatile memory at the same time as the operating hour counter. The saved counter values are retained even after switching the supply voltage off and on again.

Incrementing a counter

A rising edge on the variable "Counter clk“ increments the counter by 1. (Process data object UCP Outputs Channel n)

Reading the counter value of a counter

The counter value of a counter is located in the variable "Counter" in the process data object UCP Inputs Channel n.

Setting a counter to zero

Apply a rising edge to the variable "Counter reset" in the process data object UCP Outputs Channel n.

Saving counter values manually

When the machine is shut down in a controlled manner, it is a good idea to save all counter values beforehand.

  • Operating hour counter
  • Timer
  • Counter

As the counter values are only saved every 15 minutes, 15 minutes could otherwise be lost.

Note

The lifetime of the memory is reduced with each saving operation

After a certain number of saving operations, the memory is defective.

  • Do not save the counter values manually more often than is necessary.

Use this procedure to save all counter values in the non-volatile memory:

1. Write the value 1 in the CoE parameter FB00:01hex "Request".
2. Check the value of the CoE parameter FB00:02hex "Status":
Value 255: The saving operation is running.
Value 1: The saving operation was successfully completed.