Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multi-function synchronization examples #589

Merged
merged 6 commits into from
May 31, 2024

Conversation

WayneDroid
Copy link
Collaborator

@WayneDroid WayneDroid commented May 27, 2024

What does this Pull Request accomplish?

  • add multi-function synchronization examples
  • add analog acquisition on digital reference example (miss out from last PR)
  • minor update on callback function for every n samples event example

Why should this Pull Request be merged?

Synchronization examples are required to be released with version 1.0 as specified in the feature scope.

What testing has been done?

run poetry run pytest tests -q - pass
image

run examples on physical devices PXIe-6363 - okay

C:\dev\repo2\nidaqmx-python>poetry run python examples\multi-functions-synchronization\cont_ai_di_acq.py
Acquiring samples continuously. Press Enter to stop.

Read:   AI      DI      Total:  AI      DI
        1000    1000            4000    4000

C:\dev\repo2\nidaqmx-python>poetry run python examples\multi-functions-synchronization\ai_ao_sync.py    
Actual sampling rate: 1000 S/s
Acquiring samples continuously. Press Enter to stop.
Acquired data: 1000 samples. Total 5000.

Acquired 5000 total samples.

C:\dev\repo2\nidaqmx-python>poetry run python examples\analog_in\voltage_acq_int_clk_dig_ref.py     
Acquired data: [0.802982, 0.803466, 0.803144, 0.803144, 0.802982, 0.802177, 0.801533, 0.800889, 0.800083, 0.799922, 0.799439, 0.798956, 0.799439, 0.799278, 0.799761, 0.800244, 0.800728, 0.801694, 0.802016, 0.802660, 0.802982, 0.803144, 0.803144, 0.802982, 0.802660, 0.802338, 0.801694, 0.800889, 0.800405, 0.799761, 0.799600, 0.799117, 0.799117, 0.799600, 0.799761, 0.800083, 0.800889, 0.801533, 0.801855, 0.802499, 0.802982, 0.803305, 0.803144, 0.802821, 0.802499, 0.802499, 0.801533, 0.800889, 0.800728, 0.799922, 0.799761, 0.799117, 0.799278, 0.799278, 0.799761, 0.800244, 0.801050, 0.801694, 0.801855, 0.802660, 0.803144, 0.803466, 0.803466, 0.803144, 0.802821, 0.802338, 0.801694, 0.800889, 0.800567, 0.799922, 0.799439, 0.799117, 0.799278, 0.799439, 0.799439, 0.800567, 0.801050, 0.801372, 0.802016, 0.802660, 0.803144, 0.803466, 0.803144, 0.803305, 0.802982, 0.802338, 0.801694, 0.800889, 0.800405, 0.799922, 0.799439, 0.799439, 0.799439, 0.799278, 0.799761, 0.800405, 0.800889, 0.801533, 0.802177, 0.802499]

Copy link
Collaborator

@zhindes zhindes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor issues

examples/multi-functions-synchronization/ai_ao_sync.py Outdated Show resolved Hide resolved
examples/multi-functions-synchronization/ai_ao_sync.py Outdated Show resolved Hide resolved
examples/multi-functions-synchronization/cont_ai_di_acq.py Outdated Show resolved Hide resolved
examples/multi-functions-synchronization/cont_ai_di_acq.py Outdated Show resolved Hide resolved
examples/multi-functions-synchronization/cont_ai_di_acq.py Outdated Show resolved Hide resolved
examples/multi-functions-synchronization/ai_ao_sync.py Outdated Show resolved Hide resolved
examples/multi-functions-synchronization/ai_ao_sync.py Outdated Show resolved Hide resolved
examples/multi-functions-synchronization/ai_ao_sync.py Outdated Show resolved Hide resolved
examples/multi-functions-synchronization/ai_ao_sync.py Outdated Show resolved Hide resolved
examples/multi-functions-synchronization/ai_ao_sync.py Outdated Show resolved Hide resolved
examples/multi-functions-synchronization/ai_ao_sync.py Outdated Show resolved Hide resolved
@WayneDroid WayneDroid changed the title Users/waynedroid/add sync examples Add multi-function synchronization examples May 29, 2024
Copy link
Collaborator

@bkeryan bkeryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with suggestions

examples/synchronization/multi_function/ai_ao_sync.py Outdated Show resolved Hide resolved
@WayneDroid WayneDroid merged commit cc140f7 into ni:master May 31, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants