The oCounter Object will increment or decrement the value of the object that the output property points to for each "Clock-Tick". A Mode property specifies how the oCounter Object determines when a "Clock-Tick" has occurred. If the Mode property is set to cvCount (0), each cycle of the oLogic Object pointed to by the ClockIn1 property is considered to be a "Clock-Tick" and the value of the Output Object is incremented or decremented in the direction specified by the Direction Property. If the Mode property is set to cvPhase (1), the oLogic Object pointed to by the ClockIn1 and Clockin2 properties are Quadrant-Encoded and the value of the Output Object is incremented or decremented in the direction specified by Quadrant change. The Direction Property is then updated to reflect the direction of the change. Each time a "Clock-Tick" increments the Output object's value, that value is tested against the value of the Object pointed to by the Input property. If it is greater, the value of the Output object is cleared to 0. Likewise, each time a "Clock-Tick" decrements the Output object's value, it is tested against 0. If it is lower, the value of the Output object is set to the value of the Object pointed to by the Input property. |