Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Am I required to program the initial count each time the tc is passed?

I would like the counter to always use the same initial count, without programming a loop.
0 Kudos
Message 1 of 4
(3,427 Views)
Well, the short answer is you can't directly have the counter reset to a specific value at terminal count. Your options really depend on how you are using the counter. There might be other ways to implement the functionality you need.

I'm not sure what you are trying to do or I would try to offer more suggestions.

--Russell

Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 4
(3,427 Views)
Dear Russell, this is what I am trying to do:
I use one of the counters on my DAQ-Card to generate a continous pulse train for a stepper motor driver. For every 5000th pulse of the pulse train I want to output a pulse to initiate movement of a second axis of motion. For this I was planning on using the TC of the other counter. However, it only works the first time...
/Mattias
0 Kudos
Message 3 of 4
(3,427 Views)
Ah I see now. In this case their is an easier way to go about this. Use the second counter also in continuous pulse train generation mode. Only use the output from your first counter (the one that is driving the stepper motor) as it's source. By default, the output mode will toggle, but you can change the mode to pulsed output. (Such that at the end of each pulse spec you will get a short pulse) I am not sure which development environment you are using, but the Pulse Train Generation on a 660X Device with Pulsed Output Mode example shows how this is done. It's basic
ally the same in LabVIEW too. You use the Set Attribute VI to change the output mode to "pulse." The counter will pulse at the end of each "pulse spec" register.

I hope I'm making sense. Let me know if I'm not.

Russell

Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 4 of 4
(3,427 Views)