LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS-232

Hello Everyone,

 

I have been working on receiving  signal from MSP430 board. Following are the steps that  I am following for my project:

 

1)  Receiving bytes from RS-232 port. These bytes are received at 9600 baud rate. I am using only 1 stop bit, no parity and no flow control.

 

2)  I have modified the 'Advanced Serial Write and Read .VI' available in NI examples. The VI collects the data in  30 seconds and in 30 seconds it is supposed to collect 6000 byte. I have set buffer size as 6000 bytes.

 

3) I have checked in hyperternminal and another software called 'realterm' which shows the data on RS-232 port. These two accessories are showing correct data received on RS-232 port but my VI is not able to read all the data .

 

4) My VI stops running once it collects all the 6000 samples.

 

5) The arrays shown here converts the ASCII bytes ( append two consecutive bytes to form a word which is converted to HEX). Dont bother about the arrays as they are working fine.

 

Whats the problem???...

 

My VI is not able to read all the data correctly. After few seconds from start it shows around 1230 bytes (any random number which is less than 6000 bytes) are received . In another few seconds it shows some more bytes are received. After some time like (10 or 15 secs) it shows that it received all 6000 bytes and then stops. The data received is corrupted (showing lot of noise) also some times it takes forever to collect 6000 bytes as it starts recollecting the data from 0 when it looses some bytes.

 

I am not sure what is actually happening in RS-232 and labview protocol .

 

Can anyone help in  this regard???

 

Thanks a lot in advance!!!! 

 

Here is my VI. 

0 Kudos
Message 1 of 2
(2,408 Views)

Firts  if you clean up your code a little its easy to follow

 

second i delay should help

0 Kudos
Message 2 of 2
(2,388 Views)