Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ All notable changes to this project will be documented in this file.
* #### Removed
* ### `nidmm` (NI-DMM)
* #### Added
* New methods for getting calibration information. - [#1462](https://github.com/ni/nimi-python/issues/1462)
* `get_ext_cal_last_date_and_time`
* `get_ext_cal_last_temp`
* `get_self_cal_last_date_and_time`
* `get_self_cal_last_temp`
* #### Changed
* #### Removed
* ### `nifgen` (NI-FGEN)
Expand Down
82 changes: 65 additions & 17 deletions docs/nidmm/class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,52 @@ get_dev_temp



get_ext_cal_last_date_and_time
------------------------------

.. py:currentmodule:: nidmm.Session

.. py:method:: get_ext_cal_last_date_and_time()

Returns the date and time of the last external calibration performed.





:rtype: hightime.datetime
:return:


Indicates date and time of the last external calibration.





get_ext_cal_last_temp
---------------------

.. py:currentmodule:: nidmm.Session

.. py:method:: get_ext_cal_last_temp()

Returns the **Temperature** during the last external calibration procedure.





:rtype: float
:return:


Returns the **temperature** during the last external calibration.





get_ext_cal_recommended_interval
--------------------------------

Expand Down Expand Up @@ -1236,45 +1282,47 @@ get_ext_cal_recommended_interval



get_last_cal_temp
-----------------
get_self_cal_last_date_and_time
-------------------------------

.. py:currentmodule:: nidmm.Session

.. py:method:: get_last_cal_temp(cal_type)
.. py:method:: get_self_cal_last_date_and_time()

Returns the **Temperature** during the last calibration procedure.
Returns the date and time of the last self calibration performed.



.. note:: The NI 4050 and NI 4060 are not supported.


:rtype: hightime.datetime
:return:

:param cal_type:

Indicates date and time of the last self calibration.

Specifies the type of calibration performed (external or
self-calibration).


+-----------------------------------------------------+---+----------------------+
| :py:data:`~nidmm.NIDMM_VAL_INTERNAL_AREA` (default) | 0 | Self-Calibration |
+-----------------------------------------------------+---+----------------------+
| :py:data:`~nidmm.NIDMM_VAL_EXTERNAL_AREA` | 1 | External Calibration |
+-----------------------------------------------------+---+----------------------+

.. note:: The NI 4065 does not support self-calibration.

.. note:: One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
get_self_cal_last_temp
----------------------

.. py:currentmodule:: nidmm.Session

.. py:method:: get_self_cal_last_temp()

Returns the **Temperature** during the last self calibration procedure.




:type cal_type: int

:rtype: float
:return:


Returns the **temperature** during the last calibration.
Returns the **temperature** during the last self calibration.



Expand Down
58 changes: 56 additions & 2 deletions generated/nidmm/nidmm/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -1791,6 +1791,60 @@ def export_attribute_configuration_file(self, file_path):
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return

@ivi_synchronized
def get_ext_cal_last_date_and_time(self):
'''get_ext_cal_last_date_and_time

Returns the date and time of the last external calibration performed.

Returns:
last_cal_datetime (hightime.datetime): Indicates date and time of the last external calibration.

'''

month, day, year, hour, minute = self._get_cal_date_and_time(1)
return hightime.datetime(year, month, day, hour, minute)

@ivi_synchronized
def get_ext_cal_last_temp(self):
'''get_ext_cal_last_temp

Returns the **Temperature** during the last external calibration procedure.

Returns:
temperature (float): Returns the **temperature** during the last external calibration.

'''

return self._get_last_cal_temp(1)

@ivi_synchronized
def get_self_cal_last_date_and_time(self):
'''get_self_cal_last_date_and_time

Returns the date and time of the last self calibration performed.

Returns:
last_cal_datetime (hightime.datetime): Indicates date and time of the last self calibration.

'''

month, day, year, hour, minute = self._get_cal_date_and_time(0)
return hightime.datetime(year, month, day, hour, minute)

@ivi_synchronized
def get_self_cal_last_temp(self):
'''get_self_cal_last_temp

Returns the **Temperature** during the last self calibration procedure.

Returns:
temperature (float): Returns the **temperature** during the last self calibration.

'''

return self._get_last_cal_temp(0)

@ivi_synchronized
def fetch(self, maximum_time=hightime.timedelta(milliseconds=-1)):
r'''fetch
Expand Down Expand Up @@ -2101,8 +2155,8 @@ def get_cal_date_and_time(self, cal_type):
return hightime.datetime(year, month, day, hour, minute)

@ivi_synchronized
def get_last_cal_temp(self, cal_type):
r'''get_last_cal_temp
def _get_last_cal_temp(self, cal_type):
r'''_get_last_cal_temp

Returns the **Temperature** during the last calibration procedure.

Expand Down
3 changes: 2 additions & 1 deletion src/nidmm/metadata/functions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# This file is generated from NI-DMM API metadata version 19.6.0d7
# This file is generated from NI-DMM API metadata version 20.5.0d5
functions = {
'Abort': {
'documentation': {
Expand Down Expand Up @@ -1209,6 +1209,7 @@
'returns': 'ViStatus'
},
'GetLastCalTemp': {
'codegen_method': 'private',
'documentation': {
'description': 'Returns the **Temperature** during the last calibration procedure.',
'note': 'The NI 4050 and NI 4060 are not supported.'
Expand Down
142 changes: 142 additions & 0 deletions src/nidmm/metadata/functions_addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,146 @@
functions_override_metadata = {
}

functions_additional_get_ext_cal_last_temp = {
'FancyGetExtCalLastTemp': {
'codegen_method': 'python-only',
'python_name': 'get_ext_cal_last_temp',
'documentation': {
'description': 'Returns the **Temperature** during the last external calibration procedure.',
},
'method_templates': [
{
'documentation_filename': 'default_method',
'method_python_name_suffix': '',
'session_filename': 'fancy_get_cal_last_temp'
}
],
'parameters': [
{
'direction': 'in',
'documentation': {
'description': '\nIdentifies a particular instrument session. You obtain the **vi**\nparameter from niDMM_init or niDMM_InitWithOptions. The default is\nNone.\n'
},
'name': 'vi',
'type': 'ViSession'
},
{
'direction': 'out',
'documentation': {
'description': 'Returns the **temperature** during the last external calibration.'
},
'name': 'temperature',
'type': 'ViReal64'
}
],
'returns': 'ViStatus'
}
}

functions_additional_get_self_cal_last_temp = {
'FancyGetSelfCalLastTemp': {
'codegen_method': 'python-only',
'python_name': 'get_self_cal_last_temp',
'documentation': {
'description': 'Returns the **Temperature** during the last self calibration procedure.',
},
'method_templates': [
{
'documentation_filename': 'default_method',
'method_python_name_suffix': '',
'session_filename': 'fancy_get_cal_last_temp'
}
],
'parameters': [
{
'direction': 'in',
'documentation': {
'description': '\nIdentifies a particular instrument session. You obtain the **vi**\nparameter from niDMM_init or niDMM_InitWithOptions. The default is\nNone.\n'
},
'name': 'vi',
'type': 'ViSession'
},
{
'direction': 'out',
'documentation': {
'description': 'Returns the **temperature** during the last self calibration.'
},
'name': 'temperature',
'type': 'ViReal64'
}
],
'returns': 'ViStatus'
}
}

functions_additional_get_ext_cal_last_date_and_time = {
'FancyGetExtCalLastDateAndTime': {
'codegen_method': 'python-only',
'python_name': 'get_ext_cal_last_date_and_time',
'documentation': {
'description': 'Returns the date and time of the last external calibration performed.',
},
'method_templates': [
{
'documentation_filename': 'default_method',
'method_python_name_suffix': '',
'session_filename': 'fancy_get_cal_last_date_and_time'
}
],
'parameters': [
{
'direction': 'in',
'documentation': {
'description': 'Identifies a particular instrument session. You obtain the **vi** parameter from niDMM_init or niDMM_InitWithOptions. The default is None.'
},
'name': 'vi',
'type': 'ViSession'
},
{
'direction': 'out',
'documentation': {
'description': 'Indicates date and time of the last external calibration.'
},
'name': 'last_cal_datetime',
'type': 'hightime.datetime'
}
],
'returns': 'ViStatus'
}
}

functions_additional_get_self_cal_last_date_and_time = {
'FancyGetSelfCalLastDateAndTime': {
'codegen_method': 'python-only',
'python_name': 'get_self_cal_last_date_and_time',
'documentation': {
'description': 'Returns the date and time of the last self calibration performed.',
},
'method_templates': [
{
'documentation_filename': 'default_method',
'method_python_name_suffix': '',
'session_filename': 'fancy_get_cal_last_date_and_time'
}
],
'parameters': [
{
'direction': 'in',
'documentation': {
'description': 'Identifies a particular instrument session. You obtain the **vi** parameter from niDMM_init or niDMM_InitWithOptions. The default is None.'
},
'name': 'vi',
'type': 'ViSession'
},
{
'direction': 'out',
'documentation': {
'description': 'Indicates date and time of the last self calibration.'
},
'name': 'last_cal_datetime',
'type': 'hightime.datetime'
}
],
'returns': 'ViStatus'
}
}
Loading