Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
1 ratings:
 2 out of 5     Rate this Document

Arbitrary Waveform Output with NI 5402

Hardware: Signal Sources (AWG/FG/AO)>>Arbitrary Waveform and Function Generators>>PCI-5402, Signal Sources (AWG/FG/AO)>>Arbitrary Waveform and Function Generators>>PXI-5402

Problem:
I would like to use the NI 5402 in Arbitrary Waveform Output mode but it is throwing
Error -1074135039 "Invalid Output Mode", why is this?   (Error shown as Figure 1 below)


Figure 1. Invalid Output Mode Error
 

Solution:
The NI 5402 does not support Arbitrary Waveform Output mode; however a user defined waveform can be generated by the NI 5402 when configured correctly.

The NI 5402 requires a User Defined Waveform of length 16384 samples to be loaded into device memory*. The sample size is 2 bytes, for a total memory of 38kb. This waveform is created as an
array of doubles and placed into memory using the niFgen Define User Standard Waveform.VI.

The following steps must be taken to configure the NI 5402 to output the User Defined Waveform.
  1. niFgen Configure Output Mode.VI, Output Mode=Standard Waveform
  2. niFgen Configure Standard Waveform.VI, Waveform=User
  3. niFgen Define User Standard Waveform.VI, Waveform Data Array=Waveform Data.
The niFgen Configure Standard Waveform.VI and niFgen Define User Standard Waveform.VI are shown configured correctly below in Figure 2.

Figure 2. User Defined Waveform Configuration


A completed example is attached to this KnowledgeBase in LabVIEW 8.2 and LabVIEW 8.5 format.

* Note: The difference is with a function generator (i.e. PXI-5402) and a waveform generator (i.e. PXI-5422) is the waveform needs to be a standard size because it is a function, not a waveform and in this particular case, 16384 samples.  You can imagine it as the sine wave output is a standard function and to replace it, you would replace it with something the same size.  This is why it requires 16384 samples.  Whereas, a waveform generator can take in a waveform of arbitrary size.


Related Links:
KnowledgeBase 459I25DF "Device not found" or "Invalid Output Mode" Error When Using PXI-5402 in Arbitrary Waveform or Arbitrary Sequence Mode

Attachments:
niFgen_User_Defined_Wfm_8_2.vi
niFgen_User_Defined_Wfm_8_5.vi




Report Date: 10/17/2007
Last Updated: 01/04/2008
Document ID: 4EGM4UVZ

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit