From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Changing the Duty Cycle (PWM) with buttons

I have to generate 6 PWMs. It is possible to use only one timer?. I have done this file but only 4 timers appeared, and I should like use 3 to other purposes. (Note: I can not post a new thread)

0 Kudos
Message 1 of 8
(2,425 Views)

I only recently started using Counter/Timers (I'd been in the "analog" world up until recently), and really started to admire them.  However, I think found that (a) most NI DAQ devices have "too few" Counter/Timers, and (b) some configuration require pairs of Counter/Timers (as I learned when I could create one pulse when/where I wanted it, could create a second as well, but if I wanted to control pulse frequency, width, and initial delay, this required a pair ...  Sigh.

 

You might look at/for NI's 6602, which comes as a PXI or PCI board, and has 8 Counter/Timers.  Maybe NI has something else out there ...

 

Bob Schor

0 Kudos
Message 2 of 8
(2,392 Views)

I'm guessing you may have an X-series board -- they have 4 user-programmable counters.

 

It sounds like you want 6 counters for generating PWM and another 3 counters for other purposes.  Is that right?

 

Bob Schor's suggestion of a dedicated counter/timer board is a good one, but there's a newer generation version that improves on the 6602 in several different ways (bigger FIFO, hw-timed DIO support, finite pulse trains with only 1 counter, more flexible digital filtering, and more).  Check out the PCIe 6612 (also available in PXIe).

 

If you need to sync the 6612 counters with the X-series board you already seem to have, you should install a RTSI cable between them and configure MAX accordingly (so DAQmx can do auto-magical timing signal routing, once it knows they share a timing signal bus).

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 3 of 8
(2,381 Views)

@Kevin_Price wrote:

Bob Schor's suggestion of a dedicated counter/timer board is a good one, but there's a newer generation version that improves on the 6602 in several different ways (bigger FIFO, hw-timed DIO support, finite pulse trains with only 1 counter, more flexible digital filtering, and more).  Check out the PCIe 6612 (also available in PXIe).


Oooh, I want one ...

 

Bob Schor

0 Kudos
Message 4 of 8
(2,377 Views)

Oh yeah, one more big improvement -- buffered pulse train generation!  (Something I had complained about / requested for about a decade worth of using the 6602.  It came around with the STC3 chip in the X-series MIO boards, a couple years after I stopped doing apps that needed it.)

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 5 of 8
(2,375 Views)

I am programming a NI-USB-6341 that has 4 timers

 

I should like program several PWMs at the same frequency and other using different frequency and made following program:

[IMG]http://i65.tinypic.com/ogan4m.jpg[/IMG]

 

But I have to use the 4 timers to have only 4 PWMs.

Is there a possibility to use the same counter for several PWMs?

0 Kudos
Message 6 of 8
(2,369 Views)

Same question you asked before and has been answered over here.  I'll follow up in that original thread...

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 7 of 8
(2,354 Views)

General answer:

 

1 counter can be used to make no more than 1 output signal (some counter tasks use less than 1...).   You cannot make 2 or more distinct output signals with 1 counter.

 

If you want several of those output signals to be *identical*, then you *might* be able to simply physically wire 1 single counter output signal to multiple destinations.  Be aware that counters can only source a very minimal amount of current natively so there's no guarantee that 1 counter will drive several of your external thingies at once.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 8 of 8
(2,349 Views)