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.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6341, count pulses, measure Duty cycle, timing Information of PFI Signals in one Task

hello,

1. I  have a USB 6341 X series DAQ Unit.

 

2. an only use the PFI signals as Port 0 is already been preassigned.(had it been P0.0 -7  , I could have extracted the information from a single waweform signal- unfortunately tht's not the case)

 

3. I need to count  the pulses , duty cycle,measure  pulse Low and high time  simultaneously in one task , is that feasible (i read thr' the DAQ manual and it seems not)!! if not how can I merge different task to get maximum info from my  test signal.

 

regards,

Akshay

0 Kudos
Message 1 of 2
(2,351 Views)

You can definitely *derive* all that info from one task, but you'll need to do some simple post-processing in software.

 

I would define a buffered semi-period task.  It's possible one of the "Pulse Measurement" tasks would be more suitable but they are new-ish (compared to me, which is not saying much) and I've never used them.  The trick with semi-period tasks is to know exactly what the very first measurement value represents.  For various hardware, driver versions, and config settings, etc., it could represent:

A. time from "Start" until 1st rising edge, any falling edges ignored

B. time from "Start" until 1st falling edge, any rising edges ignored

C. time from "Start" until 1st edge of either polarity.

D. 1st full interval at high state (1st rising to next falling)

E. 1st full interval at low state (1st falling to next rising)

F. 1st full interval at any state

 

With A,B,C, you'll probably ignore the 1st measurement that doesn't represent a full interval.  With C,F, you'll need a way to figure out your polarity.  (It's quite possible that Pulse Measurement tasks handle the messy work of these options in a predicatable and reliable way.  I'd suggest trying to look into it.)

 

But once over those bumps, every 2 measured intervals will be 1 full pulse cycle.  The two measurements directly tell you Low and High time, the duty cycle is the time in active state (often high state, but not necessarily) divided by the sum of (Low + High), the pulse count is the total # measurements divided by 2.

 

 

-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 2
(2,323 Views)