01-14-2008 04:17 AM
Dear all
I have developed a counter-timer program by using NI PCI-6601 card and LabVIEW 7.1 on P-IV with Windows XP.
It gives satisfactory results when I apply i.e.
Input 100000 Hz at 1 sec high Time and 1.00E-7 sec low time which gives output 100000 counts,
Input 100000 Hz at 0.5 sec high Time and 1.00E-7 sec low time which gives output 50000 counts and
Input 100000 Hz at 0.2 sec high Time and 1.00E-7 sec low time which gives output 20000 counts
But when I goes to achieve high resolution it gives incorrect data i.e.
Input 100000 Hz at 0.1sec high Time and 1.00E-7 sec low time which gives output 20000/10000 counts, and below this value it also gives wrong output data.
I want to achieve .001 sec high time.
Please help me to solve this problem.
Best Wishes
Ishfaq
01-15-2008 02:03 PM
01-17-2008 01:46 AM
01-17-2008 05:44 PM - edited 01-17-2008 05:50 PM
Hello
again Ishfaq,
I believe what is going on is that you are using software timing to control
when your counter is running. You are controlling the counting by how long it
takes for the pulse generation code to run, not by when the pulse is
high. What I believe you want to do is actually pause triggering, which
is done in hardware. What this does is counts while a digital signal is
high and then pauses the counter (i.e. freezes the count and prevents further
counting) when the digital signal is low.
The example program titled Count Digital Events-Pause Trig.vi located in the
example finder that I reference in my first post does this(it is in the Help
menu select Find Examples..., then look under Hardware Input and
Output»DAQmx»Counter Measurements»Count Digital Events). To generate your
pulse, take a look at the example titled Gen Dig Pulse.vi (located in the
example finder under Hardware Input and Output»DAQmx»Counter
Measurements»Generating Digital Pulses). You should be able to combine
these two to accomplish your goal by specifying the counters InternalOutput
(e.g. Dev1/Ctr0InternalOutput) for the pause trigger source.
Take a look at these examples and let me know if you have any more questions or
if my explanation is not clear.
01-18-2008 02:21 AM
Hello Neal M,
Thanks for comprehensive discussion of problem. I try to explain my problem. I want the counter should start counting when pulse is high. Actualy I want to control counter's counting through pulse not from directly software. In the example program titled Count Digital Events-Pause Trig.vi there is a while loop around the DAQmx Read.vi having Wait Until Next ms Multiple which controls the counter instead of pulse. But I want to control the counter through pulse by generating that pulse through software with counter's counting software.
Please help me in this regard.
Message Edited by Ishfaq on
Ishfaq
01-21-2008 02:33 PM - edited 01-21-2008 02:34 PM