03-18-2011 02:41 PM
Hi,
I am using LabVIEW 8.2 and a PCI-MIO-16E-1 card.
I want to generate a sine waveform with an amplitude 0-10V and frequency f=8000 Hz for one AO.
The second AO should be used to generate a pulse/burst with an amplitude 0-5V and also a frequency up to 8000Hz.
I attached a screenshot of the vi i built so far - but how do I connect the two generated waveforms?
I know that I am generating 2 waveforms and not a waveform and a pulse, but the difficult thing for me is right now to connect them.
Let me know when you need more information.
Thanks,
Benno
03-18-2011 04:11 PM
I found another solution for my problem:http://forums.ni.com/t5/LabVIEW/how-to-combine-two-analog-outputs-into-the-same-task/td-p/634260
I tried to rebuilt it (see attached file)
But I get the error 20088 and 200327
What should I change?
Thanks,
Benno
03-18-2011 05:00 PM
Have you tried changing your DAQmx write to n channels, n samples 1d waveform?
03-18-2011 05:06 PM
Yes, I tried that, but then I get the error:
Broken Wire - connected two arrays of different dimensions
03-18-2011 05:16 PM
The output from your build array should be a 1d array of waveform. You can check this by hovering over the output wire with context help on.
If it isn't unhook all wires from the build array>>right click it>>concatinate inputs and hook it all back up.
hope this helps.
03-21-2011 09:13 AM
It is a 1D array of waveform.
One Problem was, that both 'waveform buffer generation.vi' needed a task in.
So there are 2 tasks out - can I combine them into one task out? Or should I just connect one of the task out with the DAQmx Timing.vi?
The new Error is:
Error -200524 occurred at DAQmx Write (Analog 1D Wfm NChan NSamp).vi:1
...Write cannot be performed, becauase the number of channels in the data does not match the number of channels in the task...
number of ch in task:2
number of ch in data:4
see my attached screenshot, how I wired everything...
03-21-2011 11:47 AM
Since you are using 2 Buffer Waveform vi's and you select 2 channels you are actually creating 4 waveforms. Here is an example that will do what I think you want.
Hope this helps.
03-21-2011 02:35 PM - edited 03-21-2011 02:36 PM
yes, it helps!
But I need to change the basic function generator with a pulse generator or something like a waveform generator with a burst mode.
I can't find something like that in LabVIEW... Do you know which vi would be the best to work with?
BTW: Thanks a lot for your help!!
03-21-2011 03:48 PM
Since I don't know the requirements of your 'burst'/'pulse' or the capabilities of your card (I don't have one) it's hard for me to suggest something specific. I would look into functions>>signal processing>>signal generation and see if something there would suit your needs. Those vi's will create an array of doubles that you would wire into the build waveform primitive, designating the dt and to as needed. If it was me I'd create an experimental vi without using the daq to get my waveform to what I needed. A while loop and waveform chart.
If you have a formula that describes your pulse you might be able to use the formula waveform vi.
Hope this helps.