Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Swept Sine signal generator

Hi

 

I have attached the code and the image of the front panel. I am not able to record data after 5000 Hz eventhough the signal runs upto 10000 Hz. I would be greatfull for your help.

Thanks

 

Mal

0 Kudos
Message 11 of 19
(1,772 Views)

Hi

I have attached the code and the image of the front panel. I am unable to record frequency, power data beyond 5000 Hz, eventhough the signal runs upto 10000 Hz. I would be gratfull for your help.

Thanks

 

Mal

0 Kudos
Message 12 of 19
(1,774 Views)
Hi,
  the default sample rate you've setup is 8192 S/s.
Using Nyquist, the highest frequency component that you could resolve is half of this, so even though you are trying to work on a bandwidth of 5KHz, you're not actually sampling fast enough to resolve 10kHz - you must sample at atleast twice this for purely frequency component information.
 
Try acquiring faster, and let me know what happens.
 
Thanks

Sacha Emery
National Instruments (UK)
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 13 of 19
(1,756 Views)

Hi

 

Thanks for the help. I have made the sampling rate of the AI at 65536 ( see attached JPEG file of the front panel). I can acquire the data as a text file for the frequency range I have set up, ie from 0 to 14000 Hz ( see attached text file). But I don't get the spectrum  in the  same range (ie from 0 to  14000 Hz) in the X axis of the spectrum graphs (see spectrum dB and spectrum dB2 in the JPEG file) in the front panel. Can you help me to resolve this problem.

 

Thanks

 

Mal

Download All
0 Kudos
Message 14 of 19
(1,744 Views)

Hi Mal,

 

The reason that the spectrum plots did not have the same range as the initial frequency plot is that the initial frequency plot was of the entire power spectrum cluster. The later spectrum plots were only graphs of the magnitude, you need to re-bundle the cluster before plotting the spectrum plots if you want the same range as in the first graph.

 

I have tidied up your code for you and re-bundled the data before plotting.

Please bear in mind for the future that it is good practise to try and write your code left to right as it is easier to follow the codes flow, you might also consider using sub-Vis to compartmentalise your code in future.

 

I would also suggest you synchronise your output and input as posted earlier by SachaE:

“The AI would need starting before the AO; otherwise you'll lose some information.

If you want to do it repetitively putting a while loop around it will leave breaks in the data whilst it reconfigures.

Look at a continuous setup instead, and keep feeding the AO repetitively without reconfiguring after setting up for a continuous AI.

Search for things like simultaneous AI and AO”
0 Kudos
Message 15 of 19
(1,702 Views)

I have attached to this posting a piece of example from the NI Example finder: “Multi-function-synch AI-AO.vi”

This example demonstrates how to continuously acquire and generate data at the same time, synchronized with one another.

 

For your information this example can be found by clicking “help” on the toolbar within LabVIEW >Find Examples > Browse > Hardware Input and Output > DAQmx > Synchronisation > Multi-function > Multi-function-synch AI-AO.vi

If you follow this path there are instructions for running the example vi as well as a description of the block diagram steps executed by the vi in the information box to aid understanding of the workings of the example code.

 

I hope this information helps,

 

Emma R

NIUK & Ireland

0 Kudos
Message 16 of 19
(1,698 Views)

Hi

 

Thanks for the help. Can you please post the JPEG image of the front pannel+block diagrams of the attached programmes. I have labview 7.1 so I  can't open them as they are in Labview 8 .

Thanks

 

Mal

0 Kudos
Message 17 of 19
(1,693 Views)

Hi Mal,

I've rebuilt my previously posted modifed version of your code in 7.1 for you.

Make sure that you set all the graphs so that they have autoscale X enabled - or you won't be able to see the full ranges.

Let me know if this answers your problem.

Emma R

NIUK & Ireland

0 Kudos
Message 18 of 19
(1,684 Views)

Hi

 

Thanks. I think I have got it now.

Thanks for all the help.

 

Mal

0 Kudos
Message 19 of 19
(1,672 Views)