Error -1074115985 When Using NI-FGEN Function Calls

Updated Oct 4, 2018

Reported In

Driver

  • NI-FGEN

Issue Details

I am receiving Error -1074115985 with Status Code: -200584: Requested waveform length is invalid, because the number of samples is not an integer multiple of the waveform increment. What is this increment?

Solution

All NI-FGEN devices have a specification for waveform quantum, which dictates that when generating more than one waveform, the total number of waveforms being generated must be a mulitple of the waveform quantum for that device. There is a similar specification that is not documented called the Write Quantum. This is the increment referred to in the error message. The write quantum is 64 samples for all PCI and PXI FGEN devices. This specification dictates that the total number of samples you are generating (or writing to the onboard memory) must be a multiple of 64 samples, or that the remainder after subtracting the highest multiple of 64 that is less than the total number of samples, be a multiple of the waveform quantum.

For example:
Let's suppose we are using the NI PXI-5441 which has a waveform quantum of 4 and a write quantum of 64. If we attempt to generate 75 samples, we will get Error -200584. This is not because 75 is not a multiple of 64. It is because the remainder of the total number of samples divided by the write quantum is not a multiple of the waveform quantum, ie 75 / 64 =/= n*4. If we attempt to generate 76 samples, we will not get an error. First we generate 64 samples, then the remainder, 12, is a multiple of the waveform quantum (3*4), so this is an acceptable number of samples to generate. Similarly, we can generate 260 samples because we can subtract 64*4 = 256 to get 4 samples, and 4 is a multiple of the waveform quantum.
 

Additional Information

Minimum Waveform Size and Quantum

The memory architecture of the NI signal generators imposes certain requirements on the waveform size and quantum. If these requirements are not met, NI-FGEN returns an error. The specific values for minimum waveform size and quantum depend on the specific NI signal generator being used.

Minimum Waveform Size

Every waveform downloaded to the device memory must be at least a minimum size in terms of the number of samples.

Quantum

The size in samples of the waveform downloaded to the device memory must be an integer multiple of a certain number or quantum.

For example, if the minimum waveform size for a particular signal generator is 256 samples, the quantum is eight samples, and you request to load a waveform of 255 samples, NI-FGEN returns an error because the waveform size is too small. If you request to load a waveform of 257 samples, NI-FGEN also returns an error because even though the size is larger than the minimum waveform size, the waveform is not an integer multiple of the quantum size (8).

Waveform sizes that meet the restrictions for this example include 256, 264, 272, and 280 samples, and so on—up to the actual device memory size.

WAS THIS ARTICLE HELPFUL?

Not Helpful