You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can reference variables in the callback by creating an inner function (also called nested function) and Python allows you to reference variables from the enclosing function. You can see this being done in the every_n_samples_event.py example with the "callback" inner function referencing "samples" from the enclosed function.
Original discussion on NI's forms.
DAQmx's event callback signatures include a Task ID and callbackData parameters even though there currently isn't a way to get a task object from a Task ID or be able to pass in user provided callbackData (register_every_n_samples_acquired_into_buffer_event passes None as the data.)
Having to specify these to parameters in the signature even though they are not usable is confusing the users.
These are 2 ideas on how to improve this.
The text was updated successfully, but these errors were encountered: