Skip to content

Commit 2733a11

Browse files
committed
Merge remote-tracking branch 'upstream/master' into users/kosta/fix-several-api-typos
2 parents efc279b + 0dfd55f commit 2733a11

18 files changed

+1012
-666
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
codegen-python-version: "3.9"
1717
steps:
1818
- name: Check out repo
19-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
19+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2020
with:
2121
submodules: true
2222
- name: Set up Python

.github/workflows/generate_docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ jobs:
1010
- ubuntu-latest
1111
steps:
1212
- name: Check out repo
13-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
13+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1414
- name: Set up Python
1515
uses: ni/python-actions/setup-python@aa64e60612cb078b0c2ada666becbd70d4817d55 # v0.7.1
1616
id: setup-python
1717
- name: Set up Poetry
1818
uses: ni/python-actions/setup-poetry@aa64e60612cb078b0c2ada666becbd70d4817d55 # v0.7.1
1919
- name: Cache virtualenvs
20-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
20+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
2121
with:
2222
path: |
2323
.venv

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
needs: [check_nidaqmx, check_docs]
4444
steps:
4545
- name: Check out repo
46-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
46+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4747
- name: Set up Python
4848
uses: ni/python-actions/setup-python@aa64e60612cb078b0c2ada666becbd70d4817d55 # v0.7.1
4949
- name: Set up Poetry
@@ -54,7 +54,7 @@ jobs:
5454
- name: Build distribution packages
5555
run: poetry build
5656
- name: Upload build artifacts
57-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
57+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
5858
with:
5959
name: ${{ env.dist-artifact-name }}
6060
path: dist/*
@@ -71,7 +71,7 @@ jobs:
7171
id-token: write
7272
steps:
7373
- name: Download build artifacts
74-
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
74+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
7575
with:
7676
name: ${{ env.dist-artifact-name }}
7777
path: dist/
@@ -89,7 +89,7 @@ jobs:
8989
pull-requests: write
9090
steps:
9191
- name: Check out repo
92-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
92+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
9393
- name: Set up Python
9494
uses: ni/python-actions/setup-python@aa64e60612cb078b0c2ada666becbd70d4817d55 # v0.7.1
9595
- name: Set up Poetry

.github/workflows/report_test_results.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ jobs:
1414
pull-requests: write
1515
steps:
1616
- name: Check out repo
17-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1818
- name: Download test results
19-
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
19+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
2020
with:
2121
path: test_results
2222
pattern: test_results_*
2323
merge-multiple: true
2424
- name: List downloaded files
2525
run: ls -lR
2626
- name: Publish test results
27-
uses: EnricoMi/publish-unit-test-result-action@34d7c956a59aed1bfebf31df77b8de55db9bbaaf # v2.21.0
27+
uses: EnricoMi/publish-unit-test-result-action@27d65e188ec43221b20d26de30f4892fad91df2f # v2.22.0
2828
with:
2929
files: "test_results/*.xml"

.github/workflows/run_system_tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
timeout-minutes: 90
2121
steps:
2222
- name: Check out repo
23-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
23+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2424
- name: Import DAQmx config
2525
run: C:\nidaqmxconfig\targets\win64U\x64\msvc-14.0\release\nidaqmxconfig.exe --eraseconfig --import tests\max_config\nidaqmxMaxConfig.ini
2626
- name: Set up Python
2727
uses: ni/python-actions/setup-python@aa64e60612cb078b0c2ada666becbd70d4817d55 # v0.7.1
2828
- name: Set up Poetry
2929
uses: ni/python-actions/setup-poetry@aa64e60612cb078b0c2ada666becbd70d4817d55 # v0.7.1
3030
- name: Cache virtualenvs
31-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
31+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
3232
with:
3333
path: |
3434
.venv
@@ -49,7 +49,7 @@ jobs:
4949
done
5050
if: always() && runner.os != 'Windows'
5151
- name: Upload test results
52-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
52+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
5353
with:
5454
name: test_results_system_${{ matrix.configuration }}
5555
path: test_results/*.xml

.github/workflows/run_unit_tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
pytest-opts: ${{ (startsWith(matrix.python-version, 'pypy') || matrix.python-version == '3.14t') && '-k "not grpc"' || '' }}
2222
steps:
2323
- name: Check out repo
24-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
24+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2525
- name: Set up Python ${{ matrix.python-version }}
2626
uses: ni/python-actions/setup-python@aa64e60612cb078b0c2ada666becbd70d4817d55 # v0.7.1
2727
id: setup-python
@@ -30,7 +30,7 @@ jobs:
3030
- name: Set up Poetry
3131
uses: ni/python-actions/setup-poetry@aa64e60612cb078b0c2ada666becbd70d4817d55 # v0.7.1
3232
- name: Cache virtualenv (with test dependencies)
33-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
33+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
3434
with:
3535
path: .venv
3636
key: nidaqmx-with-test-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
@@ -39,7 +39,7 @@ jobs:
3939
- name: Run unit tests
4040
run: poetry run pytest -v --cov=generated/nidaqmx --junitxml=test_results/unit-${{ matrix.os }}-py${{ matrix.python-version }}.xml tests/unit ${{ env.pytest-opts }}
4141
- name: Upload test results
42-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
42+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
4343
with:
4444
name: test_results_unit_${{ matrix.os }}_py${{ matrix.python-version }}
4545
path: test_results/*.xml
@@ -54,7 +54,7 @@ jobs:
5454
python-version: ["3.10", "3.13", "pypy3.11"]
5555
steps:
5656
- name: Check out repo
57-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
57+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5858
- name: Set up Python ${{ matrix.python-version }}
5959
uses: ni/python-actions/setup-python@aa64e60612cb078b0c2ada666becbd70d4817d55 # v0.7.1
6060
id: setup-python
@@ -63,7 +63,7 @@ jobs:
6363
- name: Set up Poetry
6464
uses: ni/python-actions/setup-poetry@aa64e60612cb078b0c2ada666becbd70d4817d55 # v0.7.1
6565
- name: Cache virtualenv (main only)
66-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
66+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
6767
id: cache-nidaqmx-main-only
6868
with:
6969
path: .venv
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"""Example of analog input calculated power acquisition.
2+
3+
This example demonstrates how to acquire a finite amount
4+
of calculated power data using the DAQ device's internal clock.
5+
6+
Supported Devices:
7+
8+
- PXIe-4311 (DAQmx 26.3.0 or later)
9+
"""
10+
11+
import nidaqmx
12+
from nidaqmx.constants import READ_ALL_AVAILABLE, AcquisitionType
13+
14+
with nidaqmx.Task() as task:
15+
task.ai_channels.add_ai_calculated_power_chan(
16+
voltage_physical_channel="Dev1/ai0",
17+
current_physical_channel="Dev1/ai1",
18+
voltage_min_val=0.0,
19+
voltage_max_val=5.0,
20+
current_min_val=0.0,
21+
current_max_val=0.02,
22+
ext_shunt_resistor_val=249.0,
23+
)
24+
25+
task.timing.cfg_samp_clk_timing(1000.0, sample_mode=AcquisitionType.FINITE, samps_per_chan=50)
26+
27+
data = task.read(READ_ALL_AVAILABLE)
28+
print("Acquired data: [" + ", ".join(f"{value:f}" for value in data) + "]")
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
"""Example of analog input calculated power acquisition.
2+
3+
This example demonstrates how to acquire a continuous amount of
4+
calculated power data using the DAQ device's internal clock.
5+
6+
Supported Devices:
7+
8+
- PXIe-4311 (DAQmx 26.3.0 or later)
9+
"""
10+
11+
import nidaqmx
12+
from nidaqmx.constants import AcquisitionType
13+
14+
with nidaqmx.Task() as task:
15+
task.ai_channels.add_ai_calculated_power_chan(
16+
voltage_physical_channel="Dev1/ai0",
17+
current_physical_channel="Dev1/ai1",
18+
voltage_min_val=0.0,
19+
voltage_max_val=5.0,
20+
current_min_val=0.0,
21+
current_max_val=0.02,
22+
ext_shunt_resistor_val=249.0,
23+
)
24+
task.timing.cfg_samp_clk_timing(1000.0, sample_mode=AcquisitionType.CONTINUOUS)
25+
task.start()
26+
print("Running task. Press Ctrl+C to stop.")
27+
28+
try:
29+
total_read = 0
30+
while True:
31+
data = task.read(number_of_samples_per_channel=1000)
32+
read = len(data)
33+
total_read += read
34+
print(f"Acquired data: {read} samples. Total {total_read}.", end="\r")
35+
except KeyboardInterrupt:
36+
pass
37+
finally:
38+
task.stop()
39+
print(f"\nAcquired {total_read} total samples.")

examples/analog_in/voltage_acq_int_clk_plot_wfm.py

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,41 @@
66
"""
77

88
import matplotlib.pyplot as plot
9+
import numpy as np
910

1011
import nidaqmx
1112
from nidaqmx.constants import READ_ALL_AVAILABLE, AcquisitionType
1213

14+
15+
def plot_analog_waveform(waveform, min_start_time=None):
16+
"""Plot a single analog waveform."""
17+
# For multiplexed devices, each channel has a different time offset, based on the AI Convert
18+
# Clock rate. Calculate the time offset for this channel by subtracting the minimum start time.
19+
time_offset = 0.0
20+
if min_start_time is not None:
21+
time_offset = (waveform.timing.start_time - min_start_time).total_seconds()
22+
duration = waveform.sample_count * waveform.timing.sample_interval.total_seconds()
23+
time_data = np.linspace(
24+
time_offset, time_offset + duration, waveform.sample_count, endpoint=False
25+
)
26+
plot.plot(time_data, waveform.scaled_data, label=waveform.channel_name)
27+
28+
1329
with nidaqmx.Task() as task:
1430
task.ai_channels.add_ai_voltage_chan("Dev1/ai0")
1531
task.timing.cfg_samp_clk_timing(1000.0, sample_mode=AcquisitionType.FINITE, samps_per_chan=50)
1632

17-
waveform = task.read_waveform(READ_ALL_AVAILABLE)
33+
waveforms = task.read_waveform(READ_ALL_AVAILABLE)
34+
if not isinstance(waveforms, list):
35+
waveforms = [waveforms]
1836

19-
timestamps = list(waveform.timing.get_timestamps(0, waveform.sample_count))
20-
time_offsets = [(ts - timestamps[0]).total_seconds() for ts in timestamps]
21-
plot.plot(time_offsets, waveform.scaled_data)
37+
min_start_time = min(waveform.timing.start_time for waveform in waveforms)
38+
for waveform in waveforms:
39+
plot_analog_waveform(waveform, min_start_time)
2240
plot.xlabel("Seconds")
23-
plot.ylabel(waveform.units)
24-
plot.title(waveform.channel_name)
41+
plot.ylabel(waveforms[0].units) # assume all channels have the same units
42+
plot.title("Waveforms")
43+
plot.legend()
2544
plot.grid(True)
2645

2746
plot.show()

generated/nidaqmx/_installer_metadata.json

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
11
{
22
"Windows": [
33
{
4-
"Version": "25.8.0",
5-
"Release": "2025Q4",
6-
"Location": "https://download.ni.com/support/nipkg/products/ni-d/ni-daqmx/25.8/online/ni-daqmx_25.8_online.exe",
4+
"Version": "26.0.0",
5+
"Release": "2026Q1",
6+
"Location": "https://download.ni.com/support/nipkg/products/ni-d/ni-daqmx/26.0/online/ni-daqmx_26.0_online.exe",
77
"supportedOS": [
88
"Windows 11",
9+
"Windows Server 2025",
910
"Windows Server 2022 64-bit",
10-
"Windows 10 64-bit",
11-
"Windows Server 2016 64-bit",
12-
"Windows Server 2019 64-bit"
11+
"Windows 10 IoT Enterprise 2021"
1312
]
1413
}
1514
],
1615
"Linux": [
1716
{
18-
"Version": "25.8.0",
19-
"Release": "2025Q4",
17+
"Version": "26.0.0",
18+
"Release": "2026Q1",
2019
"_comment": "Location url must be of the format 'https://download.ni.com/support/softlib/MasterRepository/LinuxDrivers<Release>/NILinux<Release>DeviceDrivers.zip'. Any change to the format will require a change in the code.",
21-
"Location": "https://download.ni.com/support/softlib/MasterRepository/LinuxDrivers2025Q4/NILinux2025Q4DeviceDrivers.zip",
20+
"Location": "https://download.ni.com/support/softlib/MasterRepository/LinuxDrivers2026Q1/NILinux2026Q1DeviceDrivers.zip",
2221
"supportedOS": [
23-
"ubuntu 20.04",
2422
"ubuntu 22.04",
2523
"ubuntu 24.04",
2624
"rhel 8",
2725
"rhel 9",
28-
"opensuse 15.4",
29-
"opensuse 15.5"
26+
"opensuse 15.5",
27+
"opensuse 15.6"
3028
]
3129
}
3230
]

0 commit comments

Comments
 (0)