LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CO Pulse Time

Solved!
Go to solution

How to use DAQmx CO Pulse Time to change duty continueously while not stop task?

0 Kudos
Message 1 of 7
(3,769 Views)

Hi Asian guy,

 

use DAQmxWrite to set new frequency and duty cycle…

LabVIEW and DAQmx come with a huge example library, and there are also exampleVIs on DAQmx-CO tasks!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(3,758 Views)

image.png

This is an example from labview library, I use a card USB-6210, but I get this error as below:

image.pngimage.png

0 Kudos
Message 3 of 7
(3,720 Views)

Hi,

 

that error description is pretty self-explanatory, so why don't you follow it?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(3,717 Views)

image.png

I get no error by this code, but this can only output the first setting pulse. How to do?

0 Kudos
Message 5 of 7
(3,713 Views)
Solution
Accepted by topic author 穆易

Try something like this:

 

grafik.png

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 6 of 7
(3,705 Views)
Solution
Accepted by topic author 穆易

Two points:

 

1. Your device is an M-series MIO board which does *not* support buffered pulse train output.  If you need to predefine a buffer of pulse params and then generate those pulses with hardware timing, you'll need a newer device such as an X-series board (model #'s 63xx). 

 

2. The post from JensG69 points you in a useful direction -- consider changing pulse params based on software timing.  However, be aware that the code may not *quite* work as-is.  You may find that you need to write *both* frequency and duty cycle in order for the duty cycle to update.  (This was definitely true some years ago, but it's possible DAQmx has changed to no longer require it.)  FYI, in case you don't see duty cycle changes take effect in you pulse train signal.

 

 

-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 7 of 7
(3,694 Views)