LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interruption of Output on the 6229 DAQ

Using the 6229 for outputting a pulse. I'm running on a Windows XP with NX6125 and 2G of memory.  Also, LabVIEW 8.
I can't seem to output pulses longer than 15ms without them being truncated.  The output rate is 400KHz but I've used as low as 100KHz and get the same result.
I'm monitoring the output with one of the 6229 input channels.  Input works great at 250KHz.    I've used 100KHz as well and it works fine.  I've tested the input with a signal generator. 
 
I've tried DMA/Interrupt settings, setting up the buffer size.....
 
It seems as if something in the OS is terminating the output prematurely after 15ms.
 
I have a call into NI.  They're trying to replicate.
 
Thought you might have some ideas.
 
Thanks,
Mark
0 Kudos
Message 1 of 8
(2,401 Views)

Can you post the code?  The only out-of-the-blue guess is:

Does the vi you use to configure and start the pulsetrain stop running after the pulsetrain is started?  Under DAQmx,
if the vi that creates the task stops executing, any tasks that it created will be automatically "cleaned up."  The behavior is different than it used to be in traditional NI-DAQ, where pulsetrains could continue running even after the vi itself stopped.

I know this is one of the little gotchas that gotch'ed me when I was switching over to DAQmx...

-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).
0 Kudos
Message 2 of 8
(2,391 Views)

How do I "post the code"?

Thanks,

Mark

 

0 Kudos
Message 3 of 8
(2,390 Views)

Kevin,

Here's the two files.  One does the catching the other does the pitching.

Thanks,

Mark

0 Kudos
Message 4 of 8
(2,382 Views)

Sorry, 

Left out Timed Sweep.  Here it is.

Mark

 

 

0 Kudos
Message 5 of 8
(2,379 Views)
I'm getting sloppy.  Left out SW Trigger for the input data.
 
They only let me have three attachments or I'd put all 4 VIs in this response.
 
So I'm putting the important 2 VIs relating to output followed by the missing VI in the input VI.
 
That should do it.
 
Thanks again,
 
Mark
 
 
0 Kudos
Message 6 of 8
(2,375 Views)
Hi Mark,
 
It looks like Kevin's out-of-the-blue guess was a good one.  Your task uses a DAQmx is Task Done function.  This function will return and then the task is stopped by the clear task in the middle of the analog output. 
 
Instead, use a DAQmx Wait Until Done (with a long enough timeout) or use the DAQmx is Task Done function in a while loop using the boolean output for the stop condition.  To make sure you aren't waiting unnecessarily in the case of an error, it is good programming practice to OR the boolean with the status from the error cluster on the DAQmx is Task Done function.
 
Your VI runs well on my M-Series card after making this adjustment.
 
Regards,
 
Jennifer O.
Applications Engineer
National Instruments
0 Kudos
Message 7 of 8
(2,360 Views)

Jennifer O, Kevin Price

Thanks for the fix.  I used the Wait Until Done Function and it works like a champ.

I read Kevin's comment but honestly couldn't connect the dots.

Your providing explicit recommendations and actually testing it was the key.

Thanks to you both.

I'll let NI Applications know that you solved the problem and close out this trouble report.

Thanks again,

Mark

0 Kudos
Message 8 of 8
(2,353 Views)