Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

phased sine wave analogue voltage output

Hi  I'm stuck trying to output an analogue voltage sine wave that can be varied in phase. I'm using Labview 8.20 with a PXI 6251 card. I have tried using a modified version of the 'gen multi volt updates text file source' example. I correctly produce the phased wave and its correctly written to and read from a text file, but, the vi runs and finishes but the device i'm talking to only recieves part of the waveform.
 
any ideas much appreciated.
 
thanks
Darren
0 Kudos
Message 1 of 4
(3,308 Views)


Darren

I've had a look at the example VI you referred to, but i could do with some more information on exactly how you have modified it. Are you reading the first or all the waveforms from the file? Do you have the write to device function in a while loop? etc.If you are able to attach your VI on here as a post or, via a reply to my earlier email if you would prefer, I will be able to setup the VI with the same PXI 6251 rig.

Best wishes

Rob


Rob L

NI Applications Engineer

UK & Ireland


It only takes a click to rate this message 😉
0 Kudos
Message 2 of 4
(3,289 Views)

Hi Rob

thanks for getting back to me. Attached are the two files we use for the waveform generation. They are seperate as the waveforms are created prior to thier use. The problem we have been having is although the waveform appears to be read from file correctly it is not output correctly.  When the vi finishes running we are left with a voltage output we tried adding a zero to the end of the file at the required point but have settled with extending the waveform an extra 90 degrees back to zero.

 

thanks for your help

 

Darren  

0 Kudos
Message 3 of 4
(3,287 Views)


Darren

After outputting a voltage signal through an M-series card, the signal remains at the final signal voltage, as you are experiencing. This is simply a property of the M-series card which, although might seem a bit strange, can be a significantly useful property. By trying to emit a 0 constant is the simplest way of reverting the output back to 0. The reason you encountered a problem could be down to a number of reasons. Firstly, you needed to stop the existing task by implementing the 'Stop DAQmx' function. This would then allow you to write to the device once more. By then placing a second 'DAQmx Write' function, you can then send a 0 constant out. However, you need to register the constant as an array of 2 zero values, as i have shown in my code amendments. .

Hope this is of use to you

Best wishes

Rob




Rob L

NI Applications Engineer

UK & Ireland


It only takes a click to rate this message 😉
0 Kudos
Message 4 of 4
(3,279 Views)