04-14-2013 09:07 PM
Hi all,
I am a grad student at Phys Dept, UC Berkeley. We bought a USB 1208 LS from Measurement Computing. I want to use the DAQ Board to generate 0-5 VDC, and send the signal to a 247 MKS Controller in order to set flow for 4 ea. MFCs. As I see from examples provided by Universal Library (from Measurement Computing), there is one example (XAOUT) in which I can generate a sinuisoidal analog ouptut but for very short moment. I would like to generate CONTINOUS output analog signals (that last until I terminate), which then apply to the 247 Controller.
Attached is the example from MCC, please help me. Thanks in advance.
Regards,
04-14-2013 09:27 PM
Not a great example. I don't have the MCC drivers installed to know if they have a VI that allows continuous analog output, or if the 1208 has a buffer to apply multiple points at once. The example they are showing is just outputting 1 sample at a time in a loop that will run as fast as it can. I don't even see where they are defining the analog output rate
See if you can find a better example with continuous data acquisition.
But if you go with this example, use the i terminal going into a Quotient/Remainder function divided by the Number of points to index the array. Eliminate the i+1 >= number of points as a stop condition. Then this VI will run until you hit the stop button.
04-15-2013 12:26 AM
Thank you very much for your quick reply.
MCC provides 3 examples (please see attached), one I showed before. I also enclose the "labview manual", please see pages 39, 40 and 41 for details of those VIs. I would really appreciate your help.
04-15-2013 08:42 AM
The D/A channels on the USB-1208LS can only be software paced (no hardware pacing). The max update rate is 100 Hz for 1 channel, or 50 Hz/channel if both channels are used. Your VI can send out a "continuous" waveform as long as it keeps writing a new value to the D/A channel. For the example you mention, XAOUT, the example itself sends the array of data out only once. You can modify the example to send the array out over and over. This modification is not specific to the MCC hardware or driver. P.S. This MCC driver is the legacy driver, frozen 5 years ago. Users of newer versions of LabVIEW should use MCC's ULx driver. It ships with a continuous D/A software paced example named: ULx Gen Mult Voltage Updates-SW Timed.vi
04-15-2013 09:42 PM
Hi All,
I tried to use the XAOUT example and modified it as in post #2 suggested. I can then run it continously until I hit the stop button. However, the sinusoidal function I got is incorrect. For example, when I set DC Offset = 4, Amplitude = 2, I supposed to get a sinuisoidal function like 4 + 2 Sin (2 x Pi x i/N), which of course centers at 4. However, I ended up getting a function centering at 2.5 (it goes from 3.5 to 1.5). I tried many values of DC Offset and Amplitude, all gave me the center value around 2.5. Attached is my VIs. Please take a look.
By the way, when I used TraceDAQ, a software from MCC, to generate function (I generated a sinusoidal function), I got a correct form (I use another VI to get the signals, which also attached).
Please help me. I really appreciate your help.
04-15-2013 10:43 PM
Both of your VI's look like they make the correct waveform to me.
Are you setting your amplitude and offset values before you run your VI, or after you start it?
04-15-2013 10:52 PM
04-15-2013 10:58 PM
Where are you seeing the wrong values? Is it on your waveform graph? Or are you looking at an oscilloscope display of the actual signals being output from the card?
My thought is that you aren't actually doing what you think you are doing. Strip out all of your DAQ code. Just generate the sine wave array and display in on the waveform chart. If it still doesn't look right to you, then do Edit/ Make Current Values default. Save your VI and upload it.