08-23-2010 08:54 AM
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:
For your digital task, you would then just specify the sampleClockSource as one of the counter internal outputs, like this:
Hopefully this helps-
08-23-2010 11:51 AM
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
08-23-2010 12:32 PM - edited 08-23-2010 12:36 PM
08-23-2010 12:38 PM
Here's the property that Kevin alluded to:
08-24-2010 03:32 PM
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,