LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PWM Generator using NI PXIe-6341

Solved!
Go to solution

Hi,

I am currently developing an application in LabView and I need to generate a PWM signal using a PIXe-6341. I found an example to do this (Counter Output) but i do not see the signal (i am measuring from PFI12 output, using D GND port as ground). How should I connect the wires to see the signal? I am not pretty sure if I am monitoring the correct port.

 

Thank you in advance.

0 Kudos
Message 1 of 3
(4,398 Views)
Solution
Accepted by topic author BryanEspi

You have several choices for WHERE the signal comes out.

 

Not sure about your particular device, but I've done it with other  PXI boards.

 

Note that there are SOME conflicts inherent in some boards:  Not all functions are simultaneously available.

 

For example, on the PXI 6602, some of the counter outputs conflict with some digital input pins.

 

I have to EXPLICITLY set the output pin to be PFI32, or whatever. If I don't, the pin stays as an input pin and nothing happens.  Check for that in your docs for your device.

 

Here's my code:

Set CO PFI.PNG

 

I create the CO PULSE FREQ task using a chosen base frequency, then set the CO.PULSE.TERM to /CTR/PFI32 or whatever, then set the timing to Continuous.  

 

Every sample, I set the FREQUENCY the same, but adjust the DUTY CYCLE to 0.00001... 0.99999, depending on data.

 

The key point is that not every PFI pin is available without you asking.  The docs will tell you which pins are available for what.  Some pins might be available for multiple functions, so you might have to override the default.

 

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 2 of 3
(4,350 Views)

Thank you, you totally enlightened me out.

0 Kudos
Message 3 of 3
(4,056 Views)