Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog Sample Clock Division

Hey Drew-

 

Sorry it has taken so long to get a reply- your message fell through the cracks because our support teams were likely never notified about it.  I would suggest creating a new forum post if my suggestions don't help so that they can devote some time to helping with your specific question.

 

If I understand your problem correctly, I believe you should be able to use the 'ticks' counter channel type to achieve this sample division.  You can specify a high-time/low-time in ticks of as little as two ticks for each state.  This should allow you to achieve your divide-by-two need.  The one caveat is that you will have to route your external signal to a PFI line as well, as the APFI lines are not routable to other internal digital circuitry.  Here's a screenshot of what it might look like:

 

22168iCC0D4F254BA5D871

 

For your digital task, you would then just specify the sampleClockSource as one of the counter internal outputs, like this:

 

22170i331A0B073E8EAE24

 

Hopefully this helps-

Tom W
National Instruments
0 Kudos
Message 11 of 15
(1,558 Views)

I'd add just one thing to Tom W's post.  You'll probably also need to use a DAQmx property node to change the output behavior of the counter.  By default, it will toggle the output state every 2 cycles of the incoming timebase clock, which becomes a divide-by-4.  There's a property you can set to request it to pulse on terminal count which can be used to perform a divide-by-2.

 

I'm not near LV now, but here's an older post I made on the same topic for a little more info.

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 12 of 15
(1,546 Views)

 

Tom W
National Instruments
0 Kudos
Message 13 of 15
(1,542 Views)

Here's the property that Kevin alluded to:

 

 22180i06AC52ADB13A59C5

Tom W
National Instruments
Message 14 of 15
(1,538 Views)

For anybody else who comes across the thread, the following example code can be used to divide an external clock by 2:

 

Divide External Clock by Two Using Counter in DAQmx

 

 

Drew's post was also discussed in this thread.

 

 

 

Best Regards,

John Passiak
Message 15 of 15
(1,499 Views)