LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problems whith rs232 comunication

Hi,
I'm a labview beginner and I have any problems whith RS232
comunication.
I have a litle program to receive 24 Bytes and some bytes are repeted.
I made my program with the serial compatibility icons and the baud
rate is 19200 baud.

Thanks
0 Kudos
Message 1 of 7
(2,929 Views)
You have to close the serial port with the "Close Serial Port.VI" before you
make a new transmission. I think, this will help.

Holger Decker


"ulises" schrieb im Newsbeitrag
news:ff152451.0109130242.23c5f57c@posting.google.com...
> Hi,
> I'm a labview beginner and I have any problems whith RS232
> comunication.
> I have a litle program to receive 24 Bytes and some bytes are repeted.
> I made my program with the serial compatibility icons and the baud
> rate is 19200 baud.
>
> Thanks
0 Kudos
Message 2 of 7
(2,929 Views)
First of all, I prefer to use the VISA functions but do you see the same behavior when you use something like Hyperterminal? Get the communication to work here before trying to write your program. Some things to try are doing a flush serial buffer before doing a write. And instead of specifying the byte count, I would recommend using the Bytes at Serial Port.vi to determine how many bytes to read.
0 Kudos
Message 3 of 7
(2,929 Views)
Dennis Knutson wrote in message news:<50650000000500000087410000-999158726000@exchange.ni.com>...
> First of all, I prefer to use the VISA functions but do you see the
> same behavior when you use something like Hyperterminal? Get the
> communication to work here before trying to write your program. Some
> things to try are doing a flush serial buffer before doing a write.
> And instead of specifying the byte count, I would recommend using the
> Bytes at Serial Port.vi to determine how many bytes to read.

I have tested all things you said me, but i obtain the same result.
The byte 8 is repeat, and some times the byte 16 too. i'm not sure if
my software is correct.
Can you send me or said me where are a program running good.

Thanks
0 Kudos
Message 5 of 7
(2,929 Views)
There's serial comm examples that come with LabVIEW. In labVIEW 5, there's "Easy VISA Serial Write & Read.vi" under the Instrument I/O>VISA pallette. LabVIEW 6 has some under Help>I/O Interfaces Examples>Serial Communication.
0 Kudos
Message 6 of 7
(2,929 Views)
If you have two COM-ports you can connect them and run on one them you VI an
send on the other a text with windows hyperterminal and check what you VI
receives.

hope that helps, niko
0 Kudos
Message 7 of 7
(2,929 Views)
1. check the other parameters in port configuration (parity, data bits, stop bits, flow control)
2. you can try to use the smplserl.llb from LV examples or MAX in order to check your communication via RS232 and after that build your VI.
good luck
0 Kudos
Message 4 of 7
(2,929 Views)