====== Counters Objects ====== ====== COUNTER ====== **COUNTER** has two digital inputs and an analogue output. The analogue output is a counter that starts at zero. Any time the clock input on pin 1 goes from false to true, the counter is incremented by one. The counter is reset to zero any time the reset input on pin 2 is held high. The counter will over roll to zero after counting up to 65,535. {{:softwarepub:e-logic:manual:logic_objects:counters:counter.png |}} ====== COUNTERRANGE ====== **COUNTERRANGE** behaves in much the same way as the counter object. There are however two differences. Firstly, the value at which the counter rolls over to zero can be set in the Object Properties window. Secondly, the counter can be reset to any value, by applying that value to the In pin and bringing the Load pin high. {{:softwarepub:e-logic:manual:logic_objects:counters:counterrange.png |}} ====== COUNTERRANGEDUAL ====== **COUNTERRANGEDUAL** object behaves like the **COUNTERRANGE** object, except that it can count down as well as up. {{:softwarepub:e-logic:manual:logic_objects:counters:counterrangedual.png |}} ====== HARDWARECLOCK ====== **HARDWARECLOCK** object provides a counter that counts from 0 to 1439 minutes (1 day). The counter is driven by the real-time clock module in the in the 400/450ECM or 500CCM, and will retain its value when the system is powered off providing the internal battery is fitted. The **CONVERTTIME** object can be used to extract the hours, minutes and AM/PM indication from the output. The hours and minutes can be adjusted by pulsing their respective up and down pins. {{:softwarepub:e-logic:manual:logic_objects:counters:hardwareclock.png |}} ====== REALCLOCK ====== **REALCLOCK** behaves like the **HARDWARECLOCK**, except that it is driven by the Seconds input pin. The Seconds pin should be connected to a 1 Hz signal (such as a **SECONDCLOCK**). {{:softwarepub:e-logic:manual:logic_objects:counters:realclock.png |}} ====== REALCLOCKLOAD ====== **REALCLOCKLOAD** behaves like the **REALCLOCK**, except that it has In and Load inputs that allow the output to be set directly. {{:softwarepub:e-logic:manual:logic_objects:counters:realclockload.png |}}