Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

suppressing generated pulses using a digital signal

0 views
Skip to first unread message

luke_m

unread,
Jul 30, 2008, 4:40:06 AM7/30/08
to
I've been advised to re-post this question here - hopefully this is a simple problem.
 
I'm using counters.vi (below) to generate a single pulse, with a
specified delay, every time an input pulse is received. This works fine.
 
I would like to make the pulse output conditional on an additional TTL signal. This signal is high / low for seconds at a time.
 
Is there a simple way to incorporate a digital channel into this vi? I'm using a M-series USB 6259 board for input/output.
 
Thanks in advance for your help.Message Edited by luke_m on 07-30-2008 03:34 AM


Counters.vi:
http://forums.ni.com/attachments/ni/40/6616/1/Counters.vi

luke_m

unread,
Aug 1, 2008, 3:10:09 AM8/1/08
to
Hi Chris
Thanks for your reply.  My issue sounds like the second example you gave, but I will explain my application in the hope there is a workable solution.
I'm trying to control a pulsed laser. An external pulsed signal, at approximately 50 Hz, is used to fire the laser. This trigger needs to be delayed by 100s of microseconds to control the power. I can successfully fire one pulse for every incident pulse at a set delay using the .vi I attached, by running this external trigger into PFI 1.
I would like to fire the laser only when required by an external laser marking program. This program supplies a TTL digital signal. Marking runs take a few seconds, and this signal may switch twice a second. I can use this as my external trigger into PFI 1, and I get a continuous pulse train, which stops pulsing when the TTL signal goes low.
I would like to fire a pulse a set delay after the incident pulse, only when the TTL is high. Can I do this on a USB-6259?
 
Thanks
Luke

luke_m

unread,
Aug 4, 2008, 9:40:08 PM8/4/08
to
Chris
 
That is the example vi I used.
I'm using the 50 Hz pulsed (laser) signal as my trigger. Every time the laser signal goes high, I generate one pulse a set time interval later. This interval needs to be controlled precisely as it determines laser power. This part works - if I supply the laser signal to the PFI line, I get a perfectly delayed single pulse out for every input pulse.
I would like to gate this output with the TTL (marking) signal. The marking signal is high when writing and low when moving the laser to a new start point - I don't want the laser to fire during this time. If I feed the marking signal in as the trigger source, I only get one pulse when the laser begins marking. If I feed the marking signal into the trigger property node, with the laser signal into the trigger source, I get continuous pulses out that are uncorrelated with the laser signal.  It's crucial that the time interval between the laser and output pulses are maintained.
Can I gate the output? Or is this a case of trying to trigger off multiple lines as you mentioned before?
Thanks for your help
Luke
 

luke_m

unread,
Aug 11, 2008, 3:10:06 AM8/11/08
to
Hi Chris
 
I've been playing around with your suggestions for a few days, and am unsure whether I'm missing something. I've attached an image of my (non-functioning) program as it stands.
 
My problem is in the lower line (beginning with ctr1). I have replaced the start.retriggerable with a pause trigger, using the TTL (PFI8) as the trigger source. I have include a DAQmx timing vi as suggested. However, if I use sample clock mode as shown, I get an error message saying Hardware Timed single point mode is the only sample mode supported for Counter timing. Making this switch generates a second error telling me single or continuous sampling is the only sample type available with this timing.
 
If I switch to implicit timing, the program now runs. However, I now have no way of including the signal from PFI0 that should control the timing of the output pulses. While the TTL signal is high, I get a continuous train of pulses uncorrelated to the signal on PFI0
 
My aim is this:
If the signal on PFI8 is high, I want to output one pulse exactly 600 ?s after every input pulse on PFI0
If the signal on PFI8 is low, no output at all.
 
Thanks for your help.
 
Luke


counters1.JPG:
http://forums.ni.com/attachments/ni/40/6648/1/counters1.JPG

luke_m

unread,
Aug 13, 2008, 2:40:08 AM8/13/08
to
Hi Chris
Thanks for that last post. I've used the example you've given, and with a bit of tweaking got it working nicely.
Thanks for all your help with this issue - it's very much appreciated!
Luke
0 new messages