Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate trigger after every N counts from a single counter

How to generate a trigger after every, say N counts from a counter? I want to use only one counter for this application. when the count reaches N it should generate a trigger and then start from 0 again to count till N and generate a trigger.

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

There are some examples included with DAQmx for doing this (pulse generation with external clock), but one very easy way is to use CreatePulseChannelTicks using your tick source (e.g. a PFI pin), set it to divide down by the number you want to count, and then route CtrXInternalOutput (X=the counter channel) to whatever you want to trigger (or even just an output pin).  

 

See http://zone.ni.com/reference/en-XX/help/370473H-01/mstudiowebhelp/html/2368bbdf/ and set the "lowticks" and "highticks" to sum to the number you want to count to per trigger.

Message 2 of 2
(2,413 Views)