Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

PWM generation by using NI-DAQMX & Python with NI-PXIe 6363 Card

I'm trying to generate PWM signal by using NI PXIe-6363 card and NI-DAQMX library and Python but not able to get PWM.

Can anyone help me for same.

Is it possible to generate PWM by using NI-DAQMX library and Python.

0 Kudos
Message 1 of 3
(294 Views)

I'm no help with any of the specific Python syntax, but here's a general outline:

 

1. You should create a task for Counter Output to generate PWM

2. When you configure Timing properties for the task, you'll likely need to use "Continuous Sampling" and "Implicit Timing".

3. And now here's the tricky thing, at least under the LabVIEW API.  I suspect this is a device and/or DAQmx quirk and that it will also be true under Python though.
    PWM control usually involves a constant frequency with a potentially variable duty cycle.  But under DAQmx, you must also write to the frequency property to make it "digest" anything you write to the duty cycle property.   So you probably need to write the new duty cycle first and then re-write the same old frequency to get DAQmx to "digest" both values.

 

 

-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 2 of 3
(252 Views)