Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Semi period and state measurement

Hello,

 

Is there a reliable method to measure semi-period (time) of digital signal and its state (0 or 1)? 

I am using Counter CI-SEMI-PERIOD but this gives me only a time. I am "controling" the state knowing only starting edge, but I am not confident my program will not desynchronize at some point. I would like to have information about state directly from mDAQ together with time.. 

 

Thanks in advance. 

0 Kudos
Message 1 of 4
(1,791 Views)

What DAQ device are you working with?

 

A semi-period measurement task should alternate between high and low times without desynchronizing.  You would just need to keep track of odd vs even indices of the cumulative data.

 

Some newer devices support "Pulse" measurements which present the data in a structure that pairs the semi-periods more explicitly.

 

Another method might be to use DI with change detection (if your DAQ device supports it) if you only need digital state info rather than timing info.

 

 

-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 4
(1,727 Views)

I'm using USB-6343 (USB X-Series). 

 

So far I'm using your first method. It seems to work I just don't feel much confident it won't desynchronize at some point during runtime. 

 

Your second option looks nice but I havn't found it in my device. (?) Do you have any example of device supporting this option?

 

Third option is not for me. I need timing. 

0 Kudos
Message 3 of 4
(1,686 Views)

There are shipping examples for "Pulse" measurements, and your X-series device supports them.  They're written for measuring frequency but you can slightly modify them so they'll measure high and low times instead.

 

I don't think there's a need to worry about desynchronizing during runtime, but you could always combine your counter measurement with a digital change detection task which can be used to confirm all the digital states directly.

 

 

-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 4 of 4
(1,676 Views)