Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to get rs 232 working on one machine

Solved!
Go to solution

Hi,

 

   I have a question about working with an RS-232 connection in LabVIEW.  I did a search on it in the Examples window in Help and found the Basic Serial Write and Read.vi file (it came standard with the IDE).  I read the description at the top (in the yellow box) and based on how I understood it, I should be able to write to the RS-232 connection (say COM1) and then read from it a little later and display the read string.  I typed in 10 characters of "a" and ran the app (right before the string "*IDN?\r\n").  The problem that I got was that the character array was not displayed!  Why?  I could swear that this worked somehow some time ago.

 

I do not get an error message, just don't see my original message that I typed in.

0 Kudos
Message 1 of 5
(3,944 Views)

What do you have connected to the serial port? Unless you've done a loopback, you will not get what you wrote. If you have no loopback or instrument, you will not read anything.

Message 2 of 5
(3,943 Views)

At the moment nothing.  I'm relatively new to RS-232 and doing development on it 🙂 .

 

How would you set up a loopback on it?

0 Kudos
Message 3 of 5
(3,937 Views)
Solution
Accepted by topic author RS_233

You connect the transmit line to the receive line. On a DB9 that's pins 2 and 3.

 

Doing a loopback does not do much more than test whether the port on the pc is functional. Not much good for debugging anything related to an actual instrument you might have to connect.

Message 4 of 5
(3,931 Views)
Quite true.  However, I have the format in which the data is supposed to be sent.  This is something that has been agreed upon.  If the receiver does not process the data correctly, then there's little that I can do (a little frustrating frustrating).
0 Kudos
Message 5 of 5
(3,898 Views)