Chapter 9
138
Logic programming – Function blocks
Reload value and Counter reload
The
Counter reload
parameter determines what happens when the counter value
reaches “0”. If this parameter is configured to
Automatic
and the internal counter
equals “0”, the
Underflow
output becomes High for the duration of the logic execution
time. The value of the internal counter is subsequently set to the configured
Reload
value
.
If the
Counter reload
parameter is configured to
Manual
and the lower limit, i.e. “0”,
has been reached, the
Underflow
output is set to High and remains High until the
counter value changes again, either by counting upward or by a valid pulse sequence
at the
Reload
input. Until then, all further “Down” counting pulses are ignored.
Truth table for the Event counter function blocks (Up, Down and Up and down)
The following applies for the truth table in this section:
“0” means logic Low
“1” means logic High
“
↑
” means that a rising edge has been detected at the input
“
↓
” means that a falling edge has been detected at the input
“n–1” references the preceding value
“n” references the current value
“Y” references the value of the internal counter
“X” means “any”. E.g. the
Reset to zero
input and the
Reload
input have priority
over the
Up
input and the
Down
input.
Up
Down
Reset
to zero
Reload
Counter
value
n–1
Counter
value
n
Overflow
n
Underflow
n
↑
0, 1 or
↓
0
0 Y
Y+1 0 0
↑
0, 1 or
↓
0
0 Y
Y+1 =
Overflow
value
1 0
↑
0, 1 or
↓
0
0
Y =
Overflow
value
Y =
Overflow
value
1 0
0, 1 or
↓
↑
0
0 Y
Y–1 0 0
0, 1 or
↓
↑
0
0
Y
Y–1 = 0
0
1
0, 1 or
↓
↑
0
0
Y = 0
Y = 0
0
1
↑
↑
0
0 Y Y 0 0
X
X
1
0 Y
Reset to
zero
0 0
X
X
0
1 Y
Reload
0 0
X
X
1
1 Y
Reset to
zero
0 0
Table 41:
Truth table for the Event
counter function blocks (Up,
Down and Up/Down)
Summary of Contents for SW1DNN-WS0ADR-B
Page 2: ......
Page 288: ...Chapter 15 285 Annex ...
Page 289: ...Chapter 15 286 Annex ...
Page 290: ...Chapter 15 287 Annex ...
Page 291: ...Chapter 15 288 Annex ...
Page 292: ...Chapter 15 289 Annex ...
Page 293: ...Chapter 15 290 Annex ...
Page 294: ...Chapter 15 291 Annex ...
Page 295: ...Chapter 15 292 Annex ...
Page 296: ...Chapter 15 293 Annex ...
Page 297: ...Chapter 15 294 Annex ...
Page 298: ...Chapter 15 295 Annex 15 1 2 Example application Wood scanner ...
Page 299: ...Chapter 15 296 Annex ...
Page 300: ...Chapter 15 297 Annex ...
Page 301: ...Chapter 15 298 Annex ...
Page 302: ...Chapter 15 299 Annex ...
Page 303: ...Chapter 15 300 Annex ...
Page 304: ...Chapter 15 301 Annex ...
Page 305: ...Chapter 15 302 Annex ...
Page 306: ...Chapter 15 303 Annex ...
Page 307: ...Chapter 15 304 Annex 15 1 3 Example application Ramp down detection ...
Page 308: ...Chapter 15 305 Annex ...
Page 309: ...Chapter 15 306 Annex ...
Page 310: ...Chapter 15 307 Annex ...
Page 311: ...Chapter 15 308 Annex ...
Page 312: ...Chapter 15 309 Annex ...
Page 313: ...Chapter 15 310 Annex ...
Page 314: ...Chapter 15 311 Annex ...
Page 321: ......