NI-FGEN Programming State Model

NI Signal Generator

NI-FGEN
Programming State Model


In this topic the word "property," when not referring to a specific property, refers to both properties in LabVIEW and attributes in C or CVI.

The NI-FGEN programming model has three main states: Idle, Committed, and Generating, as shown in the following figure.

Idle–You can program all session properties in the Idle state. However, when in the Idle state, the properties may not have been applied to the device yet, so the device hardware configuration may not match the session property values–the device remains configured as it was the last time a session was committed. If the computer has just been reset or the niFgen Reset Device VI or the niFgen_ResetDevice function has just been called, the device is in the default hardware state. This means the device is not generating a waveform, although, depending on the previous state, a constant DC voltage from the last waveform sample generated on the output connector may be present.

Committed–All of the session properties are applied to the device when the session enters the Committed state. In the Committed state, waveforms and sequences can be loaded into onboard memory. If any properties are changed, the session implicitly transitions back to idle, and the hardware configuration still reflects the previously committed properties. Calling the niFgen Commit VI or the niFgen_Commit function from the Idle state verifies all properties, configures the device, and transitions to the Committed state.

Generating–In the Generating state, session properties always reflect the current state of the device, and the device is either waiting on a trigger or generating a signal. Dynamic properties, such as the Arbitrary Waveform Gain property or the NIFGEN_ATTR_ARB_GAIN attribute and the Arbitrary Waveform Offset property or the NIFGEN_ATTR_ARB_OFFSET attribute, are applied to the device immediately if set while the session is in the Generating state.

The following actions or settings cause a transition from one state to another: