Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

serial port cable???

Is there any chance that we can interface my hardware via serial port cable without using the NI-DAQ card? I am currently doing my senior project, and so the DAQ card may be an expensive tool for us to use it. Please help!!!
0 Kudos
Message 1 of 11
(4,748 Views)
I guess that depends on your hardware. If your hardware has a rs232 port then you can use your serial port on your computer to talk to your hardware. If you are trying to take a voltage measurement from your hardware then no you can not. Here are a few links to help explain what serial can and can't do.

http://zone.ni.com/devzone/conceptd.nsf/webmain/C553228FD78A7ADD862568F9006E9129?opendocument

http://zone.ni.com/devzone/conceptd.nsf/webmain/8DECBF3E0B714BF3862568F9006E7851?opendocument

In order to fully answer your question we need to know what you want to do. Do you need to send some serial characters, measure/output an analog voltage or read/write a digital value? Also, what kind of time frame are you working with and what university. I might be
able to help you out.

-Josh
0 Kudos
Message 2 of 11
(4,747 Views)
You're going to have to provide some more details on your hardware. Do you need to read or write digital lines? Read or write analog voltages? A serial port on a pc only has a handful of inputs or outpurs and they're digital. A parallel port has a few more but they're strictly digital as well.
0 Kudos
Message 3 of 11
(4,747 Views)
My hardware is going to send digital signal, serially, to my computer. All LabView needs to do is to read my digital signal from my hardware. I am currently studying at CSU-Sacramento, and my project is due MAY 2005. My project is mainly about monitoring a patient sleeping habbit via wireless communication system.
0 Kudos
Message 4 of 11
(4,747 Views)
My hardware is going to send digital signal, serially, to my computer. All LabView needs to do is to read my digital signal from my hardware.
0 Kudos
Message 5 of 11
(4,747 Views)
You should be able to use the serial port or parallel port. There's a couple of articles here on using both. The LabVIEW VISA and Inport functions could be used. One simple way to monitor a single line is to use of the serial port's control line inputs (DCD, DSR, etc.). From LabVIEW's VISA>VISA Advanced palette, select a property node. Right click on the property node and select Properties>Modem Line Settings>Line DCD State (or Line DSR State). This will return either an Asserted/Unasserted/Unknown value that you can convert to 1 or 0.
0 Kudos
Message 6 of 11
(4,747 Views)
I have one more question here. I have tried to test my serial port using one of the LabView example code, and it always shows me an error. In addition, the error message stated that this error is undefined and it may number of wires have wired up wrongly. Erm.... Any suggestion ?
0 Kudos
Message 7 of 11
(4,665 Views)

@computer engineering wrote:
I have one more question here. I have tried to test my serial port using one of the LabView example code, and it always shows me an error. In addition, the error message stated that this error is undefined and it may number of wires have wired up wrongly. Erm.... Any suggestion ?




One of the best ways to test out your serial port is to perform a loopback test. You can connect pins 2 and 3 of a serial cable and immediately read what you write on the same port. If you have already done this then what error message do you see precisely?

Craig H.
NI Applications Engineering
Message 8 of 11
(4,654 Views)
Thanks Graig H.

I have reinstalled my VISA driver, and then I have sucessfully run the loopback test.
Another question is that, I know that the serial vi is only ablw to receive string input. On my senior project, I want to a 8bits binary date via RS-232 to LabView. My question is that, is it possible? Do I need to convert the 8bits binary code into a string, and then only send to LabView via RS 232?

What if I used USB port? Does LabView has the USB vi that can receive data from USA port? And is it possible to receive a digital signal or a binary code?
0 Kudos
Message 9 of 11
(4,643 Views)
Hello,

If you want to use the serial port, don't forget about voltage levels and framing requirements of rs232 (+ or -10V as well as semi-strict requirements for how long a bit is present on the lines according to your baud rate). In practice, it's really a lot of work to interface a serial port to anything that doesn't already talk rs232 (unless you want to use the few DIO lines that rs232 provides as Dennis suggests). In the absence of a DAQ card, a parallel port can be used as "poor man's DIO". USB is like rs232, but more complicated (so I wouldn't go there unless you already have a USB interface on your external device).

Good luck with the project.

Scott B.
National Instruments
0 Kudos
Message 10 of 11
(4,273 Views)