From 4eb862408081a48bf127a0eb251266592c1cf9c2 Mon Sep 17 00:00:00 2001 From: NI-velmurugan Date: Wed, 7 Oct 2026 19:45:14 +0530 Subject: [PATCH 1/4] Add @Avinash2Suresh as a code owner --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 17a4e6de4d..dac883d426 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @marcoskirsch @ni-jfitzger @vnktshr21 +* @marcoskirsch @ni-jfitzger @vnktshr21 @Avinash2Suresh From e7671a2e1f2fb62160fbbf76955a7f30db75825e Mon Sep 17 00:00:00 2001 From: "Selvam, Divakar" Date: Tue, 13 Oct 2026 15:53:46 +0530 Subject: [PATCH 2/4] add: add Measure Temperature RTD example for nidmm --- CHANGELOG.md | 1 + docs/nidmm/examples.rst | 9 +++ .../examples/nidmm_measure_temperature_rtd.py | 55 +++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 src/nidmm/examples/nidmm_measure_temperature_rtd.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 86a8d9eb38..7157eabd61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -799,6 +799,7 @@ #### [nidmm] Unreleased - Added - Added the `nidmm_measure_ac_volts.py` example. + - Added the `nidmm_measure_temperature_rtd.py` example. - (Common) Added `nitlsconfig[grpc]>=1.0.0a2` to the optional gRPC dependencies. - Changed - Removed diff --git a/docs/nidmm/examples.rst b/docs/nidmm/examples.rst index ec6b3ee3e4..e1824f0691 100644 --- a/docs/nidmm/examples.rst +++ b/docs/nidmm/examples.rst @@ -21,6 +21,15 @@ nidmm_measure_ac_volts.py :encoding: utf8 :caption: `(nidmm_measure_ac_volts.py) `_ +nidmm_measure_temperature_rtd.py +-------------------------------- + +.. literalinclude:: ../../src/nidmm/examples/nidmm_measure_temperature_rtd.py + :language: python + :linenos: + :encoding: utf8 + :caption: `(nidmm_measure_temperature_rtd.py) `_ + nidmm_measurement.py -------------------- diff --git a/src/nidmm/examples/nidmm_measure_temperature_rtd.py b/src/nidmm/examples/nidmm_measure_temperature_rtd.py new file mode 100644 index 0000000000..c99179d586 --- /dev/null +++ b/src/nidmm/examples/nidmm_measure_temperature_rtd.py @@ -0,0 +1,55 @@ +#!/usr/bin/python + +import argparse +import nidmm +import sys + + +def example(resource_name, options, function, transducer_type, rtd_type, rtd_resistance, rtd_a, rtd_b, rtd_c, range, digits): + with nidmm.Session(resource_name=resource_name, options=options) as session: + session.configure_measurement_digits(measurement_function=nidmm.Function[function], range=range, resolution_digits=digits) + session.temp_transducer_type = nidmm.TransducerType[transducer_type] + session.configure_rtd_type(nidmm.RTDType[rtd_type], rtd_resistance) + # The A, B, and C coefficients apply only to the CUSTOM RTD type; the driver chooses them for the other types + if rtd_type == 'CUSTOM': + session.configure_rtd_custom(rtd_a, rtd_b, rtd_c) + measurement = session.read() + print(f'Measurement (Celsius): {measurement}') + + +def _main(argsv): + supported_functions = list(nidmm.Function.__members__.keys()) + supported_transducer_types = list(nidmm.TransducerType.__members__.keys()) + supported_rtd_types = list(nidmm.RTDType.__members__.keys()) + parser = argparse.ArgumentParser(description='Performs a single temperature measurement using an RTD with the NI-DMM API.', formatter_class=argparse.ArgumentDefaultsHelpFormatter) + parser.add_argument('-n', '--resource-name', default='PXI1Slot2', help='Contains the resource_name of the device to initialize.') + parser.add_argument('-f', '--function', default='TEMPERATURE', choices=supported_functions, type=str.upper, help='Specifies the measurement_function used to acquire the measurement.') + parser.add_argument('--transducer-type', default='TWO_WIRE_RTD', choices=supported_transducer_types, type=str.upper, help='Specifies the type of device used to measure the temperature.') + parser.add_argument('-t', '--rtd-type', default='PT3851', choices=supported_rtd_types, type=str.upper, help='Specifies the type of RTD used to measure the temperature resistance.') + parser.add_argument('--rtd-resistance', default=100.0, type=float, help='Specifies the RTD resistance in ohms at 0 degrees Celsius.') + parser.add_argument('--rtd-a', default=0.0039083, type=float, help='Specifies the Callendar-Van Dusen A coefficient for RTD scaling when RTD Type parameter is set to Custom in the configure_rtd_type method.') + parser.add_argument('--rtd-b', default=-5.775e-7, type=float, help='Specifies the Callendar-Van Dusen B coefficient for RTD scaling when RTD Type parameter is set to Custom in the configure_rtd_type method.') + parser.add_argument('--rtd-c', default=-4.183e-12, type=float, help='Specifies the Callendar-Van Dusen C coefficient for RTD scaling when RTD Type parameter is set to Custom in the configure_rtd_type method.') + parser.add_argument('-r', '--range', default=10000.0, type=float, help='Specifies the range of the measurement in ohms.') + parser.add_argument('-d', '--digits', default=5.5, type=float, help='Specifies the resolution of the measurement in digits.') + parser.add_argument('-op', '--option-string', default='', type=str, help='Sets the initial value of certain attributes for the session.') + args = parser.parse_args(argsv) + example(args.resource_name, args.option_string, args.function, args.transducer_type, args.rtd_type, args.rtd_resistance, args.rtd_a, args.rtd_b, args.rtd_c, args.range, args.digits) + + +def main(): + _main(sys.argv[1:]) + + +def test_example(): + options = {'simulate': True, 'driver_setup': {'Model': '4082', 'BoardType': 'PXIe', }, } + example('PXI1Slot2', options, 'TEMPERATURE', 'TWO_WIRE_RTD', 'PT3851', 100.0, 0.0039083, -5.775e-7, -4.183e-12, 10000.0, 5.5) + + +def test_main(): + cmd_line = ['--option-string', 'Simulate=1, DriverSetup=Model:4082; BoardType:PXIe', ] + _main(cmd_line) + + +if __name__ == '__main__': + main() From 6bc8bae81efdd5f6e31e81ea7a8c7164f93d4207 Mon Sep 17 00:00:00 2001 From: "Selvam, Divakar" Date: Tue, 13 Oct 2026 15:59:10 +0530 Subject: [PATCH 3/4] Revert CODEOWNERS owner addition --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index dac883d426..17a4e6de4d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @marcoskirsch @ni-jfitzger @vnktshr21 @Avinash2Suresh +* @marcoskirsch @ni-jfitzger @vnktshr21 From c5e5dc6dd8bd6c7a4139c2a0b77e597357f81c4a Mon Sep 17 00:00:00 2001 From: "Selvam, Divakar" Date: Tue, 13 Oct 2026 18:49:04 +0530 Subject: [PATCH 4/4] Trigger CI build