12-12-2013 08:06 AM
Hello,
For a project I need to create a DAQmx task for PWM in my project library.
I have the NI 9472 Digital Out module with no counters, and a NI compactDAQ 9178 with 4 counters.
How can I configure the task so that I can use the counter from the cDAQ to output PWM from the digital out module?
Thank you and as always, kudos will be given!
12-12-2013 09:30 AM
Giant,
I'm guessing you are programming this in LabVIEW? Either way, you really shouldn't have much trouble with this, the example I point out are in LabVIEW. You will natively be able to access the 9178 counters from your 9472 module. I simulated something similar to what you have:
From there, you just need to specify the Counter and Output Terminal in your program. There is an example in LabVIEW 2012 in the Example Finder called "Counter - Continuous Output" that I am using.
This will allow you to route your signal to the line you want. Now as for changing the duty cycle of the PWM, NI has a good white paper on the topic.
Pulse Width Modulation (PWM) Using NI-DAQmx and LabVIEW
http://www.ni.com/white-paper/2991/en/
Hope this helps.
12-13-2013 02:02 AM
Aaron_W thank you for your awesome reply!
11-07-2017 06:50 AM
Hello,
I work with the NI 9472 Digital Out module with 4 counters assembled in a NI compactDAQ 9178.
I see in the default allocation of the module that:
- CTR 0 OUT is working on PFI3
- CTR 1 OUT is working on PFI7
- CTR 2 OUT is working on PFI1
- CTR 3 OUT is working on PFI5
Is it possible to modify this allocation with the following settings:
- CTR 0 OUT to work on PFI0
- CTR 1 OUT to work on PFI1
- CTR 2 OUT to work on PFI2
- CTR 3 OUT to work on PFI3 ?
If yes, what tool do I have to use to perform this operation?
Regards,
Xavier
11-07-2017 08:53 AM
Hello Xavier,
I don't think that the cDAQ is flexible enough to allow you to choose to which output a counter is connected to. I'm not 100% sure how this work, but the backplane of the cDAQ would need an expensive switching matrix to allow this.
11-08-2017 03:04 AM
Hi Xavrocg,
As previously mentioned it is possible based on the device to route to different locations on the device. Some if not all of this routing is possible. I have attached a couple of articles outlining the method you can do this:
Internally Routing Counter Signals:
http://digital.ni.com/public.nsf/allkb/8A85E97855EDADC98625730C00065F58
How Can I Know What internal routes are available on my device:
http://digital.ni.com/public.nsf/websearch/E539D226A643C1CE8625715E007C23C8
Kind Regards,
Matt Fergusson
11-08-2017 03:54 AM
Iqnore my previous answer, I was obviously wrong. Sorry about that.