ni / nidaqmx-python

A Python API for interacting with NI-DAQmx
Other
413 stars 155 forks source link

Add Counter Input examples #581

Closed WayneDroid closed 2 months ago

WayneDroid commented 2 months ago

What does this Pull Request accomplish?

Why should this Pull Request be merged?

Add CI examples for release 1.0.

What testing has been done?

run poetry run pytest tests/ -q - pass image

run CI examples on physical device PXIe-6363:

C:\dev\repo2\nidaqmx-python>poetry run python examples/counter_in/cnt_dig_buff_cont_ext_clk.py                    
Continuously polling. Press Ctrl+C to stop.
Acquired data: 1000 samples. Total 4000.
Acquired 4000 total samples.

C:\dev\repo2\nidaqmx-python>poetry run python examples/counter_in/cnt_dig_event.py            
Continuously polling. Press Ctrl+C to stop.
Acquired count: 2798

C:\dev\repo2\nidaqmx-python>poetry run python examples/counter_in/cont_acq_freq_wfm_impl_time.py
Continuously polling. Press Ctrl+C to stop.
Acquired data: 1000 samples. Total 5000.
Acquired 5000 total samples.

C:\dev\repo2\nidaqmx-python>poetry run python examples/counter_in/cont_acq_freq_wfm_large_range_2_cnt_impl_time.py
Continuously polling. Press Ctrl+C to stop.
Acquired data: 1000 samples. Total 18000.
Acquired 18000 total samples.

C:\dev\repo2\nidaqmx-python>poetry run python examples/counter_in/read_freq_low_freq_1_cnt.py   
Acquired frequency: 999.99 Hz

C:\dev\repo2\nidaqmx-python>poetry run python examples/counter_in/read_pulse_freq.py         
Acquired data:
Frequency: 999.99 Hz
Duty cycle: 50.00%