Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Outputting Multiple TTL Trigger signals

Hi,
 
I am rather new to labview 8 and I have the following problem.  I have a PCI-6025E card and a connector block and I wish to do the following:
 
I want to output four TTL pulses with the same, but changeable, frequency and pulse width maybe around 10ms/50Hz on four different output lines and also I want to read in 4 subsequent analog values that govern whether the each of the four trigger pulses should be stopped.
 
Also how fast of a signal can I output and can I update on the fly?
 
If some one could please help me with this I would greatly appreciate it

Thanks for your help
0 Kudos
Message 1 of 10
(5,883 Views)

Hi Quiksilver,

TTL pulses are generally created on either a digital line or a counter.  The PCI-6025E does not have clocked/correlated digital I/O.  Therefore if you use the digital lines the output will be software-timed and the accuracy will be system dependent. You would most likely not achieve the frequency you desire.  Therefore I recommend using a counter for output. 

To create a pulse with varying frequency and duty cycle you can create a counter output and set it for frequency.  You can then use a DAQmx Write to update the frequency and duty cycle.  Assuming you are using LabVIEW you may want to search the examples (Help>>Find Examples) for PWM.  This will bring up an example called PWM Counter Output.  This example reads an analog channel and updates the duty cycle on the counter accordingly.

The PCI-6025E does not have four counters, however if you are using the same signal on four channels you could connect the counter through 4 relays to the points you wish to trigger.  You can control the relays with your digital lines to independently turn on/off a particular trigger signal after reading your analog inputs.  If this is not an option, you might try the software timing on the digital I/O lines keeping in mind the limitations listed above.

Hope this helps,

Jennifer O.

0 Kudos
Message 2 of 10
(5,860 Views)
splitting a 5V TTL signal 4 times through relays doesnt affect it?
0 Kudos
Message 3 of 10
(5,849 Views)
Splitting it with relays at such low frequencies will not affect the TTL signal. What will effect it is the loads (your device) that the TTL signal is driving. You may need a buffer or line driver chip to give the signals more drive capability.

Message Edited by AnalogKid2DigitalMan on 11-01-2006 09:36 AM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 4 of 10
(5,849 Views)

Okay that makes sense.  Thanks.

Now however I have a PCI 6602 board and I want to output TTL signals on all eight counters and be able to shut them down individually can I do this programatically?  I tried it previously using DAQmx (w/ Labview 😎 and all I got was a error message (50103).  So my question is how can I output all available, 5 volt TTL signals using labview 8 using a 6602 board without getting this error and be able to stop them individually?

0 Kudos
Message 5 of 10
(5,843 Views)
Hi Quicksilver,
 
It is wonderful that you have a counter board.  Since the PCI-6602 has more counters you will be able to control the lines separately without needing external circuitry.  For counter output you can have a task for each counter and stop each task programmatically and independently.  Refer to this post for an example of how to begin programming your application.  Make sure that you have the pulse set to continuous.  If you use finite tasks, a second counter is used to gate the signal (to determine when to stop the pulse) and can cause a resource is reserved error when you try to use the other counter for a second output task. 
 
Regards,
 
Jennifer O.
0 Kudos
Message 6 of 10
(5,821 Views)
Hi,

I am using a PCIe NI-6259 DAQ card that has only has two 80Mhz counter/timers and wish to do the following:

-Send a fixed 1HZ signal every second (1PPS) for a duration of 35 micro-seconds     (same frequency and pulse width)
-Send the 1 PPS signal through 9 independent channels.

According to this forum, I could connect one counter and drive the signal through 9 relays to the points I wish to send the signal, and then
control the relays with my digital lines to independently turn on/off a particular trigger signal.

(and will possibly be using the other channel to gate the signal if the signal is finite and not continuous)

Is this configuration I have explained feasible??

JoshPSU

Message Edited by JoshPSU on 02-20-2007 02:01 PM

Message Edited by JoshPSU on 02-20-2007 02:02 PM

0 Kudos
Message 7 of 10
(5,713 Views)
Hello JoshPSU.
 
In order to answer your question effectively, I would appreciate some clarification of your statements.  You state that you have a 1 Hz signal (which I assume is digital), but you only wish to send it for 35 microseconds.  So, effectively, are you sending a high pulse every second for only 35 microseconds?  In other words, do you have a signal which has a very small duty cycle only having a high time of 35 microseconds and a low time of 999965 microseconds? 
 
Also, as I am reading your question, you wish to connect this pulse (of small duty cycle) to 9 channels on a relay and control which channels get routed by digital lines on your PCI-6259.  What relay are you using?  Is it one of our cards?
 
Assuming that I am understanding your question correctly, this configuration should be possible.  However, I will await your final description and clarification before I say for sure that this is possible. 
 
Have a great day and I look forward to hearing from you soon!
 
Brian F
Applications Engineer
National Instruments
0 Kudos
Message 8 of 10
(5,692 Views)
 Thanks and hello,

Yes, this signal that is being driven is in fact digital:  frequency being 1Hz, and duty cycle being 0.000035.

The pulse needs to be available at 9 different locations.  The use of relays is simply a configuration I am toying with in light of the fact that the DAQ card being used only has two counter/timers. 

If an alternate/better configuration exisits, it would quickly be adobted.

JoshPSU
0 Kudos
Message 9 of 10
(5,684 Views)

Instead of relays you could also use 7408 logic series AND gates- wire one input of the AND to the DIO select line, and the other input to clock signal. Repeat 8 more times for each DIO select. This would give you cleaner switching than a relay in your application. It may be wise to use a buffer for every 3 AND gates for the clock to ensure enough drive capability for the AND gates.

Another option is a multiplexer, like a 74150, where 4 select line inputs will select 1 of 16 inputs to route to the output. Think of it as a 16 position switch with 16 inputs and 1 output. The 4 select lines determine the position of the switch. IMO this is the optimal solution.

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 10 of 10
(5,676 Views)