Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Use a 6601 as a message gate

I've got a regular (1.8 msec), pulsed signal that I need hardware to be able to 'ignore' until a given external trigger. Is there any way to set up a 6601 timer board (we're using only one of the counters) to receive this signal on one pin and send it back out immediately on another only after the external trigger event?

I've tried the 'connect term' function, but I couldn't get a trigger pulse to control this action.

I've tried to set up a 'task pause' trigger, but either I wasn't setting it up right or it didn't work.

I tried using the pulse signal as an external clock (with an external trigger), but I couldn't get the output to pulse on every tick of my input signal. The function requires a value of '2' or more on the number of pulses to read before generating an output pulse.

The output pulses don't have to be at the /exact/ same time as the input pulses, but then need to be within a hundred usec or so.

I could do this with an 'AND' gate circuit and a flip-flop to hold the state of the control trigger, but it would be more elegant to do it with the excess functionality of the counter board.

Thanks for your help.

Brian
0 Kudos
Message 1 of 4
(3,455 Views)
Hi,

You should be able to complete this task using one of the examples in the LabVIEW example finder. The example is called:

Gen Dig Pulse Train-Finite-Retriggerable.VI.

It is located in the Hardware Input and Output>>DAQmx>>Generating Digital Pulses folder. Since you know the type of signal you want to output, you can define it with this VI, and use the input pulse as your trigger source. So, everytime you receive the trigger, there will be an output pulse of the exact same specs.

I hope this helps. Have a Great Day!

George
0 Kudos
Message 2 of 4
(3,445 Views)
George,

Thanks for looking at this. I think you're close.

I'm writing this in LabWindows, so I'm going through some of their sample counter output code.

To clarify, I've got an input line pulsing at 1.8 msec and a trigger line that will stay low until an external event happens. I want my output line to stay low until the trigger goes high, and then I want my output to match the input as close as possible.

I could use DAQmxCreateCOPulseChanFreq to generate the signal, but I would need a way to cascade the triggers. First, the task would wait for the actual trigger, then the task would wait for the next 1.8 msec pulse, which would kick off the pulse generation so it would be in sync with the input. Is this possible?

I tried DAQmxCreateCOPulseChanTicks but that one requires that the output high be high for at least two ticks of the input pulse, which would halve my output rate.

Any ideas?

Brian
0 Kudos
Message 3 of 4
(3,440 Views)
I haven't actually tried this, but I think you can use an ArmStart trigger in conjunction with a Start trigger. The ArmStart trigger would correspond to your trigger line and the Start trigger would correspond with you 1.8 msec pulse. You could then use this triggering scheme with either a continuous pulse train or a retriggerable pulse task. For the continuous pulse train task, you would set the frequency of the pulse train to match your 1.8 msec pulse. Since the pulse train has a minimum initial delay of 2 timebase ticks, this should create a signal that lags the actual input pulse by 25 ns (2 ticks x 80 MHz period = 25 ns). However, you might run into skewing issues for long running tasks due to mismatches in accuracy of the 80 MHz timebase and your input signal. With the retriggerable pulse, you should be able to create a similar output with 25 ns delay, but you won't have to worry about the signals moving out of phase over time. I hope this helps. Good luck.
0 Kudos
Message 4 of 4
(3,426 Views)