LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help:why I can't read from RS232

I can write to RS232 port in labview, but I couldn't read the
responce from instrument on RS232 when i was using the serial
port VIs or visa VI's. What I read from RS232 was the last
command I sent to it. If I tried to use any terminal program,
communication was very well. I wonder why. Could someone give me
some sugguestion? Thanks in advance.

Tong

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
0 Kudos
Message 1 of 6
(5,089 Views)
Probably the serial port is not configured the same way by LabVIEW and other
terminal programs.
Try to see how RTS and DTR lines are asserted when the decice respond
correctly and assert them the same way in LabVIEW.

The fact that you receive the last command send is simply induced signal
pickup between RX and TX.
This suggest that the device does not assert RX.

Jean-Pierre Drolet

ye1122 a écrit dans le message :
0ceccf32.b4a9ad19@usw-ex0105-035.remarq.com...
> I can write to RS232 port in labview, but I couldn't read the
> responce from instrument on RS232 when i was using the serial
> port VIs or visa VI's. What I read from RS232 was the last
> command I sent to it. If I tried to use any terminal program,
> communicat
ion was very well. I wonder why. Could someone give me
> some sugguestion? Thanks in advance.
>
> Tong
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network
*
> The fastest and easiest way to search and participate in Usenet - Free!
>
0 Kudos
Message 2 of 6
(5,089 Views)
ahhhhhhhhh! the dreaded RS 232 interfacing problem. Just a suggestion, (as
it might not be this), make sure that you have the right pins configuration.
Often, for example, a 9 pin in serial communication needs to have pins 2 and
3 reversed in the lead so that on both instrument and com port, pin2 is TX
and pin3 is RX. A pre-constructed lead from Tandy etc usually doesn't.

Other issues could be related to the operating system.

Happy RS232ing!
Regards
Paul Conroy

ye1122 wrote in message <0ceccf32.b4a9ad19@usw-ex0105-035.remarq.com>...
>I can write to RS232 port in labview, but I couldn't read the
>responce from instrument on RS232 when i was using the serial
>port VIs or visa VI's. What I read from RS232 was the last
>command I sent to it. If I tried to use any te
rminal program,
>communication was very well. I wonder why. Could someone give me
>some sugguestion? Thanks in advance.
>
>Tong
>
>* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network
*
>The fastest and easiest way to search and participate in Usenet - Free!
>
0 Kudos
Message 3 of 6
(5,089 Views)
That's a good suggestion Paul! Personally, I use an RS232 cable that I have
chopped in half, and then reconnected using a screw terminal block (also
available from Tandy, if you like!) - use a continuity tester (most multimeters
have them built in) to find out which wires refer to which pins. Have a look
in the Hardware Book (http://people.aero.und.edu/~nordlie/hwb/menu_Connector.html)
for more info on what to connect to where.

cheers,
Christopher


"Paul Conroy" wrote:
>ahhhhhhhhh! the dreaded RS 232 interfacing problem. Just a suggestion,
(as>it might not be this), make sure that you have the right pins configuration.>Often,
for example, a 9 pin in serial communication needs to have pins 2 and>3 reversed
in the lead so that
on both instrument and com port, pin2 is TX>and pin3
is RX. A pre-constructed lead from Tandy etc usually doesn't.>>Other issues
could be related to the operating system.>>Happy RS232ing!>Regards>Paul Conroy>>ye1122
wrote in message <0ceccf32.b4a9ad19@usw-ex0105-035.remarq.com>...>>I can
write to RS232 port in labview, but I couldn't read the>>responce from instrument
on RS232 when i was using the serial>>port VIs or visa VI's. What I read
from RS232 was the last>>command I sent to it. If I tried to use any terminal
program,>>communication was very well. I wonder why. Could someone give me>>some
sugguestion? Thanks in advance.>>>>Tong>>>>* Sent from RemarQ http://www.remarq.com
The Internet's Discussion Network>*>>The fastest and easiest way to search
and participate in Usenet - Free!>>>>




Copyright © 2004-2023 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
0 Kudos
Message 5 of 6
(5,089 Views)
Hello labviewer...

First of all, you must have a null-modem RS-232, you know (pins 2 and 3 in
TX are 3 and 2 in RX). If you have this OK, now you must have the same configuration
in your equipment and in the PC. There are two ways to initialize the Serial
Port, by Windows directly, but first you have to check the Labview initialize,
there is a function in Communication that initialize the Port, because you
have to tell the Pc which COM are you going to TX and Flux Control and more...


ye1122 wrote:
>I can write to RS232 port in labview, but I couldn't read the>responce from
instrument on RS232 when i was using the serial>port VIs or visa VI's. What
I read from RS232 was the last>command I sent to it. If I tried to use
any
terminal program,>communication was very well. I wonder why. Could someone
give me>some sugguestion? Thanks in advance.>>Tong>>* Sent from RemarQ http://www.remarq.com
The Internet's Discussion Network *>The fastest and easiest way to search
and participate in Usenet - Free!>
0 Kudos
Message 4 of 6
(5,088 Views)
I recently experienced the same problem with a SCPI (kind of serial communication) equipped unit.
I could send but wasn't able to receive any data. I got a hint in the user manual to inactivate RTS due give the com-port the adequated -12V. this is necessary if the unit has a build in optocouppler. in my case I had to deliver -12V on RTS and +12V on DTR. unfortunately I see no possibility to activate/inactivate the UART-registerbit by LabView - this was no problem in Basic: OPEN"COM1:9600,N,8,1,RS,DS0"

I hope this helps


sincerely
0 Kudos
Message 6 of 6
(5,088 Views)