LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB 1208 LS from Measurement Computing - Analog Outputs

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,

 

 

Download All
0 Kudos
Message 1 of 8
(5,031 Views)

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.

0 Kudos
Message 2 of 8
(5,027 Views)

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.

Download All
0 Kudos
Message 3 of 8
(5,014 Views)

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

0 Kudos
Message 4 of 8
(4,998 Views)

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.

Download All
0 Kudos
Message 5 of 8
(4,981 Views)

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?

0 Kudos
Message 6 of 8
(4,972 Views)
Thanks for your reply. I did set the value before starting the VIs. They do have the waveform (sinusoidal waves) but I concern about the values. When I set 4 for DC Offset and 1 for amplitude, it supposes to goes from 3 to 5 sinusoidally, but it turns out to runs from 1.5 to 3.5 sinusoidally. Any thought?
I firstly doubted the calibration or things like that, but when I used the MCC Software to generate the sin wave (with the same DC Offset and Amplitude) I got the correct response.
Thats why I suspect my Analog Output program.
Many thanks!
0 Kudos
Message 7 of 8
(4,964 Views)

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.

0 Kudos
Message 8 of 8
(4,961 Views)