Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Example Program
NI Supported: Yes
Publish Date: Aug 11, 2008


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Loopback Test for Serial Port

79 ratings | 4.01 out of 5
Print

Downloads

Filename: loopback-lv5.zip
Requirements: View

Filename: loopback_lv8.zip
Requirements: View

Filename: loopback_lv4.zip
Requirements: View

This is a LabVIEW program that will verify the operation of your serial port hardware. You will need a standard 9-pin serial cable and some wire or a paperclip to peform this test.

Connect the serial cable to your serial port and then short the transmit and receive pins of the cable with the wire. For an RS-232 cable you must short pin 2 to pin 3. For an RS-485 cable you must short pin 4 to pin 8 and pin 5 to pin 9.

The VI will send a test phrase across the serial cable. If you receive the same test phrase back, then your serial port is working correctly.

The Loopback_LV4.zip file contains a Loopback.vi that was written in LabVIEW 4.0.1. You will be able to use this VI in LabVIEW 4.0 or higher.

The Loopback_LV5.zip file contains a Loopback.vi that was written in LabVIEW 5.0.1. You will be able to use this VI in LabVIEW 5.0 - 7.1. This version of the Loopback.vi has a much cleaner GUI (graphical user interface) and error handling, otherwise they are the same VI.

The Loopback_LV8.zip file contains a Loopback.vi that was written in LabVIEW 8.0. You will be able to use this VI in LabVIEW 8.0 or higher.

Requirements


Filename: loopback-lv5.zip

Software Requirements


Application Software: LabVIEW Full Development System 4.0.1
Language(s): LabVIEW

Hardware Requirements


Hardware Group: Serial

 
Filename: loopback_lv8.zip

Software Requirements


Application Software: LabVIEW Base Development System 8.0
Language(s): LabVIEW

Hardware Requirements


Hardware Group: Serial

 
Filename: loopback_lv4.zip

Software Requirements


Application Software: LabVIEW Full Development System 4.0.1
Language(s): LabVIEW

 
79 ratings | 4.01 out of 5
Print

Reader Comments | Submit a comment »

There is a problem with this test
If you run this continously it appears not to function at all. The string read remains blank. Actually it is erased just after it is written. I suggest just removing the erase. The string will be erased by the received string anyways.
- May 16, 2003

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).