NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
qa9b
Posts: 2
0 Kudos

Output logic signals with Labview?

Hi all,

 

I'm very new to instrument communication & labview. I have an existing setup with two keithley DMMs interfaced by GPIB & VISA to a Labview program. The computer has the standard outfit of USB ports, a serial port, and a GPIB card.

 

For automation purposes, I need to be able to provide 4 bits of parallel logic to an external circuit. My question is... what's the easiest way to do this? Can I drive individual lines of the serial port high and low? If so, can you recommend a starting place for my learning?

 

Thanks!

Trusted Enthusiast
crossrulz
Posts: 4,024
0 Kudos

Re: Output logic signals with Labview?

Do you have to do any sort of timing with the digital lines?  If not, I would simply go with a USB-6501 or PCI-6503 and use DAQmx.

Proven Zealot
johnsold
Posts: 7,853
0 Kudos

Re: Output logic signals with Labview?

To directly answer your question: No. The voltages on a serial port are not compatible with any standard logic family of devices.

 

As crossrulz pointed out, the best approach is likely to obtain a suitable DAQ device.

 

Lynn

Member
qa9b
Posts: 2
0 Kudos

Re: Output logic signals with Labview?

The NI USB device definitely looks nifty, but I really do think it's overkill for my situation. I only need 4 data lines and no timing.

 

Can you further explain why the serial port wouldn't work? From my understanding, it outputs extremely distuingishable logic levels (+-5V or higher). Custom circuitry could translate the levels, or maybe even a full solution like the MAX232 (http://www.maxim-ic.com/datasheet/index.mvp/id/1798) would do the trick; obviously I wouldn't be needing to transmit anything. A $10 solution seems pretty attractive. Is there any other reason why this wouldn't work?

Trusted Enthusiast
crossrulz
Posts: 4,024
0 Kudos

Re: Output logic signals with Labview?

[ Edited ]

I'm not sure the UART will let you control the lines the way you want.  And even if it will, you will spend way more than $100 of your time trying to get it to work.  The obvious economical way is the USB-6501.

 

Another alternative that I have done is to use the parallel port.  But we ran into port and resource issues when changing computers and it quickly became a mess.  We went to using the DIO in our DAQ card instead and had absolutely no issues.

Knight of NI
Dennis_Knutson
Posts: 29,330
0 Kudos

Re: Output logic signals with Labview?

With a VISA propery node (Serial Settings>Modem Line Settings) you can control the handshake lines (DCD,DTR,RS,RTS).

Proven Zealot
johnsold
Posts: 7,853
0 Kudos

Re: Output logic signals with Labview?

Yes, a few dollars worth of parts can convert the RS-232 levels to logic levels.  And, as has been pointed out, the time you spend building the circuit and writing a program to control the handshaking lines costs something.

 

If you are a student or hobbyist where the value of your time is counted far less than cash out of pocket, that may be a viable approach. In a for profit business buying a DAQ device is more cost effective.

 

Lynn

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page