Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

buffer conflict of counter and analog input acquisition

I am using LabView 7 here, with two NI-DAQ devices, AI 6052E and AO 6733E connected to a PC running XP.

What I am trying to do is using 2 counters (one for gating) for counting random TTL pulses coming from a photomultiplier, this can be done on either device. At the same time, I want to acquire multiple channels from the analog input device. Both application runs on buffered mode, and workes out fine alone. But when I start arm the counter program, the AI acquisition won't start, and it would start immediately if I stop the counter program. I tried using counters on the AO device, and it didn't solve the conflict.

I thought this might be due to buffer conflict of the two running at the same time. Is there any way to solve this problem?

I hope I have explained the situation okay if not clear enough. Any help is appreciated.

Thanks.

JJ

P.S. I am using traditional DAQ. Will DAQ-MX help?
0 Kudos
Message 1 of 9
(5,267 Views)
You're likely having one of two issues.  It's either a problem with threading in traditional DAQ or a potential DMA conflict that occurs between counters and AI/AO on E Series devices.  Can you post your VI?  If it's the threading issue, DAQmx will fix the problem for you.  Traditional DAQ is a single-threaded driver, so if your application is in a read call, no other DAQ tasks will execute.  I suspect that this is your problem.  The DMA conflict is non likely your problem.
0 Kudos
Message 2 of 9
(5,251 Views)
Gus,

Attached please find the vi for counter and AI acquisition. I only modified slightly the example files shipped with labVIEW 7.

One seperate question, I am starting to look into DAQ-MX now for counter and acquisition. For some reason, I couldn't find the node property of Duplicate Prevention as some people mentioned on this board regarding counting programs. Could somebody help?
Download All
0 Kudos
Message 3 of 9
(5,238 Views)

The Duplicate Count Prevention property is located in the DAQmx Channel property node under Counter Input>General Properties>More>Advanced. Here are some links to help you get started with DAQmx

Transition from Traditional NI-DAQ to NI-DAQmx

Answers to Frequently Asked Questions about NI-DAQmx and Traditional NI-DAQ (Legacy)


Learn 10 Functions in NI-DAQmx and Solve 80% of Data Acquisition Applications

--
Michael P
National Instruments
0 Kudos
Message 4 of 9
(5,221 Views)

From looking at your VIs I don't see anything particularly wrong.  I would guess that you are in fact running into the single threaded-ness of the traditional DAQ driver.  You can get around this by combining your traditional daq examples into a single example where start is called on both AI and CTR before you call read on either one.  Your issue is likely that read is getting called on the counter operation at which point your AI VI will not run at all until the read completes.  Even if you switch to DAQmx (which I would recommend unless you have a significant amount of code written already), you should still be setting up your VIs so both tasks are started before read is called.

I hope this helps!

gus....

Message 5 of 9
(5,213 Views)
Gus,

Thanks for the reply. I think you are probably right. I'm experimenting with DAQ-MX now, and seems no problem even if I run traditional DAQ on one device for the counter and DAQ-MX on another AI device. I am trying to wire something up for the counter using DAQ-MX as well.

Michael,

Thanks for the link, but the link you have provided is not valid.

Also, last time when I checked into the node property, I couldn't get it following all the menues down. I don't understand why. Is it something about device driver etc.?

JJ
0 Kudos
Message 6 of 9
(5,207 Views)
Here is the screen shot.
0 Kudos
Message 7 of 9
(5,201 Views)
0 Kudos
Message 8 of 9
(5,198 Views)
Nevermind, I found the duplicate prevention node. Thanks for the help.
0 Kudos
Message 9 of 9
(5,177 Views)