DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

Illegal Block SIze FFT module

Hi all,
 
Is there any way other than trial and error of selecting the correct block size to use in dasylab V9.0.0???
 
I have 4 inputs from a daq board (essentially 4 sine waves from 0-2KHz) When I have only one input it wors a treat and is wonderful but with 4 inputs I cant seem to get teh block size correct and the error is with the FFT moduleand stops there.
 
I have tried using trhe Autoselect on the block size (thinking it would select the a workable size) but it still comes up with the same error?
 
in DAQMX I have a 20KHz sampling rate with a block size of 1024.
 
Dasylab V9.0.0 and DAQMX V8.0
 
any suggestions are appreciated
thanks in advance to you all
 
I accidently put this on the most active board forum under labview by accident in case anyone thinks this looks familar 🙂
But any ideas are appreciated thanks Smiley Happy
0 Kudos
Message 1 of 5
(8,811 Views)
I'm not sure what the error is. What else are you doing in the worksheet? Can you post it or email it to support@dasylab.net?

Generally, the block size should be from 1/2 to 1/10 of the sampling rate. For the FFT to function, it must be a power of 2.

For 20 kHz, we would recommend block sizes from 2048 to 8192. Larger block


Another important question... what is the hardware, and are you configuring the correct timebase?

-cj


Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 2 of 5
(8,801 Views)

Thanks CJ for your speedy replies

 

I feel a bit silly because I forgot about the block sizes for the experiment setup aswell as the hardware setup... I have since gone back and made them all 1024 in size and it is working like a charm. Smiley Happy

Is there a "global variable" or setting that you change the one setting of block size and it changes them all (hardware and experiment) to that size?

Thanks again for your help not only on this post but all the questions people ask 🙂

Regards

Glenn

0 Kudos
Message 3 of 5
(8,795 Views)
You can use a global variable for both sampling rate and block size. They are "static" variables, in that they will only be read at Experiment Start. If they change while the Experiment is running, the value will be ignored. This is because the block size and sampling rate are part of configuring the hardware drivers, and the measurement must be stopped to reset and reinitialize the communication with the drivers.

You can easily determine if a Global Variable is permitted in any dialog box entry field by Right Mouse Clicking in the field. If you see Global Variable... in the pop up menu, then you can use a variable in this box.

You can also use an Action module to monitor those variables, and if the operator should change them, the Action module can do a Stop/Restart action to reinitialize the measurement configuration. Note that all buffers are cleared, and the display modules all clear at the same time.

Another consideration - you can use the Extended mode of the Global Variable to compute a block size that changes when the sampling rate changes. Remember to keep it a power of two.

--cj
Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 4 of 5
(8,790 Views)
I made an example for you using DASYLab Full V9. It needs the Action module.
I am using the Sound Card driver.
When you change the sample rate, the Global Variables compute a new block size that is supposed to be about 1/10 the sample rate, rounded to a power of two.
The measurement stops and restarts, and posts a message in the Message Window AND in the Status Panel at the bottom of the screen with the current sample rate and block size.

Note that the Sound Card driver was smart, and limited a large sampling rate to the max allowable without a warning message.
Make sure that you review the math in the Extend Variable settings for Var_2 and Var_3. I computed the Power of 2 of the sampling rate divided by 10, then rounded it, and computed 2^ the new value.

I had to look up the math that says  Log2(x) = Log10(x)/Log10(2).

Have fun...

--cj


Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 5 of 5
(8,789 Views)