niFgen_ExportAttributeConfigurationBuffer
- Updated2023-02-21
- 3 minute(s) read
ViStatus niFgen_ExportAttributeConfigurationBuffer (ViSession Instrument_Handle, ViInt32 Size, ViAddr Configuration);
Purpose
Exports a session configuration to a buffer.
You can export and import supported configurations only betwen NI‑FGEN devices with identical bus types, model numbers, and channel counts, as well as the same number of initialized channels.
![]() |
Note You cannot call this function while the session is in the Running/Generating state. |
Supported Configurations
You can export and import the following between NI‑FGEN sessions:
- Attribute configurations
- Arbitrary waveforms
Requirements for Exporting and Importing Arbitrary Waveforms
Arbitrary waveforms you export and import between sessions using this function must meet the following criteria:
- All waveforms in the exporting session are created from files, other than HWS files, using the niFgen_CreateWaveformFromFileI16 or niFgen_CreateWaveformFromFileF64 functions
- The full file path of the file containing the arbitrary waveform still exists upon import
- All waveforms are defined using handles rather than names
- All waveforms are complete—none are streamed or incrementally written
You can set the device mode with the niFgen_ConfigureOutputMode function. For more information on arbitrary waveform mode, refer to Arbitrary Waveform Output Mode and Configure Arbitrary Waveform Mode.
Channel Mapping Behavior
When exporting and importing configurations between NI‑FGEN sessions that were initialized with different channels using the niFgen_InitializeWithChannels function, the configuration of the exporting channel is mapped to the importing channel.
For example, if your entry for channelName is 0 for the exporting session and 1 for the importing session, the configuration exported from channel 0 is imported into channel 1.
![]() |
Note This function will return an error if the total number of channels initialized for the exporting session is not equal to the total number of channels initialized for the importing session. |
Related Topics:
Setting Attributes Before Reading Attributes
Parameters
Input | ||
Name | Type | Description |
Instrument_Handle | ViSession | Identifies your instrument session. Instrument_Handle is obtained from the niFgen_init, niFgen_InitWithOptions, or niFgen_InitializeWithChannels functions and identifies a particular instrument session. |
size | ViInt32 | Specifies the number of samples to load into the waveform.
Default Value: 0 |
Configuration | ViAddr | Specifies the byte array buffer to be populated with the exported configuration. |
Return Value
Name | Type | Description | ||||||||
status | ViStatus | Returns the status code of this operation. The status code either indicates success or describes an error or warning condition. You can examine the status code from each call to an NI-FGEN function to determine if an error occurred.
To obtain a text description of the status code, call the niFgen_error_message function. To obtain additional information about the error condition, call the niFgen_GetError function. To clear the error information from NI-FGEN, call the niFgen_ClearError function. The general meaning of the status code is as follows:
|