Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Create a delayed trigger signal with PCI E series card

Hi all,
 
I hope this is the correct forum. I have a requirement to create a trigger signal output from my PCI-MIO-16E-1 card. It will probably help to explain my circumstances:
 
We have an experiment operating which incorporates a rotating machine which generates a once-per-rev pulse signal used for triggering a strobe and a camera, the images acquired using LabVIEW IMAQ software. We run the signal through an electronic device which allows us to vary the arrival time of the pulse by adding a delay to the signal, and hence permitting capture of images of the surface of the machine at different times. Typical values here are rotational speeds of about 800 rpm, hence a pulse signal of approx' 13Hz. The delay we add to this pulse is of the order of 10 microseconds up to about 70,000 microseconds.
 
This electronic signal delay unit recently malfunctioned and I'm hoping to replace it's functionality with my National Instruments PCI card using some of the triggering features it has. Hence, I need to take our TTL signal of approx' 13Hz, feed that to the PCI card as an input, apply a controlled delay of between 10 and 70,000 microseconds, and feed this back out as an output for the strobe and camera equipment.
 
Can anyone advise me on how to go about this, if at all it is even possible?
 
Many thanks,
 
Riggy 
0 Kudos
Message 1 of 6
(4,298 Views)

Yes, you can use one of your board's counters to generate a "Retriggerable Single Pulse."  The delay time range you need (10 - 70000 usec) is within the capabilities of your E-series board.

Here's a posting with an example using DAQmx.

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 2 of 6
(4,290 Views)
Hi Kevin,
 
Thanks for replying. You might have to explain a little more clearly for me, I'm not very familiar with the use of the PCI E board other than for analogue acquisition Smiley Sad
I see from the example file in the discussion topic you linked to that I can create a pulse train with a varying frequency and 'duty cycle'. Can i somehow link this into an Input signal such that there is an accurately calculated delay between the incoming pulse and the outgoing pulse? Is this what is meant by 'duty cycle'?
 
Riggy
0 Kudos
Message 3 of 6
(4,286 Views)

"Duty Cycle" refers to the fraction of a pulse period during which the pulse is in the "active" state, typically "high."  Duty Cycle = High time / (High time + Low time).

For your app, it'll make more sense to select a different instance of DAQmx Create Channel from it's drop-down menu.  You'll want the one where you define pulses with high and low times instead of with freq and duty cycle.  Similarly, you'd want the high and low time version of the DAQmx Write function when you change the delay time.

I don't have time to give you a full intro to counter functions, but there's a lot of info on this site and you can learn a lot by investigating the shipping examples.  One last tip though: yes you can precisely control the delay time from the active edge (programmable to allow you to choose either rising or falling edge as "active") of the input pulse until the leading edge (can be programmed with "Idle State" setting so that the leading edge can be either rising or falling) of the output pulse.  You can also specify the duration of the output pulse very precisely.  But you won't be able to tell the hardware to *match* the duration of the input pulse if it varies.

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 4 of 6
(4,281 Views)
Excellent, that's great. Smiley Very Happy
 
Thanks Kevin, much appreciated. Smiley Happy
 
Riggy
0 Kudos
Message 5 of 6
(4,277 Views)
Kevin,

I managed it, and it's all down to you. Many thanks! Smiley Very Happy
I am very much indebted. I have a little code which allows me to set both delay time and pulse width using an input signal for triggering, all settings adjustable on the fly. I can post this program here is anyone would like it for themselves. Smiley Tongue

Cheers!

Riggy
Smiley Wink
0 Kudos
Message 6 of 6
(4,252 Views)