Skip to content

NI FGEN Arbitrary Waveform Output Functions

Palash Khare edited this page Jun 8, 2021 · 3 revisions

Arbitrary Waveform Output Functions

niFgen_ConfigureGain

ViStatus niFgen_ConfigureGain (ViSession vi, ViConstString channelName, ViReal64 gain);

Purpose

Configures the amount of gain to apply to the waveform.

Note:  The signal generator must not be in the Generating state when you call this function.

You must call the niFgen_ConfigureOutputMode function to set the outputMode parameter to NIFGEN_VAL_OUTPUT_ARB before calling this function.

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the niFgen_init, niFgen_InitWithOptions, or niFgen_InitializeWithChannels functions and identifies a particular instrument session.
channelName ViConstString

Specifies the channel name for which you want to configure the gain.

Default Value: "0"

gain ViReal64

Specifies the factor by which the signal generator scales the arbitrary waveforms in the sequence. When you create an arbitrary waveform, you must first normalize the data points to a range of –1.00 to +1.00. You can use this parameter to scale the waveform to other ranges. The gain is applied before the offset is added.

For example, to configure the output signal to range from –2.00 to +2.00 V, set gain to 2.00.

Units: unitless

Default Value: None

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 theniFgen_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:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

niFgen_ConfigureSampleRate

ViStatus niFgen_ConfigureSampleRate (ViSession vi, ViReal64 sampleRate);

Purpose

Configures the NIFGEN_ATTRIBUTE_ARB_SAMPLE_RATE attribute, which determines the rate at which the signal generator produces arbitrary waveforms. When you configure the signal generator to produce an arbitrary sequence, this value is the sample rate for all arbitrary waveforms in the sequence.

Note:  The signal generator must not be in the Generating state when you call this function.

You must call the niFgen_ConfigureOutputMode function to set the outputMode parameter to NIFGEN_VAL_OUTPUT_ARB, NIFGEN_VAL_OUTPUT_SEQ, or NIFGEN_VAL_OUTPUT_SCRIPT before calling this function.

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the niFgen_init, niFgen_InitWithOptions, or niFgen_InitializeWithChannels functions and identifies a particular instrument session.
sampleRate ViReal64

Specifies the sample rate at which you want the signal generator to generate arbitrary waveforms. NI-FGEN sets the NIFGEN_ATTRIBUTE_ARB_SAMPLE_RATE attribute to this value.

Units: Samples/s

Default Value: None

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 theniFgen_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:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

niFgen_QueryArbWfmCapabilities

ViStatus niFgen_QueryArbWfmCapabilities (ViSession vi, ViInt32* maximumNumberofWaveforms, ViInt32* waveformQuantum, ViInt32* minimumWaveformSize, ViInt32* maximumWaveformSize);

Purpose

Returns the attributes of the signal generator that are related to creating arbitrary waveforms. These attributes are the maximum number of waveforms, waveform quantum, minimum waveform size, and maximum waveform size.

Note:   If you do not want to obtain the waveform quantum, pass a value of VI_NULL for this parameter.

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the niFgen_init, niFgen_InitWithOptions, or niFgen_InitializeWithChannels functions and identifies a particular instrument session.
Output
Name Type Description
maximumNumberofWaveforms ViInt32* Returns the maximum number of arbitrary waveforms that the signal generator allows. NI-FGEN obtains this value from the NIFGEN_ATTRIBUTE_MAX_NUM_WAVEFORMS attribute.
waveformQuantum ViInt32*

The size (number of points) of each waveform must be a multiple of a constant quantum value. This parameter obtains the quantum value that the signal generator uses. NI-FGEN returns this value from the NIFGEN_ATTRIBUTE_WAVEFORM_QUANTUM attribute.

For example, when this attribute returns a value of 8, all waveform sizes must be a multiple of 8.

minimumWaveformSize ViInt32* Returns the minimum number of points that the signal generator allows in a waveform. NI-FGEN obtains this value from the NIFGEN_ATTRIBUTE_MIN_WAVEFORM_SIZE attribute.
maximumWaveformSize ViInt32* Returns the maximum number of points that the signal generator allows in a waveform. NI-FGEN obtains this value from the NIFGEN_ATTRIBUTE_MAX_WAVEFORM_SIZE attribute.

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 theniFgen_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:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

niFgen_CreateWaveformF64

ViStatus niFgen_CreateWaveformF64 (ViSession vi, ViConstString channelName, ViInt32 waveformSize, ViReal64[] waveformDataArray, ViInt32* waveformHandle);

Purpose

Creates an onboard waveform from binary F64 (floating point double) data for use in Arbitrary Waveform output mode or Arbitrary Sequence output mode. The waveformHandle returned can later be used for setting the active waveform, changing the data in the waveform, building sequences of waveforms, or deleting the waveform when it is no longer needed.

Note:   You must call the niFgen_ConfigureOutputMode function to set the outputMode parameter to NIFGEN_VAL_OUTPUT_ARB or NIFGEN_VAL_OUTPUT_SEQ before calling this function.

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the niFgen_init, niFgen_InitWithOptions, or niFgen_InitializeWithChannels functions and identifies a particular instrument session.
channelName ViConstString

Specifies the channel name for which you want to create the waveform.

Default Value: "0"

waveformSize ViInt32

Specifies the size of the arbitrary waveform that you want to create.

The size must meet the following restrictions:

- The size must be less than or equal to the maximum waveform size that the device allows.

- The size must be greater than or equal to the minimum waveform size that the device allows.

- The size must be an integer multiple of the device waveform quantum.

You can obtain these values from the maximumWaveformSize, minimumWaveformSize, and waveformQuantum parameters of the niFgen_QueryArbWfmCapabilities function.

Default Value: None

waveformDataArray ViReal64[]

Specifies the array of data you want to use for the new arbitrary waveform. The array must have at least as many elements as the value that you specify in waveformSize.

You must normalize the data points in the array to be between –1.00 and +1.00.

Default Value: None

Output
Name Type Description
waveformHandle ViInt32* The handle that identifies the new waveform. This handle is used later when referring to this waveform.

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 theniFgen_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:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

niFgen_CreateWaveformI16

ViStatus niFgen_CreateWaveformI16 (ViSession vi, ViConstString channelName, ViInt32 waveformSize, ViInt16[] waveformDataArray, ViInt32* waveformHandle);

Purpose

Creates an onboard waveform from binary 16-bit signed integer (I16) data for use in Arbitrary Waveform or Arbitrary Sequence output mode. The waveformHandle returned can later be used for setting the active waveform, changing the data in the waveform, building sequences of waveforms, or deleting the waveform when it is no longer needed.

Note:   You must call the niFgen_ConfigureOutputMode function to set the outputMode parameter to NIFGEN_VAL_OUTPUT_ARB or NIFGEN_VAL_OUTPUT_SEQ before calling this function.

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the niFgen_init, niFgen_InitWithOptions, or niFgen_InitializeWithChannels functions and identifies a particular instrument session.
channelName ViConstString

Specifies the channel name for which you want to create the waveform.

Default Value: "0"

waveformSize ViInt32

Specifies the size of the arbitrary waveform that you want to create.

The size must meet the following restrictions:

- The size must be less than or equal to the maximum waveform size that the device allows.

- The size must be greater than or equal to the minimum waveform size that the device allows.

- The size must be an integer multiple of the device waveform quantum.

You can obtain these values from the maximumWaveformSize, minimumWaveformSize, and waveformQuantum parameters of the niFgen_QueryArbWfmCapabilities function.


Default Value: None

waveformDataArray ViInt16[] Specify the array of data that you want to use for the new arbitrary waveform. The array must have at least as many elements as the value that you specify in the Waveform Size parameter.

You must normalize the data points in the array to be between -32768 and +32767.

Default Value: None
Output
Name Type Description
waveformHandle ViInt32* The handle that identifies the new waveform. This handle is used later when referring to this waveform.

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 theniFgen_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:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

niFgen_CreateWaveformComplexF64

ViStatus niFgen_CreateWaveformComplexF64 (ViSession vi, ViConstString channelName, ViInt32 numberofSamples, niFgen_ComplexF64[] waveformDataArray, ViInt32* waveformHandle);

Purpose

Creates an onboard waveform from complex double-precision floating-point (F64) data for use with the NIFGEN_ATTRIBUTE_OUTPUT_MODE attribute set to Arbitrary Waveform or Arbitrary Sequence output mode on devices with the NIFGEN_ATTRIBUTE_OUTPUT_ENABLED attribute set to VI_TRUE and the NIFGEN_ATTRIBUTE_OSP_DATA_PROCESSING_MODE attribute set to NIFGEN_VAL_OSP_COMPLEX. The waveformHandle returned by the function can be used later for setting the active waveform, changing the data in the waveform, building sequences of waveforms, or deleting the waveform when it is no longer needed.

Note:   You must call the niFgen_ConfigureOutputMode function to set the outputMode parameter to NIFGEN_VAL_OUTPUT_ARB or NIFGEN_VAL_OUTPUT_SEQ before calling this function.

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the niFgen_init, niFgen_InitWithOptions, or niFgen_InitializeWithChannels functions and identifies a particular instrument session.
channelName ViConstString

Specifies the channel name for which you want to create the waveform.

Default Value: "0"

numberofSamples ViInt32

Specifies the size of the arbitrary waveform that you want to create.

The size must meet the following restrictions:

- The size must be less than or equal to the maximum waveform size that the device allows.

- The size must be greater than or equal to the minimum waveform size that the device allows.

- The size must be an integer multiple of the device waveform quantum.

You can obtain these values from the maximumWaveformSize, minimumWaveformSize, and waveformQuantum parameters of the niFgen_QueryArbWfmCapabilities function.


Default Value: None

waveformDataArray ViReal64[]

Specifies the array of data you want to use for the new arbitrary waveform. The array must have at least as many elements as the value that you specify in waveformSize.

You must normalize the data points in the array to be between –1.00 and +1.00.

Default Value: None

Output
Name Type Description
waveformHandle ViInt32* The handle that identifies the new waveform. This handle is used later when referring to this waveform.

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 theniFgen_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:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

niFgen_CreateWaveformFromFileI16

ViStatus niFgen_CreateWaveformFromFileI16 (ViSession vi, ViConstString channelName, ViConstString filename, ViInt32 byteOrder, ViInt32* waveformHandle);

Purpose

Takes the binary 16-bit signed integer (I16) data from the specified file and creates an onboard waveform for use in Arbitrary Waveform or Arbitrary Sequence output mode. The waveformHandle returned by this function can later be used for setting the active waveform, changing the data in the waveform, building sequences of waveforms, or deleting the waveform when it is no longer needed.

Note:   The I16 data (values between –32768 and +32767) is assumed to represent –1 to +1 V. Use the NIFGEN_ATTRIBUTE_DIGITAL_GAIN attribute to generate different voltage outputs.

You must call the niFgen_ConfigureOutputMode function to set the outputMode parameter to NIFGEN_VAL_OUTPUT_ARB or NIFGEN_VAL_OUTPUT_SEQ before calling this function.

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the niFgen_init, niFgen_InitWithOptions, or niFgen_InitializeWithChannels functions and identifies a particular instrument session.
channelName ViConstString

Specifies the channel name for which you want to create the waveform.

Default Value: "0"

fileName ViConstString The full path and name of the file where the waveform data resides.
byteOrder ViInt32 Specifies the byte order of the data in the file.

Note:  Data written by most applications in Windows (including LabWindows™/CVI™) is in Little Endian format. Data written to a file from LabVIEW is in Big Endian format by default on all platforms. Big Endian and Little Endian refer to the way data is stored in memory, which can differ on different processors.

Default Value: NIFGEN_VAL_LITTLE_ENDIAN

Defined Values:

NIFGEN_VAL_LITTLE_ENDIAN Little Endian Data—The least significant bit is stored at the lowest address, followed by the other bits, in order of increasing significance.
NIFGEN_VAL_BIG_ENDIAN Big Endian Data—The most significant bit is stored at the lowest address, followed by the other bits, in order of decreasing significance.
Output
Name Type Description
waveformHandle ViInt32* The handle that identifies the new waveform. This handle is used later when referring to this waveform.

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 theniFgen_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:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

niFgen_CreateWaveformFromFileF64

ViStatus niFgen_CreateWaveformFromFileF64 (ViSession vi, ViConstString channelName, ViConstString filename, ViInt32 byteOrder, ViInt32* waveformHandle);

Purpose

This function takes the floating point double (F64) data from the specified file and creates an onboard waveform for use in Arbitrary Waveform or Arbitrary Sequence output mode. The waveformHandle returned by this function can later be used for setting the active waveform, changing the data in the waveform, building sequences of waveforms, or deleting the waveform when it is no longer needed.

Note:   The F64 data must be between –1.0 and +1.0 V. Use the NIFGEN_ATTRIBUTE_DIGITAL_GAIN attribute to generate different voltage outputs.

You must call the niFgen_ConfigureOutputMode function to set the outputMode parameter to NIFGEN_VAL_OUTPUT_ARB or NIFGEN_VAL_OUTPUT_SEQ before calling this function.

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the niFgen_init, niFgen_InitWithOptions, or niFgen_InitializeWithChannels functions and identifies a particular instrument session.
channelName ViConstString

Specifies the channel name for which you want to create the waveform.

Defined Value: "0"

Default Value: "0"

fileName ViConstString The full path and name of the file where the waveform data resides.
byteOrder ViInt32 Specifies the byte order of the data in the file.

Note:  Data written by most applications in Windows (including LabWindows™/CVI™) is in Little Endian format. Data written to a file from LabVIEW is in Big Endian format by default on all platforms. Big Endian and Little Endian refer to the way data is stored in memory, which can differ on different processors.

Default Value: NIFGEN_VAL_LITTLE_ENDIAN

Defined Values

NIFGEN_VAL_LITTLE_ENDIAN Little Endian Data—The least significant bit is stored at the lowest address, followed by the other bits, in order of increasing significance.
NIFGEN_VAL_BIG_ENDIAN Big Endian Data—The most significant bit is stored at the lowest address, followed by the other bits, in order of decreasing significance.
Output
Name Type Description
waveformHandle ViInt32* The handle that identifies the new waveform. This handle is used later when referring to this waveform.

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 theniFgen_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:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

niFgen_CreateWaveformFromFileHWS

ViStatus niFgen_CreateWaveformFromFileHWS (ViSession vi, ViConstString channelName, ViConstString filename, ViBoolean useRateFromWaveform, ViBoolean useGain&OffsetFromWaveform, ViInt32* waveformHandle);

Purpose

Takes the waveform data from the specified HWS (Hierarchical Waveform Storage) file and creates an onboard waveform for use in Arbitrary Waveform or Arbitrary Sequence output mode. The waveformHandle returned by this function can be used later for setting the active waveform, changing the data in the waveform, building sequences of waveforms, or deleting the waveform when it is no longer needed.

When the Analog Waveform Editor saves data in an HWS file, it also stores the rate, gain, and offset with the data. If the useRateFromWaveform and useGain&OffsetFromWaveform parameters are set to VI_TRUE, this function also sets those properties.

Note:  If you choose to have this function set the gain and offset properties for you, you should not use the niFgen_ConfigureArbWaveform or niFgen_ConfigureArbSequence functions, as they also set the gain and offset, thereby overriding the values set by this function. Instead, use the NIFGEN_ATTRIBUTE_ARB_WAVEFORM_HANDLE or NIFGEN_ATTRIBUTE_ARB_SEQUENCE_HANDLE attributes.

HWS files may contain I16 or DBL data, depending on how it was saved. This function automatically adapts to either data type. If the file contains DBL data, it must be between –1.0 and +1.0. Check the "Scale Data to +/– 1V" option in the Analog Waveform Editor to ensure your data is between –1.0 and +1.0.

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the niFgen_init, niFgen_InitWithOptions, or niFgen_InitializeWithChannels functions and identifies a particular instrument session.
channelName ViConstString

Specifies the channel name for which you want to create the waveform.

Defined Value: "0"

Default Value: "0"

fileName ViConstString The full path and name of the file where the waveform data resides.
useRateFromWaveform ViBoolean

If you set this parameter input to VI_TRUE and if onboard signal processing (OSP) is enabled, the rate from the waveform is interpreted as the data rate, and FGEN sets the data rate attribute for you. In all other cases, it is interpreted as the sample rate, and FGEN sets the sample rate attribute for you.

Default Value: VI_TRUE

Defined Values

VI_TRUE Use rate from waveform.
VI_FALSE Do not use rate from waveform.



Name Type Description
useGain&OffsetFromWaveform ViBoolean

If this input is set to VI_TRUE, NI-FGEN retrieves the gain and offset values from the specified HWS file and applies them to the NI-FGEN driver.

Default Value: VI_TRUE

Defined Values:

VI_TRUE Use gain and offset from waveform.
VI_FALSE Do not use gain and offset from waveform.
Output
Name Type Description
waveformHandle ViInt32* The handle that identifies the new waveform. This handle is used later when referring to this waveform.

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 theniFgen_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:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

niFgen_ConfigureArbWaveform

ViStatus niFgen_ConfigureArbWaveform (ViSession vi, ViConstString channelName, ViInt32 waveformHandle, ViReal64 gain, ViReal64 offset);

Purpose

Configures the attributes of the signal generator that affect arbitrary waveform generation. Sets the NIFGEN_ATTRIBUTE_ARB_WAVEFORM_HANDLE, NIFGEN_ATTRIBUTE_ARB_GAIN, and NIFGEN_ATTRIBUTE_ARB_OFFSET attributes.

Note:  The signal generator must not be in the Generating state when you call this function.

You must call the niFgen_ConfigureOutputMode function to set the outputMode parameter to NIFGEN_VAL_OUTPUT_ARB before calling this function.

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the niFgen_init, niFgen_InitWithOptions, or niFgen_InitializeWithChannels functions and identifies a particular instrument session.
channelName ViConstString

Specifies the channel name for which you want to configure an arbitrary waveform.

Default Value: "0"

waveformHandle ViInt32

Specifies the handle of the arbitrary waveform you want the signal generator to produce. NI-FGEN sets the NIFGEN_ATTRIBUTE_ARB_WAVEFORM_HANDLE attribute to this value. You can create an arbitrary waveform using one of the following niFgen Create Waveform functions:

- niFgen_CreateWaveformF64

- niFgen_CreateWaveformI16

- niFgen_CreateWaveformFromFileI16

- niFgen_CreateWaveformFromFileF64

- niFgen_CreateWaveformFromFileHWS

These functions return a handle that you use to identify the waveform.

Default Value: None

gain ViReal64

Specifies the factor by which the signal generator scales the arbitrary waveforms in the sequence. When you create an arbitrary waveform, you must first normalize the data points to a range of –1.00 to +1.00. You can use this parameter to scale the waveform to other ranges. The gain is applied before the offset is added.

For example, to configure the output signal to range from –2.00 to +2.00 V, set gain to 2.00.

Units: unitless

Default Value: None

offset ViReal64

Specifies the value the signal generator adds to the arbitrary waveform data. When you create arbitrary waveforms, you must first normalize the data points to a range of –1.00 to +1.00 V. You can use this parameter to shift the range of the arbitrary waveform. NI-FGEN sets the NIFGEN_ATTRIBUTE_ARB_OFFSET attribute to this value.

For example, to configure the output signal to range from 0.00 to 2.00 V instead of –1.00 to 1.00 V, set the offset to 1.00.

Units: volts

Default Value: None

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 theniFgen_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:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

niFgen_ClearArbWaveform

ViStatus niFgen_ClearArbWaveform (ViSession vi, ViInt32 waveformHandle);

Purpose

Removes a previously created arbitrary waveform from the signal generator memory and invalidates the waveform handle.

Note:   The signal generator must not be in the Generating state when you call this function.

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the niFgen_init, niFgen_InitWithOptions, or niFgen_InitializeWithChannels functions and identifies a particular instrument session.
waveformHandle ViInt32

Specifies the handle of the arbitrary waveform that you want the signal generator to remove.

You can create multiple arbitrary waveforms using one of the following niFgen Create Waveform functions:

- niFgen_CreateWaveformF64

- niFgen_CreateWaveformI16

- niFgen_CreateWaveformFromFileI16

- niFgen_CreateWaveformFromFileF64

- niFgen_CreateWaveformFromFileHWS

Defined Value:

NIFGEN_VAL_ALL_WAVEFORMS — Remove all waveforms from the signal generator.

Default Value: None

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 theniFgen_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:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

Table of Contents

Internal Development

Creating and Setting Up a gRPC Server

Server Security Support

Creating a gRPC Client

gRPC Client Examples

Session Utilities API Reference

Driver Documentation

gRPC API Differences From C API

Sharing Driver Sessions Between Clients

C API Docs
NI-DAQmx
NI-DCPOWER
NI-DIGITAL PATTERN DRIVER
NI-DMM
NI-FGEN
NI-FPGA
NI-RFmx Bluetooth
NI-RFmx NR
NI-RFmx WCDMA
NI-RFmx GSM
NI-RFmx CDMA2k
NI-RFmx Instr
NI-RFmx LTE
NI-RFmx SpecAn
NI-RFmx TD-SCDMA
NI-RFmx WLAN
NI-RFSA
NI-RFSG
NI-SCOPE
NI-SWITCH
NI-TCLK
NI-XNET
Clone this wiki locally