COUNTER

Top 

 

This data type does not name like all the other data types a special format in which values are displayed in the PLC but it is the name of one of the many counting links which exist in the PLC. In the symbol table it will be selected automatically if the address starts with ‘C)’. In the declaration part of functions and function blocks it is only permitted as In-parameter, within the function (-block) you can use the counter as usual, but it is always another counter that is counted up or evaluated, it depends on which counter you have specified as actual-parameter when calling the block.

 

Examples for the use of COUNTERS

 

C 31        BoxOnPals                COUNTER        Boxes on palett

(line in the symbol table)

 

     CU   #Boxes      // #Boxes is declared as In-COUNTER

 

Remark: Avoid counters, it is often not nice to work with them.

 

See also:

Operations with Counters

 

INC

DEC

+I

-I

 

Data Types