NI DCPOWER Calibration Functions - ni/grpc-device GitHub Wiki

Calibration Functions

niDCPower_CalSelfCalibrate

ViStatus niDCPower_CalSelfCalibrate(ViSession vi, ViConstString channelName);

Purpose

Performs a self-calibration upon the specified channel(s).

This function disables the output, performs several internal calculations, and updates calibration values. The updated calibration values are written to the device hardware if the NIDCPOWER_ATTR_SELF_CALIBRATION_PERSISTENCE attribute is set to NIDCPOWER_VAL_WRITE_TO_EEPROM. Refer to the NIDCPOWER_ATTR_SELF_CALIBRATION_PERSISTENCE attribute topic for more information about the settings for this attribute.

For the PXIe-4147 and PXIe-4162/4163, you must specify all channels of the instrument with the channelName input. You cannot self-calibrate a subset of channels for these instruments.

Note  This function calls the niDCPower_ResetWithChannels function, which puts the device configuration into the default state without changing the NIDCPOWER_ATTR_SELF_CALIBRATION_PERSISTENCE attribute.
Note  This function is not supported on all devices. Refer to Supported Functions by Device for more information about supported devices.
Related Topics:

Self-Calibration

Parameters

Input
Name Type Description
vi ViSession Identifies a particular instrument session. vi is obtained from the niDCPower_InitializeWithIndependentChannels function.
channelName ViConstString

Specifies the channel(s) to use. Specify the channel(s) using the form PXI1Slot3/0,PXI1Slot3/2-3,PXI1Slot4/2-3 or PXI1Slot3/0,PXI1Slot3/2:3,PXI1Slot4/2:3, where PXI1Slot3 and PXI1Slot4 are instrument resource names and 0, 2, and 3 are channels.

If you pass "" for this control, all channels in the session are used.

Return Value

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

niDCPower_GetExtCalRecommendedInterval

ViStatus niDCPower_GetExtCalRecommendedInterval(ViSession vi, ViInt32 *months);

Purpose

Returns the recommended maximum interval, in months, between external calibrations.

Note  This function can only be used in a session initialized to a single instrument.

Parameters

Input
Name Type Description
vi ViSession Identifies a particular instrument session. vi is obtained from the niDCPower_InitExtCal or niDCPower_InitializeWithIndependentChannels function.
Output
Name Type Description
months ViInt32* Specifies the recommended maximum interval, in months, between external calibrations.

Return Value

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

niDCPower_GetExtCalLastDateAndTime

ViStatus niDCPower_GetExtCalLastDateAndTime(ViSession vi, ViInt32 *year, ViInt32 *month, ViInt32 *day, ViInt32 *hour, ViInt32 *minute);

Purpose

Returns the date and time of the last successful calibration. The time returned is 24-hour (military) local time; for example, if the device was calibrated at 2:30 PM, this function returns 14 for hours and 30 for minutes.

Note  This function can only be used in a session initialized to a single instrument.

Parameters

Input
Name Type Description
vi ViSession Identifies a particular instrument session. vi is obtained from the niDCPower_InitExtCal or niDCPower_InitializeWithIndependentChannels function.
Output
Name Type Description
year ViInt32* Returns the year the device was last calibrated.
month ViInt32* Returns the month in which the device was last calibrated.
day ViInt32* Returns the day on which the device was last calibrated.
hour ViInt32* Returns the hour (in 24-hour time) in which the device was last calibrated.
minute ViInt32* Returns the minute in which the device was last calibrated.

Return Value

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

niDCPower_GetSelfCalLastDateAndTime

ViStatus niDCPower_GetSelfCalLastDateAndTime(ViSession vi, ViInt32 *year, ViInt32 *month, ViInt32 *day, ViInt32 *hour, ViInt32 *minute);

Purpose

Returns the date and time of the oldest successful self-calibration from among the channels in the session.

The time returned is 24-hour (military) local time; for example, if you have a session using channels 1 and 2, and a self-calibration was performed on channel 1 at 2:30 PM, and a self-calibration was performed on channel 2 at 3:00 PM on the same day, this function returns 14 for hours and 30 for minutes.

Note  This function is not supported on all devices. Refer to Supported Functions by Device for more information about supported devices.
Note  This function can only be used in a session initialized to a single instrument.

Parameters

Input
Name Type Description
vi ViSession Identifies a particular instrument session. vi is obtained from the niDCPower_InitExtCal or niDCPower_InitializeWithIndependentChannels function.
Output
Name Type Description
year ViInt32* Returns the year the device was last calibrated.
month ViInt32* Returns the month in which the device was last calibrated.
day ViInt32* Returns the day on which the device was last calibrated.
hour ViInt32* Returns the hour (in 24-hour time) in which the device was last calibrated.
minute ViInt32* Returns the minute in which the device was last calibrated.

Return Value

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

niDCPower_ReadCurrentTemperature

ViStatus niDCPower_ReadCurrentTemperature(ViSession vi, ViReal64 *temperature);

Purpose

Returns the current onboard temperature, in degrees Celsius, of the device.

Note  This function can only be used in a session initialized to a single instrument.

Parameters

Input
Name Type Description
vi ViSession Identifies a particular instrument session. vi is obtained from the niDCPower_InitExtCal or niDCPower_InitializeWithIndependentChannels function.
Output
Name Type Description
temperature ViReal64* Returns the onboard temperature, in degrees Celsius, of the device.

Return Value

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

niDCPower_GetExtCalLastTemp

ViStatus niDCPower_GetExtCalLastTemp(ViSession vi, ViReal64 *temperature);

Purpose

Returns the onboard temperature of the device, in degrees Celsius, during the last successful external calibration.

Note  This function can only be used in a session initialized to a single instrument.

Parameters

Input
Name Type Description
vi ViSession Identifies a particular instrument session. vi is obtained from the niDCPower_InitExtCal or niDCPower_InitializeWithIndependentChannels function.
Output
Name Type Description
temperature ViReal64* Returns the onboard temperature of the device, in degrees Celsius, during the last successful external calibration.

Return Value

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

niDCPower_GetSelfCalLastTemp

ViStatus niDCPower_GetSelfCalLastTemp(ViSession vi, ViReal64 *temperature);

Purpose

Returns the onboard temperature of the device, in degrees Celsius, during the oldest successful self-calibration from among the channels in the session.

For example, if you have a session using channels 1 and 2, and you perform a self-calibration on channel 1 with a device temperature of 25 degrees Celsius at 2:00, and a self-calibration was performed on channel 2 at 27 degrees Celsius at 3:00 on the same day, this function returns 25 for the temperature parameter.

Note  This function is not supported on all devices. Refer to Supported Functions by Device for more information about supported devices.
Note  This function can only be used in a session initialized to a single instrument.

Parameters

Input
Name Type Description
vi ViSession Identifies a particular instrument session. vi is obtained from the niDCPower_InitExtCal or niDCPower_InitializeWithIndependentChannels function.
Output
Name Type Description
temperature ViReal64* Returns the onboard temperature of the device, in degrees Celsius, during the oldest successful calibration.

Return Value

Name Type Description
Status ViStatus Reports the status of this operation. To obtain a text description of the status code, call the niDCPower_error_message function. To obtain additional information concerning the error condition, call the niDCPower_GetError function.
⚠️ **GitHub.com Fallback** ⚠️