LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Reading a PWM and determining pulse width using a digital input pin on a NI 9425 DAQ

Solved!
Go to solution

Hi,
Have you been able to do it? I'm turning on a led with a Duty cycle of 70% and I'm also trying to sense this Duty cycle via DI.
Bu it seems not to work :/ .
Any idea how to do it

0 Kudos
Message 1 of 6
(795 Views)

Hi Alex,

 

who is "you" you are talking to in your answer in this old thread?

 

Mind to attach your VI? What does not "work"?

Best regards,
GerdW
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2019 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 2 of 6
(792 Views)

I attach the .vi, It read a Digital Input port conected to a LED powered with a PWM with a duty cycle of 70%.

I'm trying to read this duty cycle aprox, using only one DI, it should work but it's not even 20% accurate.

0 Kudos
Message 3 of 6
(784 Views)
Highlighted

Hi Alex,

 

can you attach your VI with some sample data?

Run the VI once, then set all values to default (in the edit menu). Then save the VI.

(And please don't save this single VI in a LLB, that's not needed nor recommended…)

Are you using a NI9245 module - or something different according to your VI icon?

Best regards,
GerdW
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2019 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 4 of 6
(781 Views)

I can't read data, because I'm trying in DAQ-6251 and it says to use a port that supports buffered operations, but I only have the Port 1 and Port 0 available. With the port 0 it works, but i need to use the Port 1.

Waveform Characteristics (Port 0 Only)
PFI/Port 1/Port 2 Functionality Functionality

Static digital input, static digital output, timing input, timing output Timing output sources Many AI, AO, counter, DI, DO timing signals Debounce filter settings 90 ns, 5.12 μs, 2.56 ms, custom interval, disable; programmable high and low transitions; selectable per input .

Reference to the DAQ: http://www.ni.com/pdf/manuals/374566d.pdf

0 Kudos
Message 5 of 6
(775 Views)
Solution
Accepted by copyAlexRog

Hi Alex,

 

I'm trying in DAQ-6251

Then why did you hijack an old and unrelated thread?

 

it says to use a port that supports buffered operations, but I only have the Port 1 and Port 0 available. With the port 0 it works, but i need to use the Port 1.

Why don't you say so right from the beginning?

And why do you need to use port 1?

 

Reference to the DAQ

Why do you link to USB6341 when you use USB6251?

The manual is right: you need to use port 0 to read a digital waveform!

 

Why don't you use any of the PFI pins and a counter task to determine the PWM duty?

Best regards,
GerdW
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2019 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 6 of 6
(771 Views)