LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ Assistant data acquisition

I am using DAQ Assistant (Voltage In) to record waveforms that are a response from DAQ Assistant (Voltage Out - which is a triangular and sine waveform output). As the output is 100 Hz (sine wave) and 1.25 Hz (triangular wave) I need to sample the input data at least 1000 Hz. The way I do this is set the sampling rate at 1000 Hz and no of samples at 1000 Hz as well. This is in a while loop and so will run and collect data until stopped. However,  (see attached word doc - blue for input waveform and yellow for output waveform) at the beginning of the yellow output waveform there is a small blip (which is not shown in the input waveform) as if the output waveform has "flipped over". After this it looks ok. It does the same at 10 000 Hz. Has anybody got any ideas why this is? I have also attached the vi.

thanks,

Martin


Download All
0 Kudos
Message 1 of 7
(3,580 Views)

Hi Martin,

Even through this seems to be working  this is not the recommended method of achieving simultaneous AI/AO.

In your program, even throught it seems like you are generating and acquiring simultaneously, if you analyse closely there will be no cooreation between the data that you are generating and acquiring.

The reason for this is that the AI and AI sample clocks will not be in sync.

This is how you can do this : synchronise AI and AO scan clocks.

look at attached VI (taken from Labview examples)

or find the same in labview examples.

It should not be complicated to use this program, since  it is documented.

hope this helps

Regards

Dev

 

 

Message 2 of 7
(3,571 Views)
Dev,

Thanks for that - it is a much better program than my one. However, I have tried it and it works ok except I am getting the same problem. However, when I tried the sine frequency at 100 Hz on its own it the input was ok. But when I used the triangular frequency of 1.25 Hz on its own I got the same input result as in the word attachment. When this is changed to 1 Hz everything is ok again and also works well when wired with the 100 Hz sine frequency. So it seems that the program does not like 1.25 Hz but is ok with 1 Hz.

thanks,

Martin
Message 3 of 7
(3,567 Views)

Hi Martin,

Its more of a problem  with the function generator vi not able to create a waveform of1.25Hz, than Ao not generating the same. 

Since the AO generates output based on this waveform pattern, try to toy around with number of cycles per buffer, buffer size and update rate and see if you can achieve 1.25 Hz.
 
regards
 
Dev
 
 
 
Message 4 of 7
(3,554 Views)
Dev,

Thanks for your suggestion. I put the input rate at 10000 Hz and the number of samples at 8000 (as I figured 10000 divided by 8000 is equal to 1.25). The output waveforms were also set to this and worked fine with no blips.

thanks again,

Martin
0 Kudos
Message 5 of 7
(3,542 Views)
Hi Dev,

Just one other question. I have noticed that when using an in line resistor the output and input waveforms are not in synch as they should be. I wondered if I have set up the DAQmx trigger (AO) and Start trigger (AI) properly. I double clicked on the DAQmx trigger and clicked on "AO trigger" and double clicked on the Start trigger and clicked on "AI start trigger. Have youany suggestions for this.

thanks,

Martin


0 Kudos
Message 6 of 7
(3,514 Views)
Dev,

Ignore the last message as I have sorted out the problem - everything is fine now. Thanks again for your help.

all the best,

Martin
0 Kudos
Message 7 of 7
(3,502 Views)