02-20-2024 06:47 AM
Hello everyone,
I'm trying to generate a digital out pulse with a high pulse width of 10 ms. Unfortunately, my hardware (NI 9403) doesn't support counters, so I'm trying to use normal digital out pins to create the pulse.
This is what I have now. Execute the vi will generate a series of 10 ms wide pulse, but I want just 1 pulse on-demand and not a series of pulse.
Stopping the write function task will cause too much delay, a second on-demand pulse is not properly registered/executed.
Using a finite sample will result in a 200288 error "Attempted to write a sample beyond the final sample generated...."
How could I resolve this issue? It is not clear how much time there can be between 2 on-demand pulses.
Kind regards,
David
02-20-2024 07:23 PM
Modified from shipping example Digital - SW-Timed Output.vi to send a single pulse of 10ms.
Since NI 9403 does not support hardware timing, you can only use the software wait time between the write API. It highly depends on which cDAQ you use. Ethernet cDAQ has higher latency than USB cDAQ. Besides, if you have other programs running at the same time, CPU might not have enough resources to process DAQmx code in time.