Repository navigation
Add the NIDAQmx_Waveform actuator (waveforms on several analog outputs) - #60
Merged
Merged
Conversation
…s with one task The position is one array of samples per output. The plugin follows the waveform output contract of pymodaq_plugins_utils (capabilities and user choices as settings groups, check of what is sent): finite, repeated and continuous generation, external clock, start trigger. ClockSettings gets an optional buffer size for the regeneration of a continuous output, NIDAQSystem the minimum rate and the start trigger of the analog outputs. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKuN81tBxMB6iaf8J6KLJL
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKuN81tBxMB6iaf8J6KLJL
Contributor
Author
|
The Generated by Claude Code |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKuN81tBxMB6iaf8J6KLJL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Actuator
NIDAQmx_Waveformthat plays waveforms (arrays of samples) on several analog outputs of one device with a single task: one clock, one start. First plugin built on the waveform output contract (pymodaq_plugins_utils.hardware.waveform_output, merged in utils #20), so the Dashboard extension ofpymodaq_plugins_waveformcan read what the device can do, check what it sends, and send the samples as the position of the actuator.Plugin
DataActuatorwith one array (V) per chosen output. Outputs are picked in a list; outputs of several devices, or none, are refused.Waveform capabilities(read only: channels,ao_min_rate/ao_max_rateof the device, voltage range, modes, PFI terminals if the device accepts an AO start trigger, max samples,live_updateFalse) andWaveform output(sample rate, mode, repetitions), plus external sample clock, start trigger (PFI + edge), max samples.WaveformOutput.checkon the samples: wrong channel count, too many samples, rate, mode or voltage range give a clearValueError, and nothing is played.generation_done(driver status). A new waveform replaces the running one with a break; outputs are at 0 V at start, after stop and at close.API additions (backward compatible):
ClockSettings(buffer=n)for the buffer of a continuous output,NIDAQSystem.ao_min_rate, andsupports_start_triggeracceptsChannelKind.AO.Tests: 14 new tests with the driver double (tasks, timing, trigger, write shape, limits, end of generation, stop/close, refusals) and 3 for the API additions. Whole suite: 254 passed; 2 tests of
test_generic_ai_configuration.pyfail on the base branch too in my environment (GUI replay, unrelated).Not verified on hardware: nothing here ran on a real or NI MAX simulated device (simulated devices ignore triggers anyway). To check on a device: the continuous regeneration with
buffer=n, the rate limit with several outputs, the AO start trigger and the minimum rate.Dependency:
pymodaq_plugins_utilsis added to the dependencies without a minimum version, becausewaveform_outputis not released yet. A release of utils that contains it is needed before this one is released.Docs: user guide page
waveform_output_use, README line.https://claude.ai/code/session_01RKuN81tBxMB6iaf8J6KLJL
Generated by Claude Code