Channel Settings > Sampling Different Channels at Different Rates
Previous | Next

Sampling Different Channels at Different Rates

Note: The resulting data file from sampling different channels at different rates is not compatible with ActiveX Controls and is not compatible with WinDaq/XL. To use either package, files must be converted to "regular" .wdq files using File > Save As... > option 2) Binary (with CODAS header) in WinDaq Waveform Browser software.

 

WinDaq/Pro+ acquisition software allows you to sample different channels at different rates. This is accomplished by entering a sample rate divisor for each channel in the Channel Settings dialog box. The sample rate divisor can be any whole number from one to 255.

 

 

The sample rate divisor allows you to divide the per channel sample rate to the desired value.

 

For example, let’s say we want to record four channels of data, one at 2kHz and the other three at 20Hz. First, determine the total sample rate or throughput rate by multiplying the number of channels to be recorded by the rate of the fastest channel:  4 × 2kHz = 8 kHz. Enter the result (8000) in the Sample Rate dialog box (accessed by choosing Sample Rate… from the Edit menu).

 

 

We now have four enabled channels and a total scanning rate (or throughput rate) of 8kHz. The per channel sample rate is 2kHz (8kHz throughput ÷ 4 channels = 2kHz per channel, evenly divided among the four channels). Up to this point, we have not done anything different from any other typical recording session. In order to get different rates on a per channel basis, we must enter a sample rate divisor for each channel (this is the part that’s different). For the channel we want to record at 2kHz, select Channel Settings… from the Edit menu and enter 1 in the sample rate divisor box.

 

 

Since the per channel sample rate is 2kHz and we want to record this channel at 2kHz, we want the divisor to be 1 (2000/2000 = 1). After entering 1 in the sample rate divisor box, press the TAB key to display the effective sample rate for this channel (2kHz). For the other channels we want to record at 20Hz, we would select the Next command button to display the next enabled channel’s Channel Settings dialog box. On this channel, enter 100 in the sample rate divisor box.

 

 

Since the per channel sample rate is 2kHz and we want to record this channel at 20Hz, we need a divisor that will bring 2kHz down to 20Hz (2000/20 = 100). After entering 100 in the sample rate divisor box, press the TAB key to display the effective sample rate for this channel (20Hz). Repeat this last step for the other two remaining channels.

 

The Preview button allows you to display a channel with the new sample rate in effect, so you can see what the recorded waveform will look like in WinDaq playback software. Note that you cannot select any menu items or change any parameters in preview mode, it is only for previewing your new sample rate(s). To exit the preview mode and get back to the Channel Settings… dialog box, press the ENTER key.

 

When a sample rate divisor other than 1 is entered on any channel, the throughput rate (entered in the Sample Rate dialog box by choosing Sample Rate… from the Edit menu) still accurately describes the rate at which data gets sampled, but because of the sample rate divisor, does not accurately describe the rate at which data is being recorded to disk (this divisor recording rate is the “effective throughput rate”). The effective throughput rate is required if you would like to calculate how large a data file will be, or how long you should record at a given sample rate in order to get a file of a certain size, etc. The effective throughput rate can be calculated with the formula

where

s = sample throughput (entered in the Sample Rate dialog box by choosing Sample Rate from the Edit menu).

n = number of enabled channels.

di = sample rate divisor of channel i.

 

For example, suppose we want to record five channels of data, one at 20kHz, another at 2kHz, another at 400Hz, another at 200Hz, and the last one at 100Hz. The first step would be to determine the total sample throughput rate (multiply the number of channels to be recorded by the rate of the fastest channel): 5 × 20kHz = 100kHz.

 

100kHz is the total sample throughput rate (the rate at which the data gets sampled). Enter that in the Sample Rate dialog box. Since we have five enabled channels and a total sample throughput rate of 100kHz, the per channel sample rate is 20kHz (100kHz throughput ÷ 5 channels = 20kHz per channel, evenly divided among the channels). In order to get the desired rates per channel, enter the following sample rate divisors for each indicated channel:

 

Channel 1 divisor = 1, since we want to record this channel at 20kHz.

Channel 2 divisor = 10, since we want to record this channel at 2kHz.

Channel 3 divisor = 50, since we want to record this channel at 400Hz.

Channel 4 divisor = 100, since we want to record this channel at 200Hz.

Channel 5 divisor = 200, since we want to record this channel at 100Hz.

 

We now have enough information to calculate the effective throughput rate.

 

 

So with these five channels, we have a sample throughput rate of 100kHz, but because we are sampling different channels at different rates, we are effectively recording to disk at a rate of 22.7kHz.

 

The File Size dialog box shows the current pack factor, which is the ratio of the original data file size to the data file size when sampling different channels at different rates. The pack factor is used to calculate data file size or recording time.

 

NOTE: At least one channel should have a sample rate divisor of 1 - and that channel should be the lowest channel number. For example, if you are sampling channels 2, 5, 7 and 8 at different rates, channel 2 should have a sample rate divisor of one.

 

Top