Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

6602 route signals

Hello All,

I would like to use the output of one counter to gate a second counter. what is the best way to connect the output of counter 0 with the gate of counter 2? I've tried several options, but they didn't work 😞

Thanks!
0 Kudos
Message 1 of 10
(5,922 Views)
What development environment are you using (LabVIEW, VC, CVI)? And what driver (traditional DAQ or DAQmx) and what driver version are you using?
0 Kudos
Message 2 of 10
(5,916 Views)
Hello gus, thanks for your reply!

LabVewiew 7.1 / DAQmx
0 Kudos
Message 3 of 10
(5,913 Views)
Sorry, one question I forgot to ask: what applications are you doing on the output counter and what are you doing with the input counter (period measurement, edge counting, etc.)?
0 Kudos
Message 4 of 10
(5,909 Views)


@gus wrote:
Sorry, one question I forgot to ask: what applications are you doing on the output counter and what are you doing with the input counter (period measurement, edge counting, etc.)?


One counter is used to generate a pulse on every trigger (CO Pulse Ticks). I would like to use the second counter to count the number of pulses generated by the first counter and to enable/disable the first counter. E.g. I would like stop the first counter with the second counter, if it has generated 360 pulses.

Note: I can't use a the 'default' finite pulse train generator!
0 Kudos
Message 5 of 10
(5,905 Views)
Alright, I think I get what you're trying to do now. For the pulse generation counter, you need to use a Pause Trigger (Pause when high), whose input terminal is the output of the edge counter. For the edge counting counter, you select it's input terminal to be the pulse output of the pulse generation counter and set the initial count to 2*number of pulses to generate. The pulse output of the pulse generation counter will generate a pulse on every transition (rising or falling) of the pulse generation counter. The last step is to generate the correct output on the edge counting counter. You need to use the export signal properties to export the "Counter Output Event" and set the output behavior to toggle.

Start the edge counting counter first, then the pulse generation counter. What API are you doing this in (LV, C)?

I hope this helps!
gus....
0 Kudos
Message 6 of 10
(5,879 Views)
Thanks for your answer, youre very close!

However, the pulse generation counter is triggered externally. Therefore I can't use the Pause Trigger (the gate of the counter is used to retrigger) :(. So for, I didn't use an event counter as you described. I like the idea and I will try a few things tomorrow.

I'm using LabView 7.1 and DAQmx. The test system consists of a PCI-GPIB, PCI-CAN, PCI-6220 (DAQ)and PCI-6602 (Counter) board.

Thanks again,
Jos
0 Kudos
Message 7 of 10
(5,868 Views)
Ahh, this is an even more interesting case then. I haven't tried this out, but it should work.

The pulse generation counter still uses the pause trigger with everything the same as I listed before. Instead of an edge counter, you'll want to use a position measurement task (linear), z index enabled, initial position and z index value = number of pulses to generate, z index phase "A low B low", distance per pulse = 1, decoding type = 2 pulse counting, and export the "Counter output event" and set the output behavior to toggle. Connect your re-trigger signal to the Z input on the linear position counter, connect the A input to GND (low) and connect the output of the pulse generation counter to the B input. On the pulse generation counter also configure an Arm Start Trigger (which can be used in conjunction with a start trigger) and set it's input terminal to your retrigger signal.

If I'm correct, this should perform your desired action. There is big difference between this and the regular retriggerable finite pulse train generation. If you receive a trigger signal before your finite pulse train has completed, the whole application will fail. You will no longer get pulses trains of the correct length and shape. Just keep that in mind as you're working on this application.

I hope this helps!
gus....
0 Kudos
Message 8 of 10
(5,867 Views)
Hello gus,

I never tried the position counters before, interesting. I've only one problem left:

"If you receive a trigger signal before your finite pulse train has completed, the whole application will fail."

The reason why I used a retriggerable single pulse generator is to generate a trigger signal from an incomming bit pattern. I'm receiving a bit pattern from a device under test. I can't use this signal to trigger the test system (it would be triggered on each falling edge of each bit in the data packege). Therefore, I used this signal to trigger a single pulse of 1 ms, which guarantees me that I'm only triggering on the first falling edge of the bit pattern.

I can't use this trigger signal, because I'm sure it will be retriggered before the finite pusle train is finished.

For this moment I've used an external OR gate to enable/disable the trigger generation. The OR inputs are wired to the retriggerable, single pulse generator and the output of a counter, which counts the tick of the first couter.

Thanks a lot! I don't prefer to build external hardware, but for now it will do!

Jos
0 Kudos
Message 9 of 10
(5,854 Views)
if you are certain of the number of pulses that you'll be receiving with the incoming bit pattern, you should be able to use another counter to divide down this signal into a single trigger per ms.

gus....
0 Kudos
Message 10 of 10
(5,845 Views)