Hardware Reset of a TIO (NI 660x) Counter in Measurement Studio
Downloads
Filename: hardwareresettiocounter.zip
Requirements: View
This program uses two counters, counter 0 and counter 1. Counter 0 is configured to either increment or decrement on every rising edge on the default source pin. Counter 1 is configured for pulse train generation, generating the frequency that is the inverse of the time interval to reset counter 0. For example, to reset counter 0 to zero every 100 ms, set the frequency that is generated by counter 1 to 10 Hz on the front panel.
To control the counter 0 counting direction, connect the up/down pin of counter 0 to 5 V for the counter 0 to count up, or to GND for the counter 0 to count down.
Note: Be careful when choosing a duty cycle for the pulse generated by counter 1. Pulses which arrive at the source pin of counter 0 while the gate of counter 0 (output of counter 1) is high are not counted. Set the duty cycle so the reset pulse is shorter than the incoming pulses at the source pin.
I/O Connections:
Connect CTR 0 source to the pulse train to count.
Connect CTR 0 Up/Down to 5 V to count up, or to GND to count down.
Connect CTR 1 out to CTR 0 gate.
Requirements
Filename: hardwareresettiocounter.zip
Software Requirements
Application Software: Measurement Studio Visual Basic Support 6.0
Language(s): Visual Basic
Additional Software: Visual Basic 6.0
Hardware Requirements
Hardware Group: Multifunction DAQ (MIO)
Driver: Traditional NI-DAQ (Legacy) 6.6.0
Reader Comments | Submit a comment »
Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
