Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How do i output pulses of several seconds with a 20 MHz timer?

I am writing a program to turn on a machine for a range of milliseconds to 30 minutes and then turn it off wait a similar timeframe and then turn it back on for a specified number of intervals.

The timer i am using is the 20 MHz DAQ-STC counter. the longer time it can run is .8 seconds which is not sufficent for the higher end.

I would like to know of how to send pulses for that long or if there is a different way of approaching this problem.

thank you for your time.
0 Kudos
Message 1 of 2
(3,037 Views)
Hi Electrician,

The DAQ-STC counters are 24-bit counters. This means that they will overflow at .838 seconds for the 20MHz timebase and 168 seconds for the 100kHz timebase.

I am assuming you want to create a pulse train that can last anywhere from ms to 30 minutes and then stop for the same period of time. We can use 2 counters to accomplish this. By cascading both counters, the first with the 100kHz timebase and the second with the custom pulse train coming out of the first we can achieve the slow rates you are looking for.

For example, using the first counter we can generate a pulse train that is on for 1 ms and then off for 1 ms. If we now use this pulse train and route the output into the source of the second counter, then we can generate a pulse
train that is at least 4 times slower (8 ms period) and as slow as the 30 minutes you are looking for.

The point being, you can generate a slower pulse train than 100kHz and use that as the "reference" pulse train on your source which will allow you to achieve your ms - minute range.

Hope that helps.

Ron
0 Kudos
Message 2 of 2
(3,037 Views)