From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Difficulty using analog output to generate a predetermined file

Solved!
Go to solution

Hey all, 

 

I attempting to output a predetermined file to an analog output channel at 1kHz on my USB 6343 Multifunction DAQ. 

 

Here are the issues I'm experiencing:

 

1: The file outputs so quickly my o'scope can't even pick it up. 

2: When you try to stop the output it nearly freezes up.

3: My waveform graph and plot data do not update with the data that has been read. 

 

 

If anyone wants to tackle one ore more of these issues I would be very appreciatve.

 

Thanks,

 

Kassandra

Download All
0 Kudos
Message 1 of 9
(2,725 Views)

You have an array of waveforms.  This would imply an NChannel,N Sample write.  You are currently set up for a 1 Channel, N Sample write.  Not sure if that is your problem, just something that popped out to me.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 9
(2,721 Views)

No problem.  Attached is an update.  The biggest issue was trying to deal with 2D data when you really just had 1 column.  Instead of array subset just index that column and get the data as a 1D array.  Then there isn't an array of waveforms there is just one which is what you want.  I also removed the for loop for scaling because you don't need it just give it the array of data and a multiply factor.  I also added an event case to handle close and a timeout to see if there was an error.  I also changed the window appearance to remove the stop button and menu bar and set a minimum window size.  So to stop you just close it like any other Windows program.

0 Kudos
Message 3 of 9
(2,697 Views)

Hooovahh, 

 

Thank you for your edits! Things looked pretty good overall, however my file cannot run because the buffer size is too small. See attached output for the error message. 

 

I tried adjusting the 'DAQmx Configure Ouput Buffer' but it really didn't seem to have much of an effect. Do you think I should try a For Loop to pick off a pre-determined ammount of points then output them quickly? 

 

Thanks for the help!

 

LabVIEW Novice Kashi13

0 Kudos
Message 4 of 9
(2,648 Views)
Solution
Accepted by topic author kashi13

@kashi13 wrote:

 

I tried adjusting the 'DAQmx Configure Ouput Buffer' but it really didn't seem to have much of an effect. Do you think I should try a For Loop to pick off a pre-determined ammount of points then output them quickly? 


That is odd.  So I don't usually need to use the Configure Output Buffer function that you have.  If you look at the help of the DAQmx Timing subVI just after it, you'll see that the Samples Per Channel help determine the buffer size.  You might want to try to not use the configure output buffer function at all, not that I know if that will fix it or not.

Message 5 of 9
(2,643 Views)

Hello Eaguero,

 

I have attempted to use the buffer size information you have sent me however, I'm still getting the same error. 

 

I want to output at 1kHz so my corresponding buffer size is 10kS. You can seem my implementation of this in the screenshot shown. 

 

What else could I do to migiate the issue? 

0 Kudos
Message 7 of 9
(2,607 Views)

Hi,

 

Are you using the Clear Task.VI?

Do you regenerate the output signal as said here? http://forums.ni.com/t5/Multifunction-DAQ/error-in-rewriting-to-the-analog-output-buffer/m-p/2649307

 

Please let me know

0 Kudos
Message 8 of 9
(2,595 Views)

In the end Hooovah's VI worked, I just had to increase the buffer size (100000) and set a constant for the samples per channel (1000) and voila! 

 

Thanks to everyone who provided input on this issue! 

0 Kudos
Message 9 of 9
(2,547 Views)