Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

simuntaneous arming of counters

Hey guys,
I am trying to configure seven counters on a PCI6602 to simulate a quadrature encoder signal(Channels A,A',B,B',Z,Z') and a regular encoder signal(Channel X). The quad encoder signal works fine and was done by setting up Pulse Train Generation on channel A, and Retriggerable pulse generation on the other 5 channels. I then use channel A as the gating signal for the other 5 channels. This works beautifully! Now I am stuck though. To generate a regular encoder signal, I need to output a pulse train that starts on the same rising edge as channel A (with no delay!), but has twice the frequency of channel A. I have tried triggered pluse train generation (too much delay in Channel X), and retriggerable pulse generation(can't g
et a frequency that is twice that of channel A)with no success. Has anyone got any suggestions? I am using the latest version of NIDAQ (6.9.3) with MS Visual Basic (no CW components) on a PCI 6602 counter board.
Thanks,
Dave
0 Kudos
Message 1 of 3
(3,277 Views)
Dave,

Given that you know the frequency of A, so you can specify it's double for X, we can try and do the following ...

Set up the pulse generation on X to be reverse (negative) polarity. Then setup X to be armed by a rising edge hardware trigger (triggered pulse generation). Use A to trigger X. Since you are using reverse polarity for X, and the width will come before the delay of the pulse, then the X train will start when the A train starts. The only delay you will have is a slight, and unpreventable, hardware delay, in the nanosecond range.

Without using reverse polarity, the delay would come before the width, and you would notice a large delay, which depending on your frequency and duty cycle, could be too large.

Regards,
Justin Britten


Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,277 Views)
Justin,
I apreciate your help. I just solved the solution a slightly different way. As said before, I have 5 channels running retriggerable pulse generation being triggered off of a single channel(channel A), and I was having a problem getting another channel set up with retriggerable pulse generation (using channel A) to have a high enough frequency.

Then.....Duh, double the triggering frequency, and drive the rest of the six channels off of that, all of the math on the other six channels was even the same 😉

Thanks for the help,
Dave
0 Kudos
Message 3 of 3
(3,277 Views)