Skip to content

NI DMM Values And Attribute Functions

ni-siray edited this page Apr 27, 2021 · 2 revisions

Values And Attribute Functions

niDMM_GetAutoRangeValue

ViStatus = niDMM_GetAutoRangeValue(ViSession Instrument_Handle, ViReal64 *Actual_Range)

Purpose

Returns the Actual_Range that the DMM is using, even when Auto Range is off.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Output
Name Type Description
Actual_Range ViReal64* Indicates the Actual_Range the DMM is using. Returns the value of the NIDMM_ATTR_AUTO_RANGE_VALUE attribute. The units of the returned value depend on the function.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_GetApertureTimeInfo

ViStatus = niDMM_GetApertureTimeInfo(ViSession Instrument_Handle, ViReal64 *Aperture_Time, ViInt32 *Aperture_Time_Units)

Purpose

Returns the DMM Aperture_Time and Aperture_Time_Units.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Output
Name Type Description
Aperture_Time ViReal64* Specifies the amount of time the DMM digitizes the input signal for a single measurement. This parameter does not include settling time. Returns the value of the NIDMM_ATTR_APERTURE_TIME attribute. The units of this attribute depend on the value of the NIDMM_ATTR_APERTURE_TIME_UNITS within the minimum and maximum ranges is allowed on the NI 4070/4071/4072.

On the NI 4065 the minimum aperture time is 333 µs, and the maximum aperture time is 78.2 s. If setting the number of averages directly, the total measurement time is aperture time X the number of averages, which must be less than 72.8 s. The aperture times allowed are 333 µs, 667 µs, or multiples of 1.11 ms—for example 1.11 ms, 2.22 ms, 3.33 ms, and so on. If you set an aperture time other than 333 µs, 667 µs, or multiples of 1.11 ms, the value will be coerced up to the next supported aperture time.

On the NI 4060, when the powerline frequency is 60, the PLCs allowed are 1 PLC, 6 PLC, 12 PLC, and 120 PLC. When the powerline frequency is 50, the PLCs allowed are 1 PLC, 5 PLC, 10 PLC, and 100 PLC.
Aperture_Time_Units ViInt32* Indicates the units of aperture time as powerline cycles (PLCs) or seconds. Returns the value of the NIDMM_ATTR_APERTURE_TIME_UNITS attribute.
NIDMM_VAL_SECONDS 0 Seconds
NIDMM_VAL_POWER_LINE_CYCLES 1 Powerline Cycles

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_GetMeasurementPeriod

ViStatus = niDMM_GetMeasurementPeriod(ViSession Instrument_Handle, ViReal64 *Period)

Purpose

Returns the measurement Period, which is the amount of time it takes to complete one measurement with the current configuration. Use this function right before you begin acquiring data—after you have completely configured the measurement and after all configuration functions have been called.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Output
Name Type Description
Period ViReal64*

Returns the number of seconds it takes to make one measurement.

The first measurement in a multipoint acquisition requires additional settling time. This function does not include this additional time or any NIDMM_ATTR_TRIGGER_DELAY associated with the first measurement. Time required for internal measurements, such as NIDMM_ATTR_AUTO_ZERO, is included.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_SetAttributeViBoolean

ViStatus = niDMM_SetAttributeViBoolean(ViSession Instrument_Handle, ViConstString Channel_Name, ViAttr Attribute_ID, ViBoolean Attribute_Value)

Purpose

This function 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.

This instrument driver 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 SetAttribute 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.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Channel_Name ViConstString

This parameter is ignored. National Instruments DMMs do not support channel names since they only have a single channel. This parameter is included in order to support interchangeability and upgradability to multiple channel DMMs.

The default value is " " (an empty string).

Attribute_ID ViAttr Pass the ID of an attribute.
Attribute_Value ViBoolean Pass the value that you want to set the attribute to.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_SetAttributeViInt32

ViStatus = niDMM_SetAttributeViInt32(ViSession Instrument_Handle, ViConstString Channel_Name, ViAttr Attribute_ID, ViInt32 Attribute_Value)

Purpose

This function 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.

This instrument driver 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 SetAttribute 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.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Channel_Name ViConstString

This parameter is ignored. National Instruments DMMs do not support channel names since they only have a single channel. This parameter is included in order to support interchangeability and upgradability to multiple channel DMMs.

The default value is " " (an empty string).

Attribute_ID ViAttr Pass the ID of an attribute.
Attribute_Value ViInt32 Pass the value that you want to set the attribute to.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_SetAttributeViReal64

ViStatus = niDMM_SetAttributeViReal64(ViSession Instrument_Handle, ViConstString Channel_Name, ViAttr Attribute_ID, ViReal64 Attribute_Value)

Purpose

This function 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.

This instrument driver 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 SetAttribute 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.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Channel_Name ViConstString

This parameter is ignored. National Instruments DMMs do not support channel names since they only have a single channel. This parameter is included in order to support interchangeability and upgradability to multiple channel DMMs.

The default value is " " (an empty string).

Attribute_ID ViAttr Pass the ID of an attribute.
Attribute_Value ViReal64 Pass the value that you want to set the attribute to.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_SetAttributeViSession

ViStatus = niDMM_SetAttributeViSession(ViSession Instrument_Handle, ViConstString Channel_Name, ViAttr Attribute_ID, ViSession Attribute_Value

Purpose

This function 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.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Channel_Name ViConstString

This parameter is ignored. National Instruments DMMs do not support channel names since they only have a single channel. This parameter is included in order to support interchangeability and upgradability to multiple channel DMMs.

The default value is " " (an empty string).

Attribute_ID ViAttr Pass the ID of an attribute.
Attribute_Value ViSession Pass the value that you want to set the attribute to.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_SetAttributeViString

ViStatus = niDMM_SetAttributeViString(ViSession Instrument_Handle, ViConstString Channel_Name, ViAttr Attribute_ID, ViString Attribute_Value[])

Purpose

This function 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.

This instrument driver 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 SetAttribute 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.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Channel_Name ViConstString

This parameter is ignored. National Instruments DMMs do not support channel names since they only have a single channel. This parameter is included in order to support interchangeability and upgradability to multiple channel DMMs.

The default value is " " (an empty string).

Attribute_ID ViAttr Pass the ID of an attribute.
Attribute_Value ViString Pass the value that you want to set the attribute to.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_GetAttributeViBoolean

ViStatus = niDMM_GetAttributeViBoolean(ViSession Instrument_Handle, ViConstString Channel_Name, ViAttr Attribute_ID, ViBoolean *Attribute_Value)

Purpose

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.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Channel_Name ViConstString

This parameter is ignored. National Instruments DMMs do not support channel names since they only have a single channel. This parameter is included in order to support interchangeability and upgradability to multiple channel DMMs.

The default value is " " (an empty string).

Attribute_ID ViAttr Pass the ID of an attribute.
Output
Name Type Description
Attribute_Value ViBoolean* Returns the current value of the attribute. Pass the address of a ViBoolean variable.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_GetAttributeViInt32

ViStatus = niDMM_GetAttributeViInt32(ViSession Instrument_Handle, ViConstString Channel_Name, ViAttr Attribute_ID, ViInt32 *Attribute_Value)

Purpose

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.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Channel_Name ViConstString

This parameter is ignored. National Instruments DMMs do not support channel names since they only have a single channel. This parameter is included in order to support interchangeability and upgradability to multiple channel DMMs.

The default value is " " (an empty string).

Attribute_ID ViAttr Pass the ID of an attribute.
Output
Name Type Description
Attribute_Value ViInt32* Returns the current value of the attribute. Pass the address of a ViInt32 variable.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_GetAttributeViReal64

ViStatus = niDMM_GetAttributeViReal64(ViSession Instrument_Handle, ViConstString Channel_Name, ViAttr Attribute_ID, ViReal64 *Attribute_Value)

Purpose

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.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Channel_Name ViConstString

This parameter is ignored. National Instruments DMMs do not support channel names since they only have a single channel. This parameter is included in order to support interchangeability and upgradability to multiple channel DMMs.

The default value is " " (an empty string).

Attribute_ID ViAttr Pass the ID of an attribute.
Output
Name Type Description
Attribute_Value ViReal64* Returns the current value of the attribute. Pass the address of a ViReal64 variable.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_GetAttributeViSession

ViStatus = niDMM_GetAttributeViSession(ViSession Instrument_Handle, ViConstString Channel_Name, ViAttr Attribute_ID, ViSession *Attribute_Value)

Purpose

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.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Channel_Name ViConstString

This parameter is ignored. National Instruments DMMs do not support channel names since they only have a single channel. This parameter is included in order to support interchangeability and upgradability to multiple channel DMMs.

The default value is " " (an empty string).

Attribute_ID ViAttr Pass the ID of an attribute.
Output
Name Type Description
Attribute_Value ViSession* Returns the current value of the attribute. Pass the address of a ViSession variable.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_GetAttributeViString

ViStatus = niDMM_GetAttributeViString(ViSession Instrument_Handle, ViConstString Channel_Name, ViAttr Attribute_ID, ViInt32 Buffer_Size, ViChar Attribute_Value[])

Purpose

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 Array Size parameter.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Channel_Name ViConstString

This parameter is ignored. National Instruments DMMs do not support channel names since they only have a single channel. This parameter is included in order to support interchangeability and upgradability to multiple channel DMMs.

The default value is " " (an empty string).

Attribute_ID ViAttr Pass the ID of an attribute.
Buffer_Size ViInt32

Pass the number of bytes in the ViChar array you specify for the Attribute_Value parameter.

If the current value of the attribute, including the terminating NULL byte, contains more bytes that you indicate in this parameter, the function copies Buffer_Size—1 bytes into the buffer, places an ASCII NUL byte at the end of the buffer, and returns the buffer size you must pass to get the entire value. For example, if the value is "123456" and the Buffer_Size 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 Attribute_Value buffer parameter.

Output
Name Type Description
Attribute_Value ViChar[ ]

The buffer in which the function returns the current value of the attribute. The buffer must be of type ViChar and have at least as many bytes as indicated in the Buffer_Size parameter.

If you specify 0 for the Buffer_Size parameter, you can pass VI_NULL for this parameter.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_CheckAttributeViBoolean

ViStatus = niDMM_CheckAttributeViBoolean(ViSession Instrument_Handle, ViConstString Channel_Name, ViAttr Attribute_ID, ViBoolean Attribute_Value)

Purpose

This function checks the validity of a value you specify for a ViBoolean attribute.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Channel_Name ViConstString

This parameter is ignored. National Instruments DMMs do not support channel names since they only have a single channel. This parameter is included in order to support interchangeability and upgradability to multiple channel DMMs.

The default value is " " (an empty string).

Attribute_ID ViAttr Pass the ID of an attribute.
Attribute_Value ViBoolean Pass the value that you want to set the attribute to.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_CheckAttributeViInt32

ViStatus = niDMM_CheckAttributeViInt32(ViSession Instrument_Handle, ViConstString Channel_Name, ViAttr Attribute_ID, ViInt32 Attribute_Value)

Purpose

This function checks the validity of a value you specify for a ViInt32 attribute.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Channel_Name ViConstString

This parameter is ignored. National Instruments DMMs do not support channel names since they only have a single channel. This parameter is included in order to support interchangeability and upgradability to multiple channel DMMs.

The default value is " " (an empty string).

Attribute_ID ViAttr Pass the ID of an attribute.
Attribute_Value ViInt32 Pass the value that you want to set the attribute to.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_CheckAttributeViReal64

ViStatus = niDMM_CheckAttributeViReal64(ViSession Instrument_Handle, ViConstString Channel_Name, ViAttr Attribute_ID, ViReal64 Attribute_Value)

Purpose

This function checks the validity of a value you specify for a ViReal64 attribute.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Channel_Name ViConstString

This parameter is ignored. National Instruments DMMs do not support channel names since they only have a single channel. This parameter is included in order to support interchangeability and upgradability to multiple channel DMMs.

The default value is " " (an empty string).

Attribute_ID ViAttr Pass the ID of an attribute.
Attribute_Value ViReal64 Pass the value that you want to set the attribute to.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_CheckAttributeViSession

ViStatus = niDMM_CheckAttributeViSession(ViSession Instrument_Handle, ViConstString Channel_Name, ViAttr Attribute_ID, ViSession Attribute_Value)

Purpose

This function checks the validity of a value you specify for a ViSession attribute.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Channel_Name ViConstString

This parameter is ignored. National Instruments DMMs do not support channel names since they only have a single channel. This parameter is included in order to support interchangeability and upgradability to multiple channel DMMs.

The default value is " " (an empty string).

Attribute_ID ViAttr Pass the ID of an attribute.
Attribute_Value ViSession Pass the value that you want to set the attribute to.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_CheckAttributeViString

ViStatus = niDMM_CheckAttributeViString(ViSession Instrument_Handle, ViConstString Channel_Name, ViAttr Attribute_ID, ViChar Attribute_Value[])

Purpose

This function checks the validity of a value you specify for a ViString attribute.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Channel_Name ViConstString

This parameter is ignored. National Instruments DMMs do not support channel names since they only have a single channel. This parameter is included in order to support interchangeability and upgradability to multiple channel DMMs.

The default value is " " (an empty string).

Attribute_ID ViAttr Pass the ID of an attribute.
Attribute_Value ViChar[] Pass the value that you want to set the attribute to.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_ImportAttributeConfigurationFile

ViStatus niDMM_ImportAttributeConfigurationFile (ViSession Instrument_Handle, ViConstString File_Path);

Purpose

Imports an attribute configuration to the session from the specified file.

You can export and import session attribute configurations only between devices with identical model numbers.

*Note  You cannot call this function while the session is in a running state, such as while acquiring a waveform.

*Note  Not supported on the PCMCIA4050 or the PXI/PCI4060.

Coercion Behavior for Certain Devices

Imported and exported attribute configurations contain coerced values for the following NIDMM devices:

  • PXI/PCI/PCIe/USB4065
  • PXI/PCI4070
  • PXI4071
  • PXI4072

NIDMM coerces attribute values when the value you set is within the allowed range for the attribute but is not one of the discrete valid values the attribute supports. For example, for an attribute that coerces values up, if you choose a value of 4 when the adjacent valid values are 1 and 10, the attribute coerces the value to 10.

Related Topics:

Using Attributes and Properties with NIDMM

Setting Attributes Before Reading Attributes

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
File_Path ViConstString Specifies the absolute path to the file containing the attribute configuration to import. If you specify an empty or relative path, this function returns an error.

Default File Extension: .nidmmconfig

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_ExportAttributeConfigurationFile

ViStatus niDMM_ExportAttributeConfigurationBuffer (ViSession Instrument_Handle, ViInt32 Size, ViAddr Configuration);

Purpose

Exports the attribute configuration of the session to the specified configuration buffer.

You can export and import session attribute configurations only between devices with identical model numbers.

This function verifies that the attributes you have configured for the session are valid. If the configuration is invalid, NIDMM returns an error.

*Note  Not supported on the PCMCIA4050 or the PXI/PCI4060. Coercion Behavior for Certain Devices

Imported and exported attribute configurations contain coerced values for the following NIDMM devices:

  • PXI/PCI/PCIe/USB4065
  • PXI/PCI4070
  • PXI4071
  • PXI4072

NIDMM coerces attribute values when the value you set is within the allowed range for the attribute but is not one of the discrete valid values the attribute supports. For example, for an attribute that coerces values up, if you choose a value of 4 when the adjacent valid values are 1 and 10, the attribute coerces the value to 10.

Related Topics:

Using Attributes and Properties with NIDMM

Setting Attributes Before Reading Attributes

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Size ViInt32 Specifies the size, in bytes, of the byte array to export. If you enter 0, this function returns the needed size.
Configuration ViAddr Specifies the byte array buffer to be populated with the exported attribute configuration.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_ImportAttributeConfigurationBuffer

ViStatus niDMM_ImportAttributeConfigurationBuffer (ViSession Instrument_Handle, ViInt32 Size, ViAddr Configuration);

Purpose

Imports an attribute configuration to the session from the specified configuration buffer.

You can export and import session attribute configurations only between devices with identical model numbers.

*Note  You cannot call this function while the session is in a running state, such as while acquiring a waveform. *Note  Not supported on the PCMCIA4050 or the PXI/PCI4060.| Coercion Behavior for Certain Devices

Imported and exported attribute configurations contain coerced values for the following NIDMM devices:

  • PXI/PCI/PCIe/USB4065
  • PXI/PCI4070
  • PXI4071
  • PXI4072

NIDMM coerces attribute values when the value you set is within the allowed range for the attribute but is not one of the discrete valid values the attribute supports. For example, for an attribute that coerces values up, if you choose a value of 4 when the adjacent valid values are 1 and 10, the attribute coerces the value to 10.

Related Topics:

Using Attributes and Properties with NIDMM

Setting Attributes Before Reading Attributes

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Size ViInt32 Specifies the size, in bytes, of the byte array to import. If you enter 0, this function returns the needed size.
Configuration ViAddr Specifies the byte array buffer that contains the attribute configuration to import.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

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