CU: Count up (S7-1500) - STEP 7

FBD (S7-1200, S7-1500)

ft:publication_title
FBD (S7-1200, S7-1500)
Product
STEP 7
Version
V20
Publication date
11/2024
Language
en-US
CU: Count up

Description

You use the "Count up" instruction to increment the value of the specified counter by the count of one on a rising edge at the start input. The count is incremented until the limit of "999" is reached. When the limit is reached, the counter value is no longer incremented on a positive signal edge.

The "Count up" instruction needs a preceding logic operation for the edge evaluation and can only be placed on the right edge of the network.

Parameters

The following table shows the parameters of the "Count up" instruction:

Parameters

Declaration

Data type

Memory area

Description

<operand>

Input

BOOL

I, Q, M, T, C, D, L

Start input

<counter>

InOut/Input

COUNTER

C

Counter whose value is incremented.

For additional information on valid data types, refer to "See also".

Example

The following example shows how the instruction works:

When the signal state of the operand "TagIn_1" changes from "0" to "1" (positive signal edge), the counter "Counter_1" is preset with the value "100".

The value of "Counter_1" is incremented by the count of one when the signal state of the "TagIn_2" operand changes from "0" to "1".

If the "TagIn_3" operand returns signal state "1", the value of "Counter_1" is reset to "0".