NI FGEN Configuration Functions - ni/grpc-device GitHub Wiki
- niFgen_ConfigureOperationMode
- niFgen_ConfigureOutputMode
- niFgen_ConfigureChannels
- niFgen_ConfigureOutputEnabled
- niFgen_ConfigureOutputImpedance
- niFgen_EnableAnalogFilter
- niFgen_DisableAnalogFilter
- niFgen_EnableDigitalFilter
- niFgen_DisableDigitalFilter
- niFgen_EnableDigitalPatterning
- niFgen_DisableDigitalPatterning
ViStatus niFgen_ConfigureOperationMode (ViSession vi, ViConstString channelName, ViInt32 operationMode);
Determines how the signal generator produces waveforms. NI signal generators support only Continuous operation mode. To control trigger mode, use the niFgen_ConfigureTriggerMode function.
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 operation mode. Defined Value: "0" |
operationMode | ViInt32 |
Specifies the operation mode you want the signal generator to use. NI-FGEN sets the NIFGEN_ATTRIBUTE_OPERATION_MODE attribute to this value. NI-FGEN supports only one value. Defined Value: NIFGEN_VAL_OPERATE_CONTINUOUS |
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: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
ViStatus niFgen_ConfigureOutputMode (ViSession vi, ViInt32 outputMode);
Configures the output mode of the signal generator. The output mode determines how the signal generator produces waveforms. For example, you can select to generate a standard waveform, an arbitrary waveform, or a sequence of arbitrary waveforms.
Note: The signal generator must not be in the Generating state when you call this function.
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. |
outputMode | ViInt32 | Specifies the output mode that you want the signal generator to use. The value you specify determines which functions and attributes you can use to configure the waveform the signal generator produces. Refer to the NIFGEN_ATTRIBUTE_OUTPUT_MODE attribute for more information about setting this parameter. Default Value: NIFGEN_VAL_OUTPUT_FUNC Defined Values |
NIFGEN_VAL_OUTPUT_FUNC | Standard Function mode—Generates standard function waveforms such as sine, square, triangle, and so on. |
---|---|
NIFGEN_VAL_OUTPUT_FREQ_LIST | Frequency List mode—Generates a standard function using a list of frequencies you define. |
NIFGEN_VAL_OUTPUT_ARB | Arbitrary waveform mode—Generates waveforms from user-created/provided waveform arrays of numeric data. |
NIFGEN_VAL_OUTPUT_SEQ | Arbitrary sequence mode—Generates downloaded waveforms in an order your specify. |
NIFGEN_VAL_OUTPUT_SCRIPT | Script mode—Allows you to use scripting to link and loop multiple waveforms in complex combinations. |
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: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
ViStatus niFgen_ConfigureChannels (ViSession vi, ViConstString channels);
Configures the channels to use with the instrument specified in the vi parameter. If you call this function, you must call it immediately after initializing your session and before configuring attributes or writing data.
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. |
channels | ViConstString | Specifies the channel on which all subsequent channel-based attributes in the session are set. Valid values are non-negative integers. For example, 0 is the only valid value on devices with one channel, while devices with two channels support values of 0 and 1. You can specify more than one channel by inserting commas between values (for example, 0,1). |
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: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
ViStatus niFgen_ConfigureOutputEnabled (ViSession vi, ViConstString channelName, ViBoolean enabled);
Configures the signal generator to generate a signal at the channel output connector.
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 enable the output. Default Value: "0" |
enabled | ViBoolean |
Specifies whether you want to enable or disable the output. NI-FGEN uses this value to set the NIFGEN_ATTRIBUTE_OUTPUT_ENABLED attribute. Default Value: VI_TRUE Defined Values |
VI_TRUE | Enable the output. |
---|---|
VI_FALSE | Disable the output. |
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: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
ViStatus niFgen_ConfigureOutputImpedance (ViSession vi, ViConstString channelName, ViReal64 impedance);
Configures the output impedance for the channel you specify.
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 set the output impedance. Default Value: "0" |
impedance | ViReal64 |
Specifies the impedance value that you want the signal generator to use. NI-FGEN sets the NIFGEN_ATTRIBUTE_OUTPUT_IMPEDANCE attribute to this value. Units: Ω (ohms) Default Value: NIFGEN_VAL_50_OHMS Defined Values: |
NIFGEN_VAL_50_OHMS | Specifies that 50 Ω of impedance is used |
---|---|
NIFGEN_VAL_75_OHMS | Specifies that 75 Ω of impedance is used |
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: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
ViStatus niFgen_EnableAnalogFilter (ViSession vi, ViConstString channelName, ViReal64 filterCorrectionFrequency);
Configures the analog filter for the device. This function sets the NIFGEN_ATTRIBUTE_ANALOG_FILTER_ENABLED attribute to VI_TRUE. This setting can be applied in Arbitrary Waveform, Arbitrary Sequence, or Script output modes. You also can use this setting in Standard Function and Frequency List output modes for user-defined waveforms.
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 enable the analog filter. Default Value: "0" |
filterCorrectionFrequency | ViReal64 |
Specifies the filter correction frequency of the analog filter. On the NI 5411 and NI 5431, NI-FGEN adjusts signal amplitude to compensate for the filter attenuation at that frequency. To disable amplitude correction, set filterCorrectionFrequency to 0. For Standard Function output mode, filterCorrectionFrequency typically should be set to the same value as the frequency of the standard waveform. Units: hertz Default Value: 0 |
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: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
ViStatus niFgen_DisableAnalogFilter (ViSession vi, ViConstString channelName);
Disables the analog filter. This function sets the NIFGEN_ATTRIBUTE_ANALOG_FILTER_ENABLED attribute to VI_FALSE. This setting can be applied in Arbitrary Waveform, Arbitrary Sequence, or Script output modes. You also can use this setting in Standard Function and Frequency List output modes for user-defined waveforms.
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 disable the analog filter. Default Value: "0" |
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: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
ViStatus niFgen_EnableDigitalFilter (ViSession vi, ViConstString channelName);
Enables the digital filter by setting the NIFGEN_ATTRIBUTE_DIGITAL_FILTER_ENABLED attribute to VI_TRUE. This setting can be applied in Arbitrary Waveform, Arbitrary Sequence, or Script output modes. You also can use this setting in Standard Function and Frequency List output modes for user-defined waveforms.
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 enable the digital filter. Default Value: "0" |
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: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
ViStatus niFgen_DisableDigitalFilter (ViSession vi, ViConstString channelName);
Disables the digital filter. This function sets the NIFGEN_ATTRIBUTE_DIGITAL_FILTER_ENABLED attribute to VI_FALSE. This setting can be applied in Arbitrary Waveform, Arbitrary Sequence, or Script output modes. You also can use this setting in Standard Function and Frequency List output modes for user-defined waveforms.
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 disable the digital filter. Default Value: "0" |
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: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
ViStatus niFgen_EnableDigitalPatterning (ViSession vi, ViConstString channelName);
Enables digital pattern output on the signal generator. This function sets the NIFGEN_ATTRIBUTE_DIGITAL_PATTERN_ENABLED attribute to VI_TRUE.
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 enable the digital pattern output. Default Value: "0" |
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: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
ViStatus niFgen_DisableDigitalPatterning (ViSession vi, ViConstString channelName);
Disables digital pattern output on the signal generator. This function sets the NIFGEN_ATTRIBUTE_DIGITAL_PATTERN_ENABLED attribute to VI_FALSE.
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 disable digital pattern output. Default Value: "0" |
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: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |