LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I generate a +/- 5 volt TTL pulse if I don't have a DAQ board?

I am scanning the wavelength of a dye laser in the triggered mode. After each wavelength, it will stop and allow the oscilloscope to take data at that wavelength. Upon the completion of the data aquistion, the dye laser controller will be waiting for a positive going TTL pulse with minimum duration of 50 micro-second at a "Trigger In" line in order to move on to the next wavelength. I've read some comments on doing this using a DAQ board, but I don't have such device on my computer, so I am looking for some way to accomplish this without a DAQ board.
0 Kudos
Message 1 of 7
(5,326 Views)
This can easily be done be setting the state of the DTR or RTS line of the serial port.

With VISA : VISA property node --> Modem line settings

With the "old" serial functions : use serial line ctrl.vi in ..\vi.lib\platform\_sersup.llb.

Obviously you will need some hardware to interface the +-12V signal to +-5V.
0 Kudos
Message 2 of 7
(5,326 Views)
Can I just generate a positive going 5 volt pulse instead of +/- 5 volt? I only need the positive going edge of the pulse to trigger the laser controller. I would also like to learn more about the DTR or RTSline of the serial port, any suggestions will be welcomed. Thanks!
0 Kudos
Message 3 of 7
(5,325 Views)
You need some external hardware to do this. See an example in the attached file.

Several links at http://www.webopedia.com/TERM/R/RS_232C.html
will answer your questions about serial communication.
0 Kudos
Message 4 of 7
(5,325 Views)
What about the paralell port ? Using the Out port 378. What OS are you using ?
0 Kudos
Message 5 of 7
(5,325 Views)
You have a couple of options.
1. buy a cheap DAQ card. You can pick up cheap cards for under $100
or even try to make your own. (www.labjack.com for cheap USB cards)
2. You can make your own digital output port. You can use the
parallel port as a 8 pin digital output. It will be kind of slow,
giving pulses in the 10-20 mSec range at the fastest, but I have seen
it work. You can also use the serial port Tx pin as a output, but
some people have had problems with it, because the computer may not
like to hold it steady in one state.

The ports from your computer are RS-232 levels, meaning they are -12v
to +12v, so if you use them on a 0v to 5v TTL signal, you need to
convert them. There are lots of level converter chips out there for
that (MAX-232 for exampl
e)
0 Kudos
Message 6 of 7
(5,325 Views)
Thank you for your comment. I tried it with the parallel port and it worked. The way I did it is to use one of the 8 data pins and a signal ground pin from the 25 pin connetor. Then use outport VI to write to the parallel port and put then in three sequence frames where I wrote low-high-low to generate a pulse. I also put a timeout of 1ms in the second frame so presumably I think the pulse lasted for 1 ms.( I think I can go lower than 1ms, but I am not positive) Another thing that surprised me is that the output is 5V instead of 12V, which saved me the time to build the hardware to convert the voltage to what I wanted.
0 Kudos
Message 7 of 7
(5,325 Views)