Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating pulse train and stop after certain number of pulses in C#

I use USB-6341 board. Is it possible to generate a pulse train such as PWM output and stop this pulse train after certain number of pulses generated. So lets say each time I call a function, one of the DAQ output will produce a pulse train of 1000 pulses and then stop.

 

Is it possible to achieve that without using a counter input? 

 

And secondly when I try to generate pulse by using VS C# examples I get the following error:

name444_0-1652893384651.png

 

Best regards,

 

 

0 Kudos
Message 1 of 4
(1,375 Views)

I don't know any of the C# syntax, but yes, that's absolutely possible.

 

In LabVIEW, I'd call the function to configure task timing and specify "implicit timing", "finite samples", and set # samples = 1000.

 

The error message seems to be referring to your duty cycle value.  Duty cycle needs to be a fractional value between 0 and 1 (non-inclusive), not a percentage value from 0 to 100.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 4
(1,355 Views)

As you see in my case it is in the range 0.5. But I still get this error.

0 Kudos
Message 3 of 4
(1,339 Views)

The error message claims that you're requesting a duty cycle of 5.  I have no way of knowing what goes on in the code between those 2 screencaps, so my starting assumption is that the error message is likely to be telling the truth, and the problem lies somewhere in that in-between code.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 4
(1,333 Views)