From 5c405c0e5b3eaa9d460b3440b9284e5fcadae79a Mon Sep 17 00:00:00 2001 From: Joshua Kwoon Date: Wed, 1 Jan 2025 19:35:31 -0600 Subject: [PATCH 01/11] Update metadata for nidcpower to version 25.0.0d98 --- generated/nidcpower/nidcpower/session.py | 25 ++++++++++++------------ src/nidcpower/metadata/attributes.py | 10 +++++----- src/nidcpower/metadata/config.py | 4 ++-- src/nidcpower/metadata/functions.py | 10 +++++++--- 4 files changed, 27 insertions(+), 22 deletions(-) diff --git a/generated/nidcpower/nidcpower/session.py b/generated/nidcpower/nidcpower/session.py index 7481ec7c1..21742df53 100644 --- a/generated/nidcpower/nidcpower/session.py +++ b/generated/nidcpower/nidcpower/session.py @@ -2018,7 +2018,7 @@ class _SessionBase(object): Specifies the number of samples that the active channel measurement buffer can hold. The default value is the maximum number of samples that a device is capable of recording in one second. - Valid Values: The PXIe-4051, PXIe-4147, and PXIe-4151 support values from 170 to 18000110. + Valid Values: The PXIe-4051, PXIe-4147, and PXIe-4150/4151 support values from 170 to 18000110. The PXIe-4162/4163 supports values from 256 to 1000192. The PXIe-4190 supports values from 102 to 6000048. The PXIe-4112, PXIe-4113, and PXIe-4154 support values from 1000 to 178956970. @@ -2044,7 +2044,7 @@ class _SessionBase(object): Specifies the amount of time to delay the generation of the Measure Complete event, in seconds. Valid Values: The PXIe-4051 supports values from 0 seconds to 39 seconds. The PXIe-4147 supports values from 0 seconds to 26.5 seconds. - The PXIe-4151 supports values from 0 seconds to 42 seconds. + The PXIe-4150/4151 supports values from 0 seconds to 42 seconds. The PXIe-4162/4163 and PXIe-4190 support values from 0 seconds to 23 seconds. All other supported instruments support values from 0 to 167 seconds. Default Value: Varies by device. Refer to Supported Properties by Device topic in the NI DC Power Supplies and SMUs Help for more information about default values. @@ -2270,10 +2270,9 @@ class _SessionBase(object): merged_channels = _attributes.AttributeViStringRepeatedCapability(1150249) '''Type: str - Specifies the channel(s) to merge with a designated primary channel of an instrument in order to increase the maximum current you can source from the instrument. - This property designates the merge channels to combine with a primary channel. To designate the primary channel, initialize the session to the primary channel only. - Note: You cannot change the merge configuration with this property when the session is in the Running state. - For complete information on using merged channels with this property, refer to Merged Channels in the NI DC Power Supplies and SMUs Help. + Specifies the merge channel(s) to combine with a designated primary channel of an instrument in order to increase the maximum current you can source from the instrument. + Set this property on the primary channel only, and pass the merge channels as the value of this property. + Refer to the Merged Channels topic in your instrument user manual for more information about using merged channels. Note: NI-DCPower uses the terms "source" and "output". However, while sinking with electronic loads and SMUs these correspond to "sinking" and "input", respectively. @@ -4155,7 +4154,7 @@ class _SessionBase(object): Refer to the Single Point Source Mode and Sequence Source Mode topics for more information. Valid Values: The PXIe-4051 supports values from 0 to 39 seconds. The PXIe-4147 supports values from 0 to 26.5 seconds. - The PXIe-4151 supports values from 0 to 42 seconds. + The PXIe-4150/4151 supports values from 0 to 42 seconds. The PXIe-4162/4163 and PXIe-4190 support values from 0 to 23 seconds. All other supported instruments support values from 0 to 167 seconds. Default Value: 0.01667 seconds @@ -6875,11 +6874,13 @@ def query_output_state(self, output_state): output_state (enums.OutputStates): Specifies the output state of the channel that is being queried. **Defined Values**: - +----------------------+-------------------------------------------------------------------+ - | OutputStates.VOLTAGE | The device maintains a constant voltage by adjusting the current. | - +----------------------+-------------------------------------------------------------------+ - | OutputStates.CURRENT | The device maintains a constant current by adjusting the voltage. | - +----------------------+-------------------------------------------------------------------+ + +-------------------------------+--------------------------------------------------------------------+ + | OutputStates.CONSTANT_VOLTAGE | The channel maintains a constant voltage by adjusting the current. | + +-------------------------------+--------------------------------------------------------------------+ + | OutputStates.CONSTANT_CURRENT | The channel maintains a constant current by adjusting the voltage. | + +-------------------------------+--------------------------------------------------------------------+ + | OutputStates.INHIBITED | The channel is in the inhibited state. | + +-------------------------------+--------------------------------------------------------------------+ Returns: diff --git a/src/nidcpower/metadata/attributes.py b/src/nidcpower/metadata/attributes.py index 5596dd4a8..dd5c9258e 100644 --- a/src/nidcpower/metadata/attributes.py +++ b/src/nidcpower/metadata/attributes.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# This file is generated from NI-DCPower API metadata version 24.3.0f264 +# This file is generated from NI-DCPower API metadata version 25.0.0d98 attributes = { 1050003: { 'access': 'read-write', @@ -673,7 +673,7 @@ 'access': 'read-write', 'attribute_class': 'AttributeViReal64TimeDeltaSeconds', 'documentation': { - 'description': '\nSpecifies the amount of time to delay the generation of the Measure Complete event, in seconds.\nValid Values: The PXIe-4051 supports values from 0 seconds to 39 seconds.\nThe PXIe-4147 supports values from 0 seconds to 26.5 seconds.\nThe PXIe-4151 supports values from 0 seconds to 42 seconds.\nThe PXIe-4162/4163 and PXIe-4190 support values from 0 seconds to 23 seconds.\nAll other supported instruments support values from 0 to 167 seconds.\nDefault Value: Varies by device. Refer to Supported Attributes by Device topic in the NI DC Power Supplies and SMUs Help for more information about default values.\n', + 'description': '\nSpecifies the amount of time to delay the generation of the Measure Complete event, in seconds.\nValid Values: The PXIe-4051 supports values from 0 seconds to 39 seconds.\nThe PXIe-4147 supports values from 0 seconds to 26.5 seconds.\nThe PXIe-4150/4151 supports values from 0 seconds to 42 seconds.\nThe PXIe-4162/4163 and PXIe-4190 support values from 0 seconds to 23 seconds.\nAll other supported instruments support values from 0 to 167 seconds.\nDefault Value: Varies by device. Refer to Supported Attributes by Device topic in the NI DC Power Supplies and SMUs Help for more information about default values.\n', 'note': '\nThis attribute is not supported on all devices. For more information about supported devices, search ni.com for Supported Attributes by Device.\n' }, 'lv_property': 'Events:Measure Complete Event:Event Delay', @@ -741,7 +741,7 @@ 'access': 'read-write', 'attribute_class': 'AttributeViReal64TimeDeltaSeconds', 'documentation': { - 'description': '\nDetermines when, in seconds, the device generates the Source Complete event, potentially starting a measurement if the NIDCPOWER_ATTR_MEASURE_WHEN attribute is set to NIDCPOWER_VAL_AUTOMATICALLY_AFTER_SOURCE_COMPLETE.\nRefer to the Single Point Source Mode and Sequence Source Mode topics for more information.\nValid Values: The PXIe-4051 supports values from 0 to 39 seconds.\nThe PXIe-4147 supports values from 0 to 26.5 seconds.\nThe PXIe-4151 supports values from 0 to 42 seconds.\nThe PXIe-4162/4163 and PXIe-4190 support values from 0 to 23 seconds.\nAll other supported instruments support values from 0 to 167 seconds.\nDefault Value: 0.01667 seconds\n', + 'description': '\nDetermines when, in seconds, the device generates the Source Complete event, potentially starting a measurement if the NIDCPOWER_ATTR_MEASURE_WHEN attribute is set to NIDCPOWER_VAL_AUTOMATICALLY_AFTER_SOURCE_COMPLETE.\nRefer to the Single Point Source Mode and Sequence Source Mode topics for more information.\nValid Values: The PXIe-4051 supports values from 0 to 39 seconds.\nThe PXIe-4147 supports values from 0 to 26.5 seconds.\nThe PXIe-4150/4151 supports values from 0 to 42 seconds.\nThe PXIe-4162/4163 and PXIe-4190 support values from 0 to 23 seconds.\nAll other supported instruments support values from 0 to 167 seconds.\nDefault Value: 0.01667 seconds\n', 'note': '\nNI-DCPower uses the terms "source" and "output". However, while sinking with electronic loads and SMUs these correspond to "sinking" and "input", respectively.\n\nThis attribute is not supported on all devices. For more information about supported devices, search ni.com for Supported Attributes by Device.\n\n' }, 'lv_property': 'Source:Advanced:Source Delay', @@ -1048,7 +1048,7 @@ 1150077: { 'access': 'read-write', 'documentation': { - 'description': '\nSpecifies the number of samples that the active channel measurement buffer can hold.\nThe default value is the maximum number of samples that a device is capable of recording in one second.\nValid Values: The PXIe-4051, PXIe-4147, and PXIe-4151 support values from 170 to 18000110.\nThe PXIe-4162/4163 supports values from 256 to 1000192.\nThe PXIe-4190 supports values from 102 to 6000048.\nThe PXIe-4112, PXIe-4113, and PXIe-4154 support values from 1000 to 178956970.\nAll other supported instruments support values from 1000 to 268435455.\nDefault Value: Varies by device. Refer to Supported Attributes by Device topic in the NI DC Power Supplies and SMUs Help for more information about default values.\n', + 'description': '\nSpecifies the number of samples that the active channel measurement buffer can hold.\nThe default value is the maximum number of samples that a device is capable of recording in one second.\nValid Values: The PXIe-4051, PXIe-4147, and PXIe-4150/4151 support values from 170 to 18000110.\nThe PXIe-4162/4163 supports values from 256 to 1000192.\nThe PXIe-4190 supports values from 102 to 6000048.\nThe PXIe-4112, PXIe-4113, and PXIe-4154 support values from 1000 to 178956970.\nAll other supported instruments support values from 1000 to 268435455.\nDefault Value: Varies by device. Refer to Supported Attributes by Device topic in the NI DC Power Supplies and SMUs Help for more information about default values.\n', 'note': '\nThis attribute is not supported on all devices. For more information about supported devices, search ni.com for Supported Attributes by Device.\n' }, 'lv_property': 'Measurement:Advanced:Measure Buffer Size', @@ -1994,7 +1994,7 @@ 'access': 'read-write', 'attribute_class': 'AttributeViStringRepeatedCapability', 'documentation': { - 'description': '\nSpecifies the channel(s) to merge with a designated primary channel of an instrument in order to increase the maximum current you can source from the instrument.\nThis attribute designates the merge channels to combine with a primary channel. To designate the primary channel, initialize the session to the primary channel only.\nNote: You cannot change the merge configuration with this attribute when the session is in the Running state.\nFor complete information on using merged channels with this attribute, refer to Merged Channels in the NI DC Power Supplies and SMUs Help.\n', + 'description': '\nSpecifies the merge channel(s) to combine with a designated primary channel of an instrument in order to increase the maximum current you can source from the instrument.\nSet this attribute on the primary channel only, and pass the merge channels as the value of this attribute.\nRefer to the Merged Channels topic in your instrument user manual for more information about using merged channels.\n', 'note': '\nNI-DCPower uses the terms "source" and "output". However, while sinking with electronic loads and SMUs these correspond to "sinking" and "input", respectively.\n\nThis attribute is not supported on all devices. For more information about supported devices, search ni.com for Supported Attributes by Device. Devices that do not support this property behave as if no channels were merged.\nDefault Value: Refer to the Supported Attributes by Device topic for the default value by device.\n' }, 'lv_property': 'Source:Advanced:Merged Channels', diff --git a/src/nidcpower/metadata/config.py b/src/nidcpower/metadata/config.py index 4f323f003..6515d359e 100644 --- a/src/nidcpower/metadata/config.py +++ b/src/nidcpower/metadata/config.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -# This file is generated from NI-DCPower API metadata version 24.3.0f264 +# This file is generated from NI-DCPower API metadata version 25.0.0d98 config = { - 'api_version': '24.3.0f264', + 'api_version': '25.0.0d98', 'c_function_prefix': 'niDCPower_', 'close_function': 'close', 'context_manager_name': { diff --git a/src/nidcpower/metadata/functions.py b/src/nidcpower/metadata/functions.py index fac145bf0..2c225d134 100644 --- a/src/nidcpower/metadata/functions.py +++ b/src/nidcpower/metadata/functions.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# This file is generated from NI-DCPower API metadata version 24.3.0f264 +# This file is generated from NI-DCPower API metadata version 25.0.0d98 functions = { 'AbortWithChannels': { 'documentation': { @@ -3236,11 +3236,15 @@ 'table_body': [ [ 'NIDCPOWER_VAL_OUTPUT_CONSTANT_VOLTAGE', - 'The device maintains a constant voltage by adjusting the current.' + 'The channel maintains a constant voltage by adjusting the current.' ], [ 'NIDCPOWER_VAL_OUTPUT_CONSTANT_CURRENT', - 'The device maintains a constant current by adjusting the voltage.' + 'The channel maintains a constant current by adjusting the voltage.' + ], + [ + 'NIDCPOWER_VAL_OUTPUT_INHIBITED', + 'The channel is in the inhibited state.' ] ] }, From a47ec2c5ebaa40b67692e4b61d31d2ab276437f7 Mon Sep 17 00:00:00 2001 From: Joshua Kwoon Date: Wed, 1 Jan 2025 19:35:47 -0600 Subject: [PATCH 02/11] Update CHANGELOG.md --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f06f8c72..0bbf78210 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,7 +42,16 @@ All notable changes to this project will be documented in this file. * #### Removed * ### `nidcpower` (NI-DCPower) * #### Added - * #### Changed + * API parity with NI-DCPower 2025 Q1. + * Enum value added: + * `INHIBITED` added to enum `OutputStates`. + * #### Changed + * Function documentation updated: + * `query_output_state` + * Updated enum descriptions for the `output_state` arg. + * Attribute documentation updated: + * `measure_buffer_size`, `measure_complete_event_delay`, and `source_delay` descriptions updated to specify `PXIe-4150/4151` instead of `PXIe-4151`. + * Updated `merged_channels` description wording. * #### Removed * ### `nidigital` (NI-Digital Pattern Driver) * #### Added From ff7713d8c55efba668faa35dcfba9bdef09b8016 Mon Sep 17 00:00:00 2001 From: Joshua Kwoon Date: Wed, 1 Jan 2025 19:36:55 -0600 Subject: [PATCH 03/11] Generate files from updated metadata --- docs/nidcpower/class.rst | 25 +++++++++++++------------ docs/nidcpower/conf.py | 2 +- docs/nidcpower/enums.rst | 14 ++++++++++++-- generated/nidcpower/nidcpower/enums.py | 8 ++++++-- src/nidcpower/metadata/enums.py | 9 ++++++++- 5 files changed, 40 insertions(+), 18 deletions(-) diff --git a/docs/nidcpower/class.rst b/docs/nidcpower/class.rst index b621c3c75..9cd579e1a 100644 --- a/docs/nidcpower/class.rst +++ b/docs/nidcpower/class.rst @@ -2480,11 +2480,13 @@ query_output_state Specifies the output state of the channel that is being queried. **Defined Values**: - +--------------------------------------------+-------------------------------------------------------------------+ - | :py:data:`~nidcpower.OutputStates.VOLTAGE` | The device maintains a constant voltage by adjusting the current. | - +--------------------------------------------+-------------------------------------------------------------------+ - | :py:data:`~nidcpower.OutputStates.CURRENT` | The device maintains a constant current by adjusting the voltage. | - +--------------------------------------------+-------------------------------------------------------------------+ + +-----------------------------------------------------+--------------------------------------------------------------------+ + | :py:data:`~nidcpower.OutputStates.CONSTANT_VOLTAGE` | The channel maintains a constant voltage by adjusting the current. | + +-----------------------------------------------------+--------------------------------------------------------------------+ + | :py:data:`~nidcpower.OutputStates.CONSTANT_CURRENT` | The channel maintains a constant current by adjusting the voltage. | + +-----------------------------------------------------+--------------------------------------------------------------------+ + | :py:data:`~nidcpower.OutputStates.INHIBITED` | The channel is in the inhibited state. | + +-----------------------------------------------------+--------------------------------------------------------------------+ :type output_state: :py:data:`nidcpower.OutputStates` @@ -6868,7 +6870,7 @@ measure_buffer_size Specifies the number of samples that the active channel measurement buffer can hold. The default value is the maximum number of samples that a device is capable of recording in one second. - Valid Values: The PXIe-4051, PXIe-4147, and PXIe-4151 support values from 170 to 18000110. + Valid Values: The PXIe-4051, PXIe-4147, and PXIe-4150/4151 support values from 170 to 18000110. The PXIe-4162/4163 supports values from 256 to 1000192. The PXIe-4190 supports values from 102 to 6000048. The PXIe-4112, PXIe-4113, and PXIe-4154 support values from 1000 to 178956970. @@ -6915,7 +6917,7 @@ measure_complete_event_delay Specifies the amount of time to delay the generation of the Measure Complete event, in seconds. Valid Values: The PXIe-4051 supports values from 0 seconds to 39 seconds. The PXIe-4147 supports values from 0 seconds to 26.5 seconds. - The PXIe-4151 supports values from 0 seconds to 42 seconds. + The PXIe-4150/4151 supports values from 0 seconds to 42 seconds. The PXIe-4162/4163 and PXIe-4190 support values from 0 seconds to 23 seconds. All other supported instruments support values from 0 to 167 seconds. Default Value: Varies by device. Refer to Supported Properties by Device topic in the NI DC Power Supplies and SMUs Help for more information about default values. @@ -7372,10 +7374,9 @@ merged_channels .. py:attribute:: merged_channels - Specifies the channel(s) to merge with a designated primary channel of an instrument in order to increase the maximum current you can source from the instrument. - This property designates the merge channels to combine with a primary channel. To designate the primary channel, initialize the session to the primary channel only. - Note: You cannot change the merge configuration with this property when the session is in the Running state. - For complete information on using merged channels with this property, refer to Merged Channels in the NI DC Power Supplies and SMUs Help. + Specifies the merge channel(s) to combine with a designated primary channel of an instrument in order to increase the maximum current you can source from the instrument. + Set this property on the primary channel only, and pass the merge channels as the value of this property. + Refer to the Merged Channels topic in your instrument user manual for more information about using merged channels. @@ -11034,7 +11035,7 @@ source_delay Refer to the Single Point Source Mode and Sequence Source Mode topics for more information. Valid Values: The PXIe-4051 supports values from 0 to 39 seconds. The PXIe-4147 supports values from 0 to 26.5 seconds. - The PXIe-4151 supports values from 0 to 42 seconds. + The PXIe-4150/4151 supports values from 0 to 42 seconds. The PXIe-4162/4163 and PXIe-4190 support values from 0 to 23 seconds. All other supported instruments support values from 0 to 167 seconds. Default Value: 0.01667 seconds diff --git a/docs/nidcpower/conf.py b/docs/nidcpower/conf.py index d5ee8dde4..3056a9a28 100644 --- a/docs/nidcpower/conf.py +++ b/docs/nidcpower/conf.py @@ -55,7 +55,7 @@ # General information about the project. project = 'NI-DCPower Python API' -copyright = '2017-2024, National Instruments Corporation' +copyright = '2017-2025, National Instruments Corporation' author = 'NI' # The version info for the project you're documenting, acts as replacement for diff --git a/docs/nidcpower/enums.rst b/docs/nidcpower/enums.rst index e8c6319c3..eab99153f 100644 --- a/docs/nidcpower/enums.rst +++ b/docs/nidcpower/enums.rst @@ -1166,7 +1166,7 @@ OutputStates .. py:class:: OutputStates - .. py:attribute:: OutputStates.VOLTAGE + .. py:attribute:: OutputStates.CONSTANT_VOLTAGE @@ -1176,7 +1176,7 @@ OutputStates - .. py:attribute:: OutputStates.CURRENT + .. py:attribute:: OutputStates.CONSTANT_CURRENT @@ -1186,6 +1186,16 @@ OutputStates + .. py:attribute:: OutputStates.INHIBITED + + + + The channel is in the inhibited state. + + + + + Polarity -------- diff --git a/generated/nidcpower/nidcpower/enums.py b/generated/nidcpower/nidcpower/enums.py index d6fb1fcba..03684e4e4 100644 --- a/generated/nidcpower/nidcpower/enums.py +++ b/generated/nidcpower/nidcpower/enums.py @@ -512,14 +512,18 @@ class OutputFunction(Enum): class OutputStates(Enum): - VOLTAGE = 0 + CONSTANT_VOLTAGE = 0 r''' The channel maintains a constant voltage by adjusting the current. ''' - CURRENT = 1 + CONSTANT_CURRENT = 1 r''' The channel maintains a constant current by adjusting the voltage. ''' + INHIBITED = 1163 + r''' + The channel is in the inhibited state. + ''' class Polarity(Enum): diff --git a/src/nidcpower/metadata/enums.py b/src/nidcpower/metadata/enums.py index 0eebe4ed6..6cbe63a0d 100644 --- a/src/nidcpower/metadata/enums.py +++ b/src/nidcpower/metadata/enums.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# This file is generated from NI-DCPower API metadata version 24.3.0f264 +# This file is generated from NI-DCPower API metadata version 25.0.0d98 enums = { 'ApertureTimeAutoMode': { 'values': [ @@ -994,6 +994,13 @@ }, 'name': 'NIDCPOWER_VAL_OUTPUT_CONSTANT_CURRENT', 'value': 1 + }, + { + 'documentation': { + 'description': 'The channel is in the inhibited state.' + }, + 'name': 'NIDCPOWER_VAL_OUTPUT_INHIBITED', + 'value': 1163 } ] }, From 45f82d1cb53c9dface9ea59c3a7dc0a0bb71d3a0 Mon Sep 17 00:00:00 2001 From: Joshua Kwoon Date: Thu, 2 Jan 2025 02:10:55 -0600 Subject: [PATCH 04/11] Fix enum names for `OutputStates.VOLTAGE` and `OutputStates.CURRENT` --- docs/nidcpower/class.rst | 14 +++++++------- docs/nidcpower/enums.rst | 4 ++-- generated/nidcpower/nidcpower/enums.py | 4 ++-- generated/nidcpower/nidcpower/session.py | 14 +++++++------- src/nidcpower/metadata/enums.py | 3 +++ 5 files changed, 21 insertions(+), 18 deletions(-) diff --git a/docs/nidcpower/class.rst b/docs/nidcpower/class.rst index 9cd579e1a..1e5fc83ef 100644 --- a/docs/nidcpower/class.rst +++ b/docs/nidcpower/class.rst @@ -2480,13 +2480,13 @@ query_output_state Specifies the output state of the channel that is being queried. **Defined Values**: - +-----------------------------------------------------+--------------------------------------------------------------------+ - | :py:data:`~nidcpower.OutputStates.CONSTANT_VOLTAGE` | The channel maintains a constant voltage by adjusting the current. | - +-----------------------------------------------------+--------------------------------------------------------------------+ - | :py:data:`~nidcpower.OutputStates.CONSTANT_CURRENT` | The channel maintains a constant current by adjusting the voltage. | - +-----------------------------------------------------+--------------------------------------------------------------------+ - | :py:data:`~nidcpower.OutputStates.INHIBITED` | The channel is in the inhibited state. | - +-----------------------------------------------------+--------------------------------------------------------------------+ + +----------------------------------------------+--------------------------------------------------------------------+ + | :py:data:`~nidcpower.OutputStates.VOLTAGE` | The channel maintains a constant voltage by adjusting the current. | + +----------------------------------------------+--------------------------------------------------------------------+ + | :py:data:`~nidcpower.OutputStates.CURRENT` | The channel maintains a constant current by adjusting the voltage. | + +----------------------------------------------+--------------------------------------------------------------------+ + | :py:data:`~nidcpower.OutputStates.INHIBITED` | The channel is in the inhibited state. | + +----------------------------------------------+--------------------------------------------------------------------+ :type output_state: :py:data:`nidcpower.OutputStates` diff --git a/docs/nidcpower/enums.rst b/docs/nidcpower/enums.rst index eab99153f..c2848bd41 100644 --- a/docs/nidcpower/enums.rst +++ b/docs/nidcpower/enums.rst @@ -1166,7 +1166,7 @@ OutputStates .. py:class:: OutputStates - .. py:attribute:: OutputStates.CONSTANT_VOLTAGE + .. py:attribute:: OutputStates.VOLTAGE @@ -1176,7 +1176,7 @@ OutputStates - .. py:attribute:: OutputStates.CONSTANT_CURRENT + .. py:attribute:: OutputStates.CURRENT diff --git a/generated/nidcpower/nidcpower/enums.py b/generated/nidcpower/nidcpower/enums.py index 03684e4e4..58a53a9f4 100644 --- a/generated/nidcpower/nidcpower/enums.py +++ b/generated/nidcpower/nidcpower/enums.py @@ -512,11 +512,11 @@ class OutputFunction(Enum): class OutputStates(Enum): - CONSTANT_VOLTAGE = 0 + VOLTAGE = 0 r''' The channel maintains a constant voltage by adjusting the current. ''' - CONSTANT_CURRENT = 1 + CURRENT = 1 r''' The channel maintains a constant current by adjusting the voltage. ''' diff --git a/generated/nidcpower/nidcpower/session.py b/generated/nidcpower/nidcpower/session.py index 21742df53..7457661fb 100644 --- a/generated/nidcpower/nidcpower/session.py +++ b/generated/nidcpower/nidcpower/session.py @@ -6874,13 +6874,13 @@ def query_output_state(self, output_state): output_state (enums.OutputStates): Specifies the output state of the channel that is being queried. **Defined Values**: - +-------------------------------+--------------------------------------------------------------------+ - | OutputStates.CONSTANT_VOLTAGE | The channel maintains a constant voltage by adjusting the current. | - +-------------------------------+--------------------------------------------------------------------+ - | OutputStates.CONSTANT_CURRENT | The channel maintains a constant current by adjusting the voltage. | - +-------------------------------+--------------------------------------------------------------------+ - | OutputStates.INHIBITED | The channel is in the inhibited state. | - +-------------------------------+--------------------------------------------------------------------+ + +------------------------+--------------------------------------------------------------------+ + | OutputStates.VOLTAGE | The channel maintains a constant voltage by adjusting the current. | + +------------------------+--------------------------------------------------------------------+ + | OutputStates.CURRENT | The channel maintains a constant current by adjusting the voltage. | + +------------------------+--------------------------------------------------------------------+ + | OutputStates.INHIBITED | The channel is in the inhibited state. | + +------------------------+--------------------------------------------------------------------+ Returns: diff --git a/src/nidcpower/metadata/enums.py b/src/nidcpower/metadata/enums.py index 6cbe63a0d..a22dc0c0e 100644 --- a/src/nidcpower/metadata/enums.py +++ b/src/nidcpower/metadata/enums.py @@ -986,6 +986,7 @@ 'description': 'The channel maintains a constant voltage by adjusting the current.' }, 'name': 'NIDCPOWER_VAL_OUTPUT_CONSTANT_VOLTAGE', + 'python_name': 'NIDCPOWER_VAL_OUTPUT_VOLTAGE', 'value': 0 }, { @@ -993,6 +994,7 @@ 'description': 'The channel maintains a constant current by adjusting the voltage.' }, 'name': 'NIDCPOWER_VAL_OUTPUT_CONSTANT_CURRENT', + 'python_name': 'NIDCPOWER_VAL_OUTPUT_CURRENT', 'value': 1 }, { @@ -1000,6 +1002,7 @@ 'description': 'The channel is in the inhibited state.' }, 'name': 'NIDCPOWER_VAL_OUTPUT_INHIBITED', + 'python_name': 'NIDCPOWER_VAL_OUTPUT_INHIBITED', 'value': 1163 } ] From 2ccad800f9c165cde2a569e3608ed056b729454c Mon Sep 17 00:00:00 2001 From: Joshua Kwoon Date: Thu, 2 Jan 2025 18:51:32 -0600 Subject: [PATCH 05/11] Generate `conf.py` files for other modules --- docs/nidigital/conf.py | 2 +- docs/nidmm/conf.py | 2 +- docs/nifgen/conf.py | 2 +- docs/nimodinst/conf.py | 2 +- docs/niscope/conf.py | 2 +- docs/nise/conf.py | 2 +- docs/niswitch/conf.py | 2 +- docs/nitclk/conf.py | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/nidigital/conf.py b/docs/nidigital/conf.py index 794b050be..3cba86f45 100644 --- a/docs/nidigital/conf.py +++ b/docs/nidigital/conf.py @@ -55,7 +55,7 @@ # General information about the project. project = 'NI-Digital Pattern Driver Python API' -copyright = '2019-2024, National Instruments Corporation' +copyright = '2019-2025, National Instruments Corporation' author = 'NI' # The version info for the project you're documenting, acts as replacement for diff --git a/docs/nidmm/conf.py b/docs/nidmm/conf.py index 992aa0d2c..6095832af 100644 --- a/docs/nidmm/conf.py +++ b/docs/nidmm/conf.py @@ -55,7 +55,7 @@ # General information about the project. project = 'NI-DMM Python API' -copyright = '2017-2024, National Instruments Corporation' +copyright = '2017-2025, National Instruments Corporation' author = 'NI' # The version info for the project you're documenting, acts as replacement for diff --git a/docs/nifgen/conf.py b/docs/nifgen/conf.py index 7261c899a..ee98850a3 100644 --- a/docs/nifgen/conf.py +++ b/docs/nifgen/conf.py @@ -55,7 +55,7 @@ # General information about the project. project = 'NI-FGEN Python API' -copyright = '2017-2024, National Instruments Corporation' +copyright = '2017-2025, National Instruments Corporation' author = 'NI' # The version info for the project you're documenting, acts as replacement for diff --git a/docs/nimodinst/conf.py b/docs/nimodinst/conf.py index ef86ba023..bff0e172a 100644 --- a/docs/nimodinst/conf.py +++ b/docs/nimodinst/conf.py @@ -55,7 +55,7 @@ # General information about the project. project = 'NI-ModInst Python API' -copyright = '2017-2024, National Instruments Corporation' +copyright = '2017-2025, National Instruments Corporation' author = 'NI' # The version info for the project you're documenting, acts as replacement for diff --git a/docs/niscope/conf.py b/docs/niscope/conf.py index c6df7def9..9f478a91c 100644 --- a/docs/niscope/conf.py +++ b/docs/niscope/conf.py @@ -55,7 +55,7 @@ # General information about the project. project = 'NI-SCOPE Python API' -copyright = '2017-2024, National Instruments Corporation' +copyright = '2017-2025, National Instruments Corporation' author = 'NI' # The version info for the project you're documenting, acts as replacement for diff --git a/docs/nise/conf.py b/docs/nise/conf.py index f4a4ba11c..b2baa30d8 100644 --- a/docs/nise/conf.py +++ b/docs/nise/conf.py @@ -55,7 +55,7 @@ # General information about the project. project = 'NI Switch Executive Python API' -copyright = '2018-2024, National Instruments Corporation' +copyright = '2018-2025, National Instruments Corporation' author = 'NI' # The version info for the project you're documenting, acts as replacement for diff --git a/docs/niswitch/conf.py b/docs/niswitch/conf.py index f6354d9ac..b7feb3663 100644 --- a/docs/niswitch/conf.py +++ b/docs/niswitch/conf.py @@ -55,7 +55,7 @@ # General information about the project. project = 'NI-SWITCH Python API' -copyright = '2017-2024, National Instruments Corporation' +copyright = '2017-2025, National Instruments Corporation' author = 'NI' # The version info for the project you're documenting, acts as replacement for diff --git a/docs/nitclk/conf.py b/docs/nitclk/conf.py index 390efef7b..559f1be98 100644 --- a/docs/nitclk/conf.py +++ b/docs/nitclk/conf.py @@ -55,7 +55,7 @@ # General information about the project. project = 'NI-TClk Python API' -copyright = '2019-2024, National Instruments Corporation' +copyright = '2019-2025, National Instruments Corporation' author = 'NI' # The version info for the project you're documenting, acts as replacement for From bbd9853dac5d16948803e1e1612f1379266a1e0f Mon Sep 17 00:00:00 2001 From: Joshua Kwoon Date: Wed, 8 Jan 2025 19:18:22 -0600 Subject: [PATCH 06/11] Undo manually added `python_names` --- src/nidcpower/metadata/enums.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/nidcpower/metadata/enums.py b/src/nidcpower/metadata/enums.py index a22dc0c0e..6cbe63a0d 100644 --- a/src/nidcpower/metadata/enums.py +++ b/src/nidcpower/metadata/enums.py @@ -986,7 +986,6 @@ 'description': 'The channel maintains a constant voltage by adjusting the current.' }, 'name': 'NIDCPOWER_VAL_OUTPUT_CONSTANT_VOLTAGE', - 'python_name': 'NIDCPOWER_VAL_OUTPUT_VOLTAGE', 'value': 0 }, { @@ -994,7 +993,6 @@ 'description': 'The channel maintains a constant current by adjusting the voltage.' }, 'name': 'NIDCPOWER_VAL_OUTPUT_CONSTANT_CURRENT', - 'python_name': 'NIDCPOWER_VAL_OUTPUT_CURRENT', 'value': 1 }, { @@ -1002,7 +1000,6 @@ 'description': 'The channel is in the inhibited state.' }, 'name': 'NIDCPOWER_VAL_OUTPUT_INHIBITED', - 'python_name': 'NIDCPOWER_VAL_OUTPUT_INHIBITED', 'value': 1163 } ] From b0767b425033d43640f89c846612572bd8c043ac Mon Sep 17 00:00:00 2001 From: Joshua Kwoon Date: Wed, 8 Jan 2025 19:18:47 -0600 Subject: [PATCH 07/11] Regenerate files --- docs/nidcpower/class.rst | 14 +++++++------- docs/nidcpower/enums.rst | 4 ++-- generated/nidcpower/nidcpower/enums.py | 4 ++-- generated/nidcpower/nidcpower/session.py | 14 +++++++------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/nidcpower/class.rst b/docs/nidcpower/class.rst index 1e5fc83ef..9cd579e1a 100644 --- a/docs/nidcpower/class.rst +++ b/docs/nidcpower/class.rst @@ -2480,13 +2480,13 @@ query_output_state Specifies the output state of the channel that is being queried. **Defined Values**: - +----------------------------------------------+--------------------------------------------------------------------+ - | :py:data:`~nidcpower.OutputStates.VOLTAGE` | The channel maintains a constant voltage by adjusting the current. | - +----------------------------------------------+--------------------------------------------------------------------+ - | :py:data:`~nidcpower.OutputStates.CURRENT` | The channel maintains a constant current by adjusting the voltage. | - +----------------------------------------------+--------------------------------------------------------------------+ - | :py:data:`~nidcpower.OutputStates.INHIBITED` | The channel is in the inhibited state. | - +----------------------------------------------+--------------------------------------------------------------------+ + +-----------------------------------------------------+--------------------------------------------------------------------+ + | :py:data:`~nidcpower.OutputStates.CONSTANT_VOLTAGE` | The channel maintains a constant voltage by adjusting the current. | + +-----------------------------------------------------+--------------------------------------------------------------------+ + | :py:data:`~nidcpower.OutputStates.CONSTANT_CURRENT` | The channel maintains a constant current by adjusting the voltage. | + +-----------------------------------------------------+--------------------------------------------------------------------+ + | :py:data:`~nidcpower.OutputStates.INHIBITED` | The channel is in the inhibited state. | + +-----------------------------------------------------+--------------------------------------------------------------------+ :type output_state: :py:data:`nidcpower.OutputStates` diff --git a/docs/nidcpower/enums.rst b/docs/nidcpower/enums.rst index c2848bd41..eab99153f 100644 --- a/docs/nidcpower/enums.rst +++ b/docs/nidcpower/enums.rst @@ -1166,7 +1166,7 @@ OutputStates .. py:class:: OutputStates - .. py:attribute:: OutputStates.VOLTAGE + .. py:attribute:: OutputStates.CONSTANT_VOLTAGE @@ -1176,7 +1176,7 @@ OutputStates - .. py:attribute:: OutputStates.CURRENT + .. py:attribute:: OutputStates.CONSTANT_CURRENT diff --git a/generated/nidcpower/nidcpower/enums.py b/generated/nidcpower/nidcpower/enums.py index 58a53a9f4..03684e4e4 100644 --- a/generated/nidcpower/nidcpower/enums.py +++ b/generated/nidcpower/nidcpower/enums.py @@ -512,11 +512,11 @@ class OutputFunction(Enum): class OutputStates(Enum): - VOLTAGE = 0 + CONSTANT_VOLTAGE = 0 r''' The channel maintains a constant voltage by adjusting the current. ''' - CURRENT = 1 + CONSTANT_CURRENT = 1 r''' The channel maintains a constant current by adjusting the voltage. ''' diff --git a/generated/nidcpower/nidcpower/session.py b/generated/nidcpower/nidcpower/session.py index 7457661fb..21742df53 100644 --- a/generated/nidcpower/nidcpower/session.py +++ b/generated/nidcpower/nidcpower/session.py @@ -6874,13 +6874,13 @@ def query_output_state(self, output_state): output_state (enums.OutputStates): Specifies the output state of the channel that is being queried. **Defined Values**: - +------------------------+--------------------------------------------------------------------+ - | OutputStates.VOLTAGE | The channel maintains a constant voltage by adjusting the current. | - +------------------------+--------------------------------------------------------------------+ - | OutputStates.CURRENT | The channel maintains a constant current by adjusting the voltage. | - +------------------------+--------------------------------------------------------------------+ - | OutputStates.INHIBITED | The channel is in the inhibited state. | - +------------------------+--------------------------------------------------------------------+ + +-------------------------------+--------------------------------------------------------------------+ + | OutputStates.CONSTANT_VOLTAGE | The channel maintains a constant voltage by adjusting the current. | + +-------------------------------+--------------------------------------------------------------------+ + | OutputStates.CONSTANT_CURRENT | The channel maintains a constant current by adjusting the voltage. | + +-------------------------------+--------------------------------------------------------------------+ + | OutputStates.INHIBITED | The channel is in the inhibited state. | + +-------------------------------+--------------------------------------------------------------------+ Returns: From bb0055daa52a459beb5324e388589fe771a7f11e Mon Sep 17 00:00:00 2001 From: Joshua Kwoon Date: Wed, 8 Jan 2025 19:21:13 -0600 Subject: [PATCH 08/11] Remove documentation changes from changelog --- CHANGELOG.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bbf78210..b2f906fa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,12 +46,6 @@ All notable changes to this project will be documented in this file. * Enum value added: * `INHIBITED` added to enum `OutputStates`. * #### Changed - * Function documentation updated: - * `query_output_state` - * Updated enum descriptions for the `output_state` arg. - * Attribute documentation updated: - * `measure_buffer_size`, `measure_complete_event_delay`, and `source_delay` descriptions updated to specify `PXIe-4150/4151` instead of `PXIe-4151`. - * Updated `merged_channels` description wording. * #### Removed * ### `nidigital` (NI-Digital Pattern Driver) * #### Added From 7063e875970227894201df4bddbd5eb2dd3dd305 Mon Sep 17 00:00:00 2001 From: Joshua Kwoon Date: Wed, 8 Jan 2025 19:33:13 -0600 Subject: [PATCH 09/11] Document breaking changes with regards to `OutputStates` enum --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2f906fa0..d9d40880f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,9 @@ All notable changes to this project will be documented in this file. * Enum value added: * `INHIBITED` added to enum `OutputStates`. * #### Changed + * **[Source Breaker]:** Enum value names in `OutputStates` have been changed: + * `OutputStates.VOLTAGE` -> `OutputStates.CONSTANT_VOLTAGE` + * `OutputStates.CURRENT` -> `OutputStates.CONSTANT_CURRENT` * #### Removed * ### `nidigital` (NI-Digital Pattern Driver) * #### Added From f42071f9037e0387071c7b9a04b0919668c614f0 Mon Sep 17 00:00:00 2001 From: Joshua Kwoon Date: Wed, 8 Jan 2025 20:31:54 -0600 Subject: [PATCH 10/11] Update `test_query_output_state` unit test for the changed enum value names --- src/nidcpower/system_tests/test_system_nidcpower.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nidcpower/system_tests/test_system_nidcpower.py b/src/nidcpower/system_tests/test_system_nidcpower.py index 4b169f8ed..6abacd27e 100644 --- a/src/nidcpower/system_tests/test_system_nidcpower.py +++ b/src/nidcpower/system_tests/test_system_nidcpower.py @@ -175,8 +175,8 @@ def test_measure(self, session): @pytest.mark.channels('0') def test_query_output_state(self, session): with session.initiate(): - assert session.query_output_state(nidcpower.OutputStates.VOLTAGE) is True # since default function is DCVolt when initiated output state for DC Volt\DC current should be True and False respectively - assert session.query_output_state(nidcpower.OutputStates.CURRENT) is False + assert session.query_output_state(nidcpower.OutputStates.CONSTANT_VOLTAGE) is True # since default function is DCVolt when initiated output state for DC Volt\DC current should be True and False respectively + assert session.query_output_state(nidcpower.OutputStates.CONSTANT_CURRENT) is False @pytest.mark.channels('0') def test_config_aperture_time(self, session): From 769a531c306bb850c3b4e7dcd2d08124efb6f5f4 Mon Sep 17 00:00:00 2001 From: Joshua Kwoon Date: Wed, 15 Jan 2025 19:59:38 -0600 Subject: [PATCH 11/11] Updated changelog to reference #2067 --- CHANGELOG.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9d40880f..10acff81d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,9 +46,7 @@ All notable changes to this project will be documented in this file. * Enum value added: * `INHIBITED` added to enum `OutputStates`. * #### Changed - * **[Source Breaker]:** Enum value names in `OutputStates` have been changed: - * `OutputStates.VOLTAGE` -> `OutputStates.CONSTANT_VOLTAGE` - * `OutputStates.CURRENT` -> `OutputStates.CONSTANT_CURRENT` + * Fixed #2067: `nidcpower.OutputStates` values are incorrect. * #### Removed * ### `nidigital` (NI-Digital Pattern Driver) * #### Added