LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using DAQmx for 2 DC voltages and one AC signal simultaneouly with USB-6363 DAQ

Solved!
Go to solution

I am using a USB-6363 DAQ to generate two DC voltages and one sine wave at the same time.  The DC voltages work as expected.  The AC output either doesn't show up or when I get it to work, it outputs very unstable frequencies.  Could be the way I am creating the sine wave.  Any help would be appreciated.

 

Thank you,

Eric

0 Kudos
Message 1 of 4
(1,097 Views)

Take a closer look at the shipping examples for continuous AO.  Some problems I see:

 

1. Data dependency.  Your sine wave task can't start until after you click your 'Stop 2' button.  Meanwhile, you'll have recalculated your sine wave data many times, but only the very last set will exit the loop and go to your task.

 

2. It'll be important that the 'fs' parameter for sine wave calcs matches the 'actual sample rate' you query in order to achieve the sine wave frequency you intend.

 

3. Once you follow the pattern of the shipping example, if you keep calculating and writing your sine wave data in a loop, you'll need a feedback node or shift register to carry the phase info from one iteration to the next.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 4
(1,090 Views)
Solution
Accepted by topic author ecantrell

I really appreciate the hints but it's just not clicking for me.  Without the "timed" loop I get random freq and amplitudes output no matter the settings. 

 

Thank you,

Eric

0 Kudos
Message 3 of 4
(1,058 Views)

I made several very minimal mods to your code to help illustrate what I was talking about.  There are still several questionable things I left in there, figuring I could illustrate the main points better by minimizing changes.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 4
(1,038 Views)