NI Home > Community > NI Discussion Forums

Signal Generators

Reply
Member
zhu_nuo
Posts: 2
0 Kudos

How can I get stable Sin wave through NI 9264 ?

Dear all,

 

I would like to generate 64 analog sin wave with frequency up to 20K Hz.

Then I bought 4 NI9264:

  • 25 kS/s/ch simultaneous output
  • Hot-swappable operation
  • Spring terminal or D-SUB connectivity options
  • 250 Vrms isolation (spring terminal version)
  • 60 VDC isolation (D-SUB version)

 

.The attached is my file for the generation. when I used Osciloscope to monitor the output, I could not get any stable output.

 Could I have the reasons and suggestions for my objective please?

 

Thanks!

 

Zhu_nuo

Active Participant
Alex.T
Posts: 324
0 Kudos

Re: How can I get stable Sin wave through NI 9264 ?

[ Edited ]

Hi Zhuming, 

 

I hope that you have been well.

 

The VI Snippet below shows how we can generate a single sinusoid uniformly across all 64 channels in your chassis. This should serve as a good starting point for generating these 20kHz signals.

 

64 Channel Express.png

 

The function of the application that you attached is that it allows us to specify the individual changes on a per-channel basis; this is because in our E-Mail conversations, we concluded thatt it'd be necessary to vary a voltage on individual channels. This works by creating a large array of all of the individual steps and then buferring the data down to the hardware layer, to prevent any Operating System 'slowness' getting in the way of our generation task. I'd recommend checking out some of the DAQmx Example from the NI Example Finder in order to gain a better understanding of how hardware regeneration works.

 

A good example of hardware regeneration can be found in:

<LabVIEW> » Help » Find Examples » Hardware Input and Output » NI-DAQmx » Analog Generation » Voltage » Cont Gen Voltage Wfm-Int Clk-On-Board Regeneration.vi.

 

This provides a much clearer representation of what's going on in the code you've attached. After looking through this example, you'll see that the rest of the code which surrounds the generation task is application specific functionality!

 

Kind Regards,


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

Member
zhu_nuo
Posts: 2
0 Kudos

Re: How can I get stable Sin wave through NI 9264 ?

Dear Alex,

 

Many thanks for your message.

 

The  VI Snippet you provided could not work. The information provided by the software is " write can not be performed, because the number of channels in the data does not match the number of channels in the task.  

 number of the channels in the task : 64

number of the channels in data : 1

 

AS for the example, "Cont Gen Voltage Wfm-Int Clk-On-Board Regeneration.vi", the program can generate one channel signal with frequency up to 20KHz, and up to12KHz for two channels. for 3 channels or more, the maximum frequency of  generated signal reduce dramatically.

 

Can I have another suggestions please?

 

Kind regards,

 

Zhuming 

Active Participant
Alex.T
Posts: 324
0 Kudos

Re: How can I get stable Sin wave through NI 9264 ?

Hi Zhuming,

 

The VI above only provides waveform information for a single channel. In order to output data across all 64 channels in the task, we can make use of a For Loop to build an array of waveform information for each channel. In the example below, I've made use of an Auto-Indexing For Loop in order to build up a waveform output array of 64 elements. I've wired this to an NI-DAQmx Analog 1D Wfm Write VI; the 1D array's elements represents each channel in the group of selected channels for generation.

 

 

64ChannelSimple.png

 

 

An important thing to note is that the NI 9264 16 channel analogue output modules have a maximum sample rate of 25 kS/s/ch. This means that each channel is capable of writing 25kS/s simultaneously.

 

To reliably generate a signal, we generally need to have it comprised of around 5 to 10 points of data. This allows us to represent the signal to a good degree of accuracy. For example, if I wanted to reliably output a 1Hz Sine Wave, I would need to break the 1Hz wave into ten separate points and then output them at a rate of 10Hz. In terms of the NI 9264, the maximum frequency content (Two points of information) that can be generated is 25kHz/2 = 12.5kHz wave. The maximum clear wave frequency that we could produce with the 9264 (A wave built up of ten points) is 2.5kHz simultaneously across each channel. This is all to do with Nyquist's Theorem. This should explain why the frequency appeared to drop.

 

Out of interest, how are you measuring these output frequencies?

 

Kind Regards,


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)