Skip to content
Merged
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
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1693,11 +1693,14 @@
- Changed
- Fixed the return type of `get_all_script_names` and `get_all_named_waveform_names` to remove the size parameter and return a list of strings instead of a comma-separated string
- Changed the parameter name for waveform name from `name` to `waveform_name` in `clear_arb_waveform` and `select_arb_waveform` to be consistent with other waveform methods
- Changed the name of `get_self_calibration_last_date_and_time` to `get_self_cal_last_date_and_time` to be consistent with other MI drivers
- Changed the name of below methods to be consistent with other APIs in the repository
- `get_self_calibration_last_date_and_time` to `get_self_cal_last_date_and_time`
- `get_external_calibration_last_date_and_time` to `get_ext_cal_last_date_and_time`
- Added default value for `module` parameter in `get_self_cal_last_date_and_time` and `get_self_calibration_temperature` methods to align with documentation and allow duck-typing
- Updated `self_test` to not have any parameters, aligning with other MI drivers
- Updated `self_test` to not have any parameters, aligning with other APIs in the repository
- Changed `frequency_settling` property to be of type float instead of hightime.timedelta, since it can have multiple interpretation based on `frequency_settling_units` property value
- Changed `interpolation_delay` and `relative_delay` properties to be of type hightime.timedelta, so that it aligns with _delay_ attributes across all drivers
- Changed `interpolation_delay` and `relative_delay` properties to be of type hightime.timedelta, so that it aligns with _delay_ attributes across other APIs in the repository
- Updated `wait_until_settled` method to have `max_time_milliseconds` parameter as type hightime.timedelta with a default value of 10 seconds
- Changed `exported_ref_clock_rate` and `ref_clock_rate` properties to be of type float instead of enum, since the enums just represented raw float values
- Removed
- Methods and properties applicable only to hardware which are not supported anymore
Expand Down
10 changes: 5 additions & 5 deletions docs/nirfsg/class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1288,12 +1288,12 @@ get_error



get_external_calibration_last_date_and_time
-------------------------------------------
get_ext_cal_last_date_and_time
------------------------------

.. py:currentmodule:: nirfsg.Session

.. py:method:: get_external_calibration_last_date_and_time()
.. py:method:: get_ext_cal_last_date_and_time()

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

Expand Down Expand Up @@ -2492,7 +2492,7 @@ wait_until_settled

.. py:currentmodule:: nirfsg.Session

.. py:method:: wait_until_settled(max_time_milliseconds)
.. py:method:: wait_until_settled(max_time_milliseconds=hightime.timedelta(seconds=10.0))

Waits until the RF output signal has settled. This method is useful for devices that support changes while in the Generation state.

Expand All @@ -2516,7 +2516,7 @@ wait_until_settled



:type max_time_milliseconds: int
:type max_time_milliseconds: hightime.timedelta, datetime.timedelta, or int in milliseconds

write_arb_waveform
------------------
Expand Down
9 changes: 5 additions & 4 deletions generated/nirfsg/nirfsg/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -6501,8 +6501,8 @@ def _get_external_calibration_last_date_and_time(self):
return year, month, day, hour, minute, second

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

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

Expand Down Expand Up @@ -7119,7 +7119,7 @@ def set_arb_waveform_next_write_position(self, waveform_name, relative_to, offse
self._interpreter.set_arb_waveform_next_write_position(waveform_name, relative_to, offset)

@ivi_synchronized
def wait_until_settled(self, max_time_milliseconds):
def wait_until_settled(self, max_time_milliseconds=hightime.timedelta(seconds=10.0)):
r'''wait_until_settled

Waits until the RF output signal has settled. This method is useful for devices that support changes while in the Generation state.
Expand All @@ -7131,11 +7131,12 @@ def wait_until_settled(self, max_time_milliseconds):
**Supported Devices** : PXI-5610, PXIe-5611, PXIe-5644/5645/5646, PXI/PXIe-5650/5651/5652, PXIe-5653/5654/5654 with PXIe-5696, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842/5860

Args:
max_time_milliseconds (int): Specifies the maximum time the method waits for the output to settle. If the maximum time is exceeded, this method returns an error. The units are expressed in milliseconds.
max_time_milliseconds (hightime.timedelta, datetime.timedelta, or int in milliseconds): Specifies the maximum time the method waits for the output to settle. If the maximum time is exceeded, this method returns an error. The units are expressed in milliseconds.

**Default Value** : 10000

'''
max_time_milliseconds = _converters.convert_timedelta_to_milliseconds_int32(max_time_milliseconds)
self._interpreter.wait_until_settled(max_time_milliseconds)

@ivi_synchronized
Expand Down
9 changes: 6 additions & 3 deletions src/nirfsg/metadata/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2207,7 +2207,7 @@
'description': '\nReturns the date and time of the last successful external calibration.\n\nThe time returned is 24-hour (military) local time; for example, if the device was calibrated at 2:30PM, this function returns\n\n14 for the hours parameter and\n\n30 for the minutes parameter.\n\n**Supported Devices** : PXI-5610, PXIe-5611, PXIe-5644/5645/5646, PXI/PXIe-5650/5651/5652, PXIe-5653/5654/5654, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5696, PXIe-5820/5830/5831/5832/5840/5841/5842/5860'
},
'included_in_proto': True,
'method_name_for_documentation': 'get_external_calibration_last_date_and_time',
'method_name_for_documentation': 'get_ext_cal_last_date_and_time',
'parameters': [
{
'direction': 'in',
Expand Down Expand Up @@ -2308,7 +2308,7 @@
'type': 'hightime.datetime'
}
],
'python_name': 'get_external_calibration_last_date_and_time',
'python_name': 'get_ext_cal_last_date_and_time',
'real_datetime_call': 'GetExternalCalibrationLastDateAndTime',
'returns': 'ViStatus'
},
Expand Down Expand Up @@ -4588,14 +4588,17 @@
'use_in_python_api': True
},
{
'default_value': 'hightime.timedelta(seconds=10.0)',
'direction': 'in',
'documentation': {
'description': 'Specifies the maximum time the function waits for the output to settle. If the maximum time is exceeded, this function returns an error. The units are expressed in milliseconds.\n\n**Default Value** : 10000'
},
'name': 'maxTimeMilliseconds',
'python_api_converter_name': 'convert_timedelta_to_milliseconds_int32',
'type': 'ViInt32',
'type_in_documentation': 'hightime.timedelta, datetime.timedelta, or int in milliseconds',
'use_array': False,
'use_in_python_api': True
'use_in_python_api': True
}
],
'returns': 'ViStatus'
Expand Down
6 changes: 3 additions & 3 deletions src/nirfsg/system_tests/test_system_nirfsg.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ def test_clear_self_calibrate_range(self, rfsg_device_session):
rfsg_device_session.clear_self_calibrate_range()

@pytest.mark.skipif(use_simulated_session is True, reason="Bad date returned by driver for simulated device")
def test_get_external_calibration_last_date_and_time(self, rfsg_device_session):
dt = rfsg_device_session.get_external_calibration_last_date_and_time()
def test_get_ext_cal_last_date_and_time(self, rfsg_device_session):
dt = rfsg_device_session.get_ext_cal_last_date_and_time()
assert isinstance(dt, hightime.datetime)

@pytest.mark.skipif(use_simulated_session is True, reason="Bad date returned by driver for simulated device")
Expand Down Expand Up @@ -580,7 +580,7 @@ def test_read_and_download_waveform_from_file_tdms(self, rfsg_device_session):
def test_wait_until_settled(self, rfsg_device_session):
rfsg_device_session.configure_rf(2e9, -5.0)
with rfsg_device_session.initiate():
rfsg_device_session.wait_until_settled(15000)
rfsg_device_session.wait_until_settled()

def test_get_all_named_waveform_names(self, rfsg_device_session):
rfsg_device_session.generation_mode = nirfsg.GenerationMode.ARB_WAVEFORM
Expand Down
Loading