kk logo

In addition to comparisons, counters are the second important group of functions. It can be counted in two ways, forwards and backwards. If the set value is reached, an output is switched on (HIGH), if the value falls below the set range, the output is switched off (LOW).

With the counters of "plcladdersimulator2", in contrast to many other ladder diagram software, can also be counted negatively. The counter does not stop at 0 but rather. then counts -1, -2, -3 etc.

If you insert a counter, a dialog window opens.

  • C file is a consecutive number, i.e. counter 1, counter 2, counter 3, etc.
  • Preset, is the value at which the output is switched on or off (HIGH / LOW)

0 arduino plc sps counter zähler tutorial

Up counter. As the name suggests, the up counter can only be used to count "up" or "+". +1 is counted with each pulse at the input.

  • Entrances
    • CU, "counter up" is the counter input, with every "HIGH" edge change +1 is calculated
    • RESET, with a "HIGH" edge the counter is set to the value 0

1 arduino plc sps counter zähler tutorial

Output C: 0CU always has the same state as input CU, so this contact always "mirrors" the counter input and can thus continue to be used in the controller.

2 arduino plc sps counter zähler tutorial

 The output C: 0DN is switched on (HIGH) if Preset and Accum are equal or Accum is higher than Preset. If the set value (here 10) is reached or exceeded or the output remains (HIGH). 

3 arduino plc sps counter zähler tutorial

 Up and down counters. This counter has a further input "CD, counter down". If this input has a "HIGH" edge, -1 is calculated. So you can count forwards and backwards or up and down.

4 arduino plc sps counter zähler tutorial

The outputs remain the same. The output CU is the same as the input CU.
5 arduino plc sps counter zähler tutorial

The CD output is the same as the CD input.

6 arduino plc sps counter zähler tutorial

The counter is reset to 0 (zero) via RESET.

7 arduino plc sps counter zähler tutorial

 The output DN is switched if the preset is equal to or greater than Accum.

8 arduino plc sps counter zähler tutorial

by grace

By grace alone somehow I standWhere even angels fear to treadInvited by redeeming loveBefore the throne of God aboveHe pulls me close with nail-scarred handsInto His everlasting arms

Ronnie

schwäbischer tüftler und bastler, kraftsportler, 41 Jahre, 1 Frau, 5 Kinder und 1003 Ideen. 

ronnie berzins at mee