NI 5442
Minimum Waveform Size and Quantum
Waveform Size
The NI 5442 onboard memory architecture imposes certain requirements on the waveform size and quantum. The minimum waveform size depends on the output mode and the trigger mode. Refer to the device specifications for the minimum waveform size values for the different modes.
Note To provide greater programming flexibility, NI-FGEN does not strictly enforce the minimum waveform sizes stated in the device specifications. NI-FGEN enforces a minimum waveform size of four samples for all trigger modes (two if the OSP block is enabled and the waveform data points have been configured for complex data using the Data Processing Mode property or the NIFGEN_ATTR_OSP_DATA_PROCESSING_MODE attribute), so it is possible to generate waveforms that are smaller than the sizes given in the specifications. However, the device may not be able to fetch data from onboard memory fast enough to keep up with waveform generation at high sample rates.
This condition may occur if a segment is looping over a very small waveform, if a segment is generating a marker within a very small waveform, or if triggers are advancing the segments in a sequence very rapidly. When this occurs, NI-FGEN reports Error –1074115901 (0xBFFA4AC3): Device Data Underflow. The simplest way to avoid this condition is to follow the minimum waveform size guidelines in the specifications. If these rules are followed, a data underflow error will not occur under any sample rate. You can develop applications that generate waveforms smaller than those listed in the device specifications at slower sample rates. If a data underflow occurs, NI-FGEN reports the error when the generation is aborted. This is typically accomplished by calling the niFgen Abort Generation VI or the niFgen_AbortGeneration function, or if you call the niFgen Wait Until Done, or niFgen Is Done VIs (or the niFgen_WaitUntilDone or niFgen_IsDone functions) while the device is generating a signal. To monitor error conditions during waveform generation, the niFgen Is Done VI or the niFgen_IsDone function can be called repeatedly while the device is generating a signal. |
Quantum
Quantum is the increment in samples for waveform sizes. The NI 5442 has a sample quantum of one, allowing waveforms of any size (between the maximum and minimum waveform sizes) to be downloaded.
The maximum waveform size allowed depends on the remaining available space in the onboard memory of the device. The remaining available space depends on factors such as any waveforms and generation instructions currently occupying memory space in the onboard memory. The maximum allowable size equals the memory size of the device minus the data already in memory. Query the Max Waveform Size property or the NIFGEN_ATTR_MAX_WAVEFORM_SIZE attribute for the current largest size waveform that can be downloaded to the device.
You can download floating point, signed 16-bit binary, or complex floating-point waveforms to the device onboard memory. For information about downloading waveforms to the onboard memory in LabVIEW, refer to the niFgen Create Waveform or niFgen Write Waveform VIs for more information. For information about downloading waveforms to the onboard memory in C, refer to the niFgen_CreateWaveformF64, niFgen_CreateWaveformI16, niFgen_CreateWaveformComplexF64, niFgen_WriteWaveform, niFgen_WriteBinary16Waveform, or niFgen_WriteWaveformComplexF64 functions for more information.