When the Operate property is 1, the oCycleTimeL Object monitors the I/O line specified by the IOLine property for a high-going transition. When the input transitions to a high state, a counter is started at 255. The counter will then decrement at a rate of 283Hz. When the next high-going transition occurs, the count is copied to the duration property and the process starts again. If no high-going pulses are detected, or the high-going pulses are more than ~0.9 seconds apart, the counter will eventually count down to 0 at which time the counter stops. Thus, a cycle time of longer than approximately 0.9 seconds will read 0. The Duration property is calculated from the following formula: Duration = (256 - (283 / Frequency)) Inversely, the Frequency can be calculated from the Duration: Frequency = (283 / (256-Duration)) Note that the Duration is not a linear property. As the frequency goes up, the Duration increases at a quicker rate. Thusly, while the the oCycleTimeL Object is capable of measuring a frequency of up to 283hz, it is best at measuring frequencies below 5Hz. (See Duration property table) If the input has a frequency of more than 283hz then the high going pulses will happen before the counter gets to decrement one time. Thus, a cycle time shorter than approximately 0.0035 seconds will read 255. |