LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pci-6110 simultaneous waveforms

I have been searching for information on how to simultaneously output a square wave from AO0 and a triangle wave from AO1.  I am trying to use the square wave as an input into PFI0 to trigger an analog input.  I want to be able to change the amplitude and offset on the triangle wave because it will be driving the device under test.  I can use the Function Generator VI in the examples to create either one of the desired functions, but 2 instances will not run simultaneously.
Jim

LV 2020
0 Kudos
Message 1 of 6
(3,225 Views)

Hi Imtis,

There is a nice shipping example on generating multiple analog outputs in your LabVIEW Example Finder. The one we're looking for should be under Hardware Input/Output»DAQmx»Analog Generation»Voltage»Cont Gen Voltage Wfm-Int Clk.VI

This code is currently configured to have two identical waveforms sent out to two different analog output channels. In order to output two different waveforms, the Waveform Buffered Generation (Multi).VI must be modified. If you look into this sub VI, you will see that it calls on the Basic Function Generator.VI as often as the number of specified channel in your main VI. You will also see that it is in a For Loop so that the waveforms can be built into an array. This array is then fed into the DAQmx Write of your main VI.

I hope this helps,

S_Hong

 

 

 

S_Hong
National Instruments
Applications Engineer
0 Kudos
Message 2 of 6
(3,209 Views)
S_Hong,

Thank you for your reply.  When I try to write to the board with the DAQmx I get a dll error.  I have been using traditional DAQ with no errors.  What I am really trying to do is synchronize an analog acquisition with a triangle wave that I am outputting.  I am trying to generate the synchronous square wave in order to feed it back into PFI0 to trigger the acquisition.  Is there a better way to trigger the AI scan?
Jim

LV 2020
0 Kudos
Message 3 of 6
(3,196 Views)

Hi Imtis,

Could you be more specific as to what dll error message you are getting? Is there an error code with the error message? Does the shipping example work without any modifications?

As for synchronizing data acquisition with generation, there is a nice devzone article on our website which might help you get started. Since all you need to synchronize is the start trigger, this can be done internally and there is no need to route any signals back into the board.

M Series Synchronization with LabVIEW and NI-DAQmx
http://zone.ni.com/devzone/cda/tut/p/id/3615

S_Hong

S_Hong
National Instruments
Applications Engineer
0 Kudos
Message 4 of 6
(3,183 Views)
Hi S_Hong,

Attached is the error dialog.  I was trying to run the example "Multi-Function-Synch AI-AO.vi" unmodified.  I will read the rest of the KB article, but I suspect that even if I can manage to fix the error when I run DAQmx VIs that the method suggested won't work since I have a PCI-6110E.
Jim

LV 2020
0 Kudos
Message 5 of 6
(3,179 Views)

Hi Imtis,

Thanks for the screenshot. I would like to request that you post a little more information on your issue since this type of error can come from a whole range of reasons.

What hardware are you using?
What version of LabVIEW are you running?
Has the program ever worked before?
Is your problem reproduceable with different set of input parameters?
Do you get the same error when running it on different a computer?

You may try and see if re-installing the DAQmx drivers solves the problem.

S_Hong

S_Hong
National Instruments
Applications Engineer
0 Kudos
Message 6 of 6
(3,142 Views)