LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating a digital out pulse

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. 

Davidhova_0-1708432832922.png

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

0 Kudos
Message 1 of 2
(327 Views)

Modified from shipping example Digital - SW-Timed Output.vi to send a single pulse of 10ms.

ZYOng_1-1708478141166.png

 

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.

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 2
(266 Views)