06-06-2014 11:51 AM
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
Solved! Go to Solution.
06-06-2014 12:18 PM
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.
06-06-2014 04:10 PM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
06-10-2014 10:57 AM
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
06-10-2014 11:34 AM
@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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
06-11-2014 08:41 AM
Hi!
You can see here how the buffer size is allocated:
http://digital.ni.com/public.nsf/allkb/E1E67695E76BA75B86256DB1004E9B07
http://zone.ni.com/reference/en-XX/help/370466V-01/mxcncpts/buffersize/
Regards!
06-11-2014 09:42 AM
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?
06-11-2014 10:22 AM
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
06-16-2014 04:53 PM
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!