Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

more detail for(rgharrison

Hey Ron,
Unfortunately, I can�t afford any software processing in between; let me explain to you what I am trying to do. I want to fire a laser to a spinning mirror in such a way that its reflection be perpendicular to my target. For example, when I input 3 for rev/pulse, I want to be able to trigger the laser every three revolution in such a way that the reflection from the mirror to perpendicular to the target. Now, I am using PCI6002 as well as index channel and quadrature B channel of the mirror encoder. The way that I have it set up right now, I have two counters, counter 1, which is external and counter 0 which is internal. The encoder index is connected to the gate of counter 1and quadB is connected to source of counter 1.counter 1 co
unts number of revolutions. In Delayed Pulse Generation vi, I have 200 cycles for the pulse width. As you know the encoder sends quadB signal every 1/1000 cycles. So what I want to do is connect the encoder index to both source and gate of counter 1, but if I do that In Delayed Pulse Generation vi, I have to input a very low number for the Pulse Width. Detail
0 Kudos
Message 1 of 2
(3,143 Views)
Hi 45,

I think this is something we might be able to solve using a different method. I'm still having a hard time trying to follow the exact application though. From what I understand, you are only using the index channel and B channel on the encoder (not A channel). What are you using counter 0 for? At what position of the encoder do you want to fire a pulse? Exactly 3 revolutions?

If that is the case then you can simply use 2 counters, one counter for retriggerable pulse generation and the other counter is for simple pulse train generation. Since your encoder has 1000 pulses per revolution, you can set up B channel on the source of one counter and generate a pulse every 3000 pulses (3 revolutions). You can then plug the output of this counter int
o the gate of the second counter. This second counter will be set for retriggerable pulse generation (output of counter is inverted so delay comes before pulse). This means when this second counter receives the output of the first counter on the gate, it will output a pulse with a delay and then a pulse width.

I believe this should work for you. If you need more details, let me know what programming environment you are using and if I am correct in interpretting your info. Anyway, I hope that helps.

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