Up/down counting

An entry sensor adds 1 and an exit sensor takes 1 away, so ACC is the number of parts in the buffer.

Step by step

Pick a step. The rungs are drawn by the editor after Core scans the program up to that step.

1. Part in. The CTU adds 1. ACC is 1.

StepInEyeOutEyeBuffer.ACCBufferFull
1. Part in1010
2. Gap0010
3. Part in1021
4. Part out0110
5. Gap0010

Why it works

  • CTU and CTD name the same COUNTER tag, so they share one ACC.
  • Each counts only when its own rung turns on, so a part held in front of a sensor counts once.
  • DN is on while ACC is at or above PRE, here when the buffer holds 2 parts.

Common mistakes

  • Two counter tagsA CTU on one tag and a CTD on another cannot share a total. Use one tag for both.

Instructions used

Related