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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to synchronize two counter output

Solved!
Go to solution

Hi, 

I have some issue related to synchronizing two counter output.

I use sample clock to match time interval between two counter output. 

But, when I check the two counter output by using a oscilloscope, time interval between two counter output is not constant (For example, the time interval in 1st measurement was 1ms, but the time interval in 2nd measurement was 5ms.)  

How should I do in order to synchronize two counter output ? 

Here is my VI and the diagram  

Thanks

 

06222018-1.jpg

0 Kudos
Message 1 of 3
(2,646 Views)
Solution
Accepted by topic author 0905jjo

You need to have both CO tasks trigger off the same signal.  Here's a modified version of your vi to try out where I generate such a triggering pulse with a DO bit.  You'll need to check the terminal pin assignments on your device -- the key is that you choose a DO line that doubles as a PFI pin.  Configure DO by referring to it as port#/line# and configure the counter triggers by referring to it by its PFI#.

 

 

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

I did not think trigger. Time interval between two counter output is constant in the modified version.

Really appreciate your help. Thank you

 

Jo

0 Kudos
Message 3 of 3
(2,613 Views)