| ||
| Description: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A Processing Object that performs counting operations by increasing or decreasing another Object's Value property for each "Clock-Tick" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Operation: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The oCounter Object will increment or decrement the Value of the Object to which the Output property links 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 or 0, each cycle of the Flag property 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 or 1, the Flags 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. 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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Storage size & Availability: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The following table lists the size and availability of the oCounter Object:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Properties: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The following table lists the Properties of the oCounter Object:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Example: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In the following examples, the oCounter Object is used
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| See Also: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
oQencode - An Object that reads a Quadrant Encoder. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||