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

implement analog outputs as continuous callbacks #42

Open
nsteinme opened this issue Mar 22, 2018 · 0 comments
Open

implement analog outputs as continuous callbacks #42

nsteinme opened this issue Mar 22, 2018 · 0 comments

Comments

@nsteinme
Copy link
Contributor

Idea is to generate analog outputs on the fly, using the continuous mode of the daq.

The analog daq sessions needs to be in IsContinuous mode, and a DataRequired callback needs to be set, e.g. every 50 or 100ms. When this callback runs, it asks each analog signal generator for the next 100ms of samples, and queues them all. The signal generators can come up with these however they like. When the daqController.command function is issued, this information is passed on to the signal generators so that they may use it to inform the samples that they are generating.

The benefit of this approach is that analog signals can operate in parallel, asynchronously and so that they can be updated in a smooth way (e.g. a sine wave output can update its frequency without going out of phase, for instance). The cost of this approach is that any requested new analog outputs that are commanded would only show up ~100ms later or so. This is probably slower than currently, though actually maybe not slower by much (has anyone tried to measure the delay somehow?).

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

No branches or pull requests

1 participant