02-25-2025 02:28 PM
hello all,
i don't understand, after writing this in a python script:
task.register_signal_event(nidaqmx.constants.Signal.START_TRIGGER, trigger_callback)
i got the following error:
DaqError: DAQmx Signal Events are not supported by your device. DAQmx Signal events include the Counter Output event, the Sample Complete Event, the Sample Clock Event, and the Digital Change Detection event.
Task Name: _unnamedTask<2>
Status Code: -200982
what we need, is to do two things when trigger 'PFI0' rises. First we need to acquire data on "AI1" (and it works fine) and secondly, we need to output a TTL signal during a limited time on "PFI4".
Does it mean that it is impossible with the USB 6211?
we're thinking of sending the same signal to 2 different digital inputs, and using 2 tasks in parallel from behind to manage parallelism, but I find that a bit ugly.
Thanks in advance for help
02-27-2025 12:26 PM
You need to keep software callbacks out of the picture. Your AI task should use the rising edge of PFI0 as an external sample clock. Your DO task should be finite and use the rising edge of PFI0 as a start trigger.
Two notes:
1. On your device, the DO task cannot generate a sample clock for itself. You'll need to generate a clock elsewhere and configure the DO task to use it as an external sample clock. This clock can be running throughout because you'll be using the trigger config and the finite sampling config to control the start and end of your acquisition.
I would typically generate such a clock using one of the device's counters.
2. You will need to explicitly restart the DO task after its finite generation completes so you can be ready for the next trigger. (You *might* first need to explicitly stop it too. Probably not, but I don't have a similar device to try to confirm.)
-Kevin P