Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog Output (on X series DAQ) is taking forever

Solved!
Go to solution

I was upgrading the test setup (hardware and software) and attached code works just fine on LabVIEW 2017 and PXI-6229.

New system has LabVIEW 2020 and USB-6363 (mass termination), and DAQ Write VI is taking forever.

 

scofield_0-1711417869436.png

 

0 Kudos
Message 1 of 7
(965 Views)

You don't need to write a long sine wave; you can generate one full cycle or a minimal complete cycle of sine wave as per your sampling rate, and the DAQ will take care of repeating the sine wave if put into continuous mode.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 2 of 7
(959 Views)

Thank you for your response. I am familiar with continuous mode and regeneration mode. However, I am curious as to why these two DAQ cards are behaving differently.

0 Kudos
Message 3 of 7
(932 Views)

@scofield wrote:

Thank you for your response. I am familiar with continuous mode and regeneration mode. However, I am curious as to why these two DAQ cards are behaving differently.


Data transfer speeds and available data transfer mechanisms are the key factors that make them different (USB2.0 vs PXI)

 

santo_13_0-1711429012526.png

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 4 of 7
(919 Views)
Solution
Accepted by scofield

A couple further remarks:

 

1. The main thing I know of that can make DAQmx Write stall out for a long time is when the buffer(s) between the app and the D/A converter are full.  In such cases, DAQmx will wait as samples that are already in the buffer get generated, gradually clearing out space for the new ones you're trying to write.

 

2. So why might that be happening here?  Well, I'm not certain *exactly*, but there are several things I see that are "unconventional" that might contribute.

 

3. You write a big waveform to a task that was never configured for multi-sample generation with DAQmx Timing.  Maybe DAQmx auto-configures a clock and buffer according to your waveform timing and size?  I haven't really experimented, I've just always done the config explicitly with a call to DAQmx Timing.

 

4. Your use of auto-start=True may play a role as well.  I'd be curious whether setting that False, followed by an explicit call to DAQmx Start, might change things.   This is only speculation, but I wonder whether DAQmx's decision about a buffer size to create might depend on whether it's about to, or has already auto-started.

 

5. More speculation, but since you never call DAQmx Timing, how should DAQmx know whether to perform Finite or Continuous generation?  When calling DAQmx Timing, Finite is the default so I suppose it might be the default here as well.  Perhaps the buffer size is set to a smallish default size too?  If so, DAQmx Write will get stuck waiting for space to free up over and over so it can deliver all its samples a little at a time.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 5 of 7
(893 Views)

Thank you.

Based on your suggestion, I tried DAQ Timing VI and it worked like a charm.

scofield_1-1711471435028.png

 

0 Kudos
Message 6 of 7
(872 Views)

Thank santo_13 for taking out time and sharing the info.

0 Kudos
Message 7 of 7
(871 Views)