Chapter 4. Ladder Diagram (LD) Programming136 PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual GFK-2950C4.7.3 Up CounterThe Up Counter (UPCTR) function counts up to the Preset Value (PV). The range is 0 to +32,767counts. When the Current Value (CV) of the counter reaches 32,767, it remains there until reset.When the UPCTR reset is ON, CV resets to 0. Each time the power flow input transitions from OFF toON, CV increments by 1. CV can be incremented past the Preset Value (PV). The output is ONwhenever CV PV. The output (Q) stays ON until the R input receives power flow to reset CV to zero.The state of UPCTR is retentive on power failure; no automatic initialization occurs at power-up.WarningDo not use the Address of the up counter with otherinstructions. Overlapping references cause erraticcounter operation.OperandsParameter Description AllowedOperandsOptionalAddress(???? )The beginning address of a three-word WORD array:Word 1: Current Value (CV)Word 2: Preset Value (PV)Word 3: Control wordR, W, P, L, symbolic NoR When R is ON, it resets the counter's CV to 0. Power flow NoPV Preset Value to copy into word 2 of the counter's address when thecounter is enabled or reset. 0 PV 32,767. If PV is out of range, itdoes not affect word 2.All except S, SA, SB,and SCNoCV The current value of the counter All except S, SA, SB,SC and constantNoExample – Up CounterEvery time input %I0012 transitions from OFF to ON, the Up Counter counts up by 1; internal coil%M0001 is energized whenever 100 parts have been counted. Whenever %M0001 is ON, theaccumulated count is reset to zero.