LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

help with rs232

Hi,
I'm using the easy serial loop back test vi, and the vi's that came with labview but no luck. I've connected pin 2 and 3 together, and have tried all the com ports that are avalible. can anyone offer some help.

JMD
0 Kudos
Message 1 of 8
(3,206 Views)
Does your loopback test work using Hyperterminal? What errors are you getting from LV?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 8
(3,205 Views)
I am using LabVIEW 8.2, the evaluation version.
I also connect the pin2 and pin3 and the test is successful by HyperTerminal.
However, with the example  "loopback.vi" downloaded from NI, the test doesn't work.
There are undefined errors with both "write.vi" and "read.vi" of the "loopback.vi".
Doesn't that matter the NI-VISA uninstalled??

Thanks!
0 Kudos
Message 3 of 8
(3,053 Views)
It makes a great deal of difference if VISA is not installed as that is what LabVIEW uses for serial communication. download the latest version from here.
0 Kudos
Message 4 of 8
(3,033 Views)
Thanks a lot!

I download the NI-Serial which also install NI-VISA 4.0 to my computer.

And then, when I run "loopback_5", the error will be shown:

Error -1073807298 occurred at Serial Port Write.vi
VISA:  (Hex 0xBFFF003E) Could not perform operation because of I/O error.

 With NI-Spy, I get the following red line:

 > 15.  VISA Write ("ASRL4::INSTR", "Test String")
> Process ID: 0x000015A8         Thread ID: 0x00001234
> Start Time: 16:13:32.437       Call Duration 00:00:00.000
> Status: 0xBFFF003E (VI_ERROR_IO)
> Buffer Contents
> 00000000:  54 65 73 74 20 53 74 72 69 6E 67                 Test String

BTW, I use a USB TO RS232 9 Pin Cable since my PC only has USB Port.
Is the error related to the cable??


0 Kudos
Message 5 of 8
(3,003 Views)
I have no idea what loopback_5 is and NI-Serial is for NI's serial hardware but you can look at this post and see if the same thing fixes your problem.
0 Kudos
Message 6 of 8
(2,982 Views)
Thanks!

 Well, "loopback_5" is the example developed with LabVIEW 5.0.1 to test a loopback of serial communication from NI: http://zone.ni.com/devzone/cda/epd/p/id/4318

 It has a  much cleaner GUI (graphical user interface) and error handling.

From the provided post, a suggested way is to add a Flush I/O buffer (mask 16) before reading. However, it seems my problem is about the write part.
Besides, what can a "Flush I/O buffer" do? And the Mask??

I just use the NI example "loopback" to test my RS232 communication (Pin 2 connected with Pin3), which operates OK in Hyperterminal.

Message Edited by pockey on 12-19-2006 07:58 PM

0 Kudos
Message 7 of 8
(2,957 Views)

Hi,

Like Dennis said with the link : try to solve it with a 'set buffer size' function

It was the solution for me to get my USB<--> RS-232 modules from Belkin to work.

0 Kudos
Message 8 of 8
(2,945 Views)