The following example shows how you can use the counter's status registers to determine when a command sequence is completed.
This program sets up the counter to make period measurements indefinitely until an out of limits measurement occurs. The upper limit is set to 1.05 ms and the lower limit is set to .95 ms. If a measurement falls outside of these limits, the counter will stop measuring and send the out of limits period to the computer. The out of limit period is sent in ASCII format to preserve resolution.