NI FGEN Attribute Functions - ni/grpc-device GitHub Wiki
- niFgen_SetAttributeViInt32
- niFgen_SetAttributeViInt64
- niFgen_SetAttributeViReal64
- niFgen_SetAttributeViString
- niFgen_SetAttributeViBoolean
- niFgen_SetAttributeViSession
- niFgen_GetAttributeViInt32
- niFgen_GetAttributeViInt64
- niFgen_GetAttributeViReal64
- niFgen_GetAttributeViString
- niFgen_GetAttributeViBoolean
- niFgen_GetAttributeViSession
- niFgen_CheckAttributeViInt32
- niFgen_CheckAttributeViInt64
- niFgen_CheckAttributeViReal64
- niFgen_CheckAttributeViString
- niFgen_CheckAttributeViBoolean
- niFgen_CheckAttributeViSession
- niFgen_ResetAttribute
- niFgen_ImportAttributeConfigurationFile
- niFgen_ExportAttributeConfigurationFile
- niFgen_ImportAttributeConfigurationBuffer
- niFgen_ExportAttributeConfigurationBuffer
ViStatus niFgen_SetAttributeViInt32 (ViSession vi, ViConstString channelName, ViAttr attributeID, ViInt32 attributeValue);
Sets the value of a ViInt32 attribute.
This is a low-level function that you can use to set the values of instrument-specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid or is different than the value you specify.
NI-FGEN contains high-level functions that set most of the instrument attributes. NI recommends that you use the high-level driver functions as much as possible. They handle order dependencies and multithread locking for you. In addition, they perform status checking only after setting all of the attributes. In contrast, when you set multiple attributes using the Set Attribute functions, the functions check the instrument status after each call.
Also, when state caching is enabled, the high-level functions that configure multiple attributes perform instrument I/O only for the attributes whose value you change. Thus, you can safely call the high-level functions without the penalty of redundant instrument I/O.
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 name of the channel on which to check the attribute value if the attribute is channel-based. If the attribute is not channel-based, then pass VI_NULL or "" (empty string). Default Value: "" (empty string) |
attributeID | ViAttr | Specifies the ID of an attribute. |
attributeValue | ViInt32 | Specifies the value to which you want to set the attribute.
Note: Some of the values might not be valid depending on the current settings of the instrument session. Default Value: None |
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_SetAttributeViInt64 (ViSession vi, ViConstString channelName, ViAttr attributeID, ViInt32 attributeValue);
Sets the value of a ViInt64 attribute.
This is a low-level function that you can use to set the values of instrument-specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid or is different than the value you specify.
NI-FGEN contains high-level functions that set most of the instrument attributes. NI recommends that you use the high-level driver functions as much as possible. They handle order dependencies and multithread locking for you. In addition, they perform status checking only after setting all of the attributes. In contrast, when you set multiple attributes using the Set Attribute functions, the functions check the instrument status after each call.
Also, when state caching is enabled, the high-level functions that configure multiple attributes perform instrument I/O only for the attributes whose value you change. Thus, you can safely call the high-level functions without the penalty of redundant instrument I/O.
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 name of the channel on which to check the attribute value if the attribute is channel-based. If the attribute is not channel-based, then pass VI_NULL or "" (empty string). Default Value: "" (empty string) |
attributeID | ViAttr | Specifies the ID of an attribute. |
attributeValue | ViInt64 | Specifies the value to which you want to set the attribute.
Note: Some of the values might not be valid depending on the current settings of the instrument session. Default Value: None |
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_SetAttributeViReal64 (ViSession vi, ViConstString channelName, ViAttr attributeID, ViReal64 attributeValue);
Sets the value of a ViReal64 attribute.
This is a low-level function that you can use to set the values of instrument-specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid or is different than the value you specify.
NI-FGEN contains high-level functions that set most of the instrument attributes. NI recommends that you use the high-level driver functions as much as possible. They handle order dependencies and multithread locking for you. In addition, they perform status checking only after setting all of the attributes. In contrast, when you set multiple attributes using the Set Attribute functions, the functions check the instrument status after each call.
Also, when state caching is enabled, the high-level functions that configure multiple attributes perform instrument I/O only for the attributes whose value you change. Thus, you can safely call the high-level functions without the penalty of redundant instrument I/O.
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 name of the channel on which to check the attribute value if the attribute is channel-based. If the attribute is not channel-based, then pass VI_NULL or "" (empty string). Default Value: "" (empty string) |
attributeID | ViAttr | Specifies the ID of an attribute. |
attributeValue | ViReal64 | Specifies the value to which you want to set the attribute.
Note: Some of the values might not be valid depending on the current settings of the instrument session. Default Value: None |
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_SetAttributeViString (ViSession vi, ViConstString channelName, ViAttr attributeID, ViConstString attributeValue);
Sets the value of a ViString attribute.
This is a low-level function that you can use to set the values of instrument-specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid or is different than the value you specify.
NI-FGEN contains high-level functions that set most of the instrument attributes. NI recommends that you use the high-level driver functions as much as possible. They handle order dependencies and multithread locking for you. In addition, they perform status checking only after setting all of the attributes. In contrast, when you set multiple attributes using the Set Attribute functions, the functions check the instrument status after each call.
Also, when state caching is enabled, the high-level functions that configure multiple attributes perform instrument I/O only for the attributes whose value you change. Thus, you can safely call the high-level functions without the penalty of redundant instrument I/O.
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 name of the channel on which to check the attribute value if the attribute is channel-based. If the attribute is not channel-based, then pass VI_NULL or "" (empty string). Default Value: "" (empty string) |
attributeID | ViAttr | Specifies the ID of an attribute. |
attributeValue | ViString | Specifies the value to which you want to set the attribute.
Note: Some of the values might not be valid depending on the current settings of the instrument session. Default Value: None |
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_SetAttributeViBoolean (ViSession vi, ViConstString channelName, ViAttr attributeID, ViBoolean attributeValue);
Sets the value of a ViBoolean attribute.
This is a low-level function that you can use to set the values of instrument-specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid or is different than the value you specify.
NI-FGEN contains high-level functions that set most of the instrument attributes. NI recommends that you use the high-level driver functions as much as possible. They handle order dependencies and multithread locking for you. In addition, they perform status checking only after setting all of the attributes. In contrast, when you set multiple attributes using the Set Attribute functions, the functions check the instrument status after each call.
Also, when state caching is enabled, the high-level functions that configure multiple attributes perform instrument I/O only for the attributes whose value you change. Thus, you can safely call the high-level functions without the penalty of redundant instrument I/O.
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 name of the channel on which to check the attribute value if the attribute is channel-based. If the attribute is not channel-based, then pass VI_NULL or "" (empty string). Default Value: "" (empty string) |
attributeID | ViAttr | Specifies the ID of an attribute. |
attributeValue | ViBoolean | Specifies the value to which you want to set the attribute.
Note: Some of the values might not be valid depending on the current settings of the instrument session. Default Value: None |
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_SetAttributeViSession (ViSession vi, ViConstString channelName, ViAttr attributeID, ViSession attributeValue);
Sets the value of a ViSession attribute.
This is a low-level function that you can use to set the values of instrument-specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid or is different than the value you specify.
NI-FGEN contains high-level functions that set most of the instrument attributes. It is best to use the high-level driver functions as much as possible. They handle order dependencies and multithread locking for you. In addition, they perform status checking only after setting all of the attributes. In contrast, when you set multiple attributes using the Set Attribute functions, the functions check the instrument status after each call.
Also, when state caching is enabled, the high-level functions that configure multiple attributes perform instrument I/O only for the attributes whose value you change. Thus, you can safely call the high-level functions without the penalty of redundant instrument I/O.
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 name of the channel on which to check the attribute value if the attribute is channel-based. If the attribute is not channel-based, then pass VI_NULL or an empty string (""). Default Value: "" (empty string) |
attributeID | ViAttr | Specifies the ID of an attribute. |
attributeValue | ViSession | Specifies the value to which you want to set the attribute.
Note: Some of the values might not be valid depending on the current settings of the instrument session. Default Value: None |
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_GetAttributeViInt32 (ViSession vi, ViConstString channelName, ViAttr attributeID, ViInt32* attributeValue);
Queries the value of a ViInt32 attribute. You can use this function to get the values of instrument-specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid.
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 name of the channel on which to check the attribute value if the attribute is channel-based. If the attribute is not channel-based, then pass VI_NULL or an empty string (""). Default Value: "" (empty string) |
attributeID | ViAttr | Specifies the ID of an attribute. |
Output | ||
Name | Type | Description |
attributeValue | ViInt32* | Returns the current value of the attribute. Pass the address of a ViInt32 variable. |
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_GetAttributeViInt64 (ViSession vi, ViConstString channelName, ViAttr attributeID, ViInt64* attributeValue);
Queries the value of a ViInt64 attribute. You can use this function to get the values of instrument-specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid.
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 name of the channel on which to check the attribute value if the attribute is channel-based. If the attribute is not channel-based, then pass VI_NULL or an empty string (""). Default Value: "" (empty string) |
attributeID | ViAttr | Specifies the ID of an attribute. |
Output | ||
Name | Type | Description |
attributeValue | ViInt64* | Returns the current value of the attribute. Pass the address of a ViInt64 variable. |
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_GetAttributeViReal64 (ViSession vi, ViConstString channelName, ViAttr attributeID, ViReal64* attributeValue);
Queries the value of a ViReal64 attribute.
You can use this function to get the values of instrument-specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid.
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 name of the channel on which to check the attribute value if the attribute is channel-based. If the attribute is not channel-based, then pass VI_NULL or an empty string (""). Default Value: "" (empty string) |
attributeID | ViAttr | Specifies the ID of an attribute. |
Output | ||
Name | Type | Description |
attributeValue | ViReal64* | Returns the current value of the attribute. Pass the address of a ViReal64 variable. |
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_GetAttributeViString (ViSession vi, ViConstString channelName, ViAttr attributeID, ViInt32 arraySize, ViChar[] attributeValue);
Queries the value of a ViString attribute.
You can use this function to get the values of instrument-specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid.
You must provide a ViChar array to serve as a buffer for the value. You pass the number of bytes in the buffer as the arraySize parameter. If the current value of the attribute, including the terminating NUL byte, is larger than the size you indicate in the arraySize parameter, the function copies arraySize – 1 bytes into the buffer, places an ASCII NUL byte at the end of the buffer, and returns the array size you must pass to get the entire value. For example, if the value is 123456 and arraySize is 4, the function places 123 into the buffer and returns 7.
If you want to call this function just to get the required array size, you can pass 0 for arraySize and VI_NULL for the attributeValue buffer.
If you want the function to fill in the buffer regardless of the number of bytes in the value, pass a negative number for the arraySize parameter.
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 name of the channel on which to check the attribute value if the attribute is channel-based. If the attribute is not channel-based, then pass VI_NULL or an empty string (""). Default Value: "" (empty string) |
attributeID | ViAttr | Specifies the ID of an attribute. |
arraySize | ViInt32 |
Specifies the number of bytes in the ViChar array you specify for the attributeValue parameter. If the current value of the attribute, including the terminating NUL byte, contains more bytes than you indicate in this parameter, the function copies arraySize – 1 bytes into the buffer, places an ASCII NUL byte at the end of the buffer, and returns the array size you must pass to get the entire value. For example, if the value is 123456 and arraySize is 4, the function places 123 into the buffer and returns 7. If you pass a negative number, the function copies the value to the buffer regardless of the number of bytes in the value. If you pass 0, you can pass VI_NULL for the attributeValue buffer parameter. |
Output | ||
Name | Type | Description |
attributeValue | ViChar[] |
The buffer in which the function returns the current value of the attribute. The buffer must be a ViChar data type and have at least as many bytes as indicated in the arraySize parameter. If the current value of the attribute, including the terminating NUL byte, contains more bytes than you indicate in this parameter, the function copies arraySize – 1 bytes into the buffer, places an ASCII NUL byte at the end of the buffer, and returns the array size you must pass to get the entire value. For example, if the value is 123456 and arraySize is 4, the function places 123 into the buffer and returns 7. If you specify 0 for the arraySize parameter, you can pass VI_NULL for this parameter. |
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 niFgen_error_message. To obtain additional information about the error condition, call niFgen_GetError. To clear the error information from NI-FGEN, call niFgen_ClearError. The general meaning of the status code is as follows: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
ViStatus niFgen_GetAttributeViBoolean (ViSession vi, ViConstString channelName, ViAttr attributeID, ViBoolean* attributeValue);
Queries the value of a ViBoolean attribute.
You can use this function to get the values of instrument-specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid.
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 name of the channel on which to check the attribute value if the attribute is channel-based. If the attribute is not channel-based, then pass VI_NULL or an empty string (""). Default Value: "" (empty string) |
attributeID | ViAttr | Specifies the ID of an attribute. |
Output | ||
Name | Type | Description |
attributeValue | ViBoolean* | Returns the current value of the attribute. Pass the address of a ViBoolean variable. |
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_GetAttributeViSession (ViSession vi, ViConstString channelName, ViAttr attributeID, ViSession* attributeValue);
Queries the value of a ViSession attribute.
You can use this function to get the values of instrument-specific attributes and inherent IVI attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
- State caching is disabled for the entire session or for the particular attribute.
- State caching is enabled and the currently cached value is invalid.
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 name of the channel on which to check the attribute value if the attribute is channel-based. If the attribute is not channel-based, then pass VI_NULL or an empty string (""). Default Value: "" (empty string) |
attributeID | ViAttr | Specifies the ID of an attribute. |
Output | ||
Name | Type | Description |
attributeValue | ViSession* | Returns the current value of the attribute. Pass the address of a ViSession variable. |
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_CheckAttributeViInt32 (ViSession vi, ViConstString channelName, ViAttr attributeID, ViInt32 attributeValue);
Checks the validity of a value you specify for a ViInt32 attribute.
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 name of the channel on which to check the attribute value if the attribute is channel-based. If the attribute is not channel-based, then pass VI_NULL or an empty string (""). Default Value: "" (empty string) |
attributeID | ViAttr | Specifies the ID of an attribute. |
attributeValue | ViInt32 | Specifies the value to which you want to set the attribute.
Note: Some of the values might not be valid depending on the current settings of the instrument session. Default Value: None |
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_CheckAttributeViInt64 (ViSession vi, ViConstString channelName, ViAttr attributeID, ViInt64 attributeValue);
Checks the validity of a value you specify for a ViInt64 attribute.
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 name of the channel on which to check the attribute value if the attribute is channel-based. If the attribute is not channel-based, then pass VI_NULL or an empty string (""). Default Value: "" (empty string) |
attributeID | ViAttr | Specifies the ID of an attribute. |
attributeValue | ViInt64 | Specifies the value to which you want to set the attribute.
Note: Some of the values might not be valid depending on the current settings of the instrument session. Default Value: None |
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_CheckAttributeViReal64 (ViSession vi, ViConstString channelName, ViAttr attributeID, ViReal64 attributeValue);
Checks the validity of a value you specify for a ViReal64 attribute.
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 name of the channel on which to check the attribute value if the attribute is channel-based. If the attribute is not channel-based, then pass VI_NULL or an empty string (""). Default Value: "" (empty string) |
attributeID | ViAttr | Specifies the ID of an attribute. |
attributeValue | ViReal64 | Specifies the value to which you want to set the attribute.
Note: Some of the values might not be valid depending on the current settings of the instrument session. Default Value: None |
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_CheckAttributeViString (ViSession vi, ViConstString channelName, ViAttr attributeID, ViConstString attributeValue);
Checks the validity of a value you specify for a ViString attribute.
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 name of the channel on which to check the attribute value if the attribute is channel-based. If the attribute is not channel-based, then pass VI_NULL or an empty string (""). Default Value: "" (empty string) |
attributeID | ViAttr | Specifies the ID of an attribute. |
attributeValue | ViConstString | Specifies the value which you want to verify as a valid value for the attribute.
Note: Some of the values might not be valid depending on the current settings of the instrument session. Default Value: None |
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_CheckAttributeViBoolean (ViSession vi, ViConstString channelName, ViAttr attributeID, ViBoolean attributeValue);
Checks the validity of a value you specify for a ViBoolean attribute.
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 name of the channel on which to check the attribute value if the attribute is channel-based. If the attribute is not channel-based, then pass VI_NULL or an empty string (""). Default Value: "" (empty string) |
attributeID | ViAttr | Specifies the ID of an attribute. |
attributeValue | ViBoolean | Specifies the value to which you want to set the attribute. < Note: Some of the values might not be valid depending on the current settings of the instrument session. Default Value: None |
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_CheckAttributeViSession (ViSession vi, ViConstString channelName, ViAttr attributeID, ViSession attributeValue);
Checks the validity of a value you specify for a ViSession attribute.
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 name of the channel on which to check the attribute value if the attribute is channel-based. If the attribute is not channel-based, then pass VI_NULL or an empty string (""). Default Value: "" (empty string) |
attributeID | ViAttr | Specifies the ID of an attribute. |
attributeValue | ViSession | Specifies the value to which you want to set the attribute.
Note: Some of the values might not be valid depending on the current settings of the instrument session. Default Value: None |
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_ResetAttribute (ViSession vi, ViConstString channelName, ViAttr attributeID);
Resets the attribute to its default value.
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 name of the channel on which to check the attribute value if the attribute is channel-based. If the attribute is not channel-based, then pass VI_NULL or an empty string (""). Default Value: "" (empty string) |
attributeID | ViAttr | Specifies the ID of an attribute. |
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_ImportAttributeConfigurationFile (ViSession Instrument_Handle, ViConstString File_Path);
Imports a configuration to the session from the specified file.
You can export and import supported configurations only between NIFGEN 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 NIFGEN 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.
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. |
File_Path | ViConstString | The absolute path to the file that contains the configuration to import. If you specify an empty or relative path, this function returns an error. Default File Extension: .nifgenconfig |
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_ExportAttributeConfigurationBuffer (ViSession Instrument_Handle, ViInt32 Size, ViAddr Configuration);
Exports a session configuration to a buffer.
You can export and import supported configurations only betwen NIFGEN 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 NIFGEN 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_ConfigureOutputModefunction. 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.
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. |
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_ImportAttributeConfigurationBuffer (ViSession Instrument_Handle, ViInt32 Size, ViAddr Configuration);
Imports a configuration to the session from the specified 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 NIFGEN 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 NIFGEN 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.
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 that contains the configuration to import. |
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_ExportAttributeConfigurationBuffer (ViSession Instrument_Handle, ViInt32 Size, ViAddr Configuration);
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 NIFGEN 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 NIFGEN 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.
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 that contains the configuration to import. |
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 |