LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Port- Read Multiline Data

I have an application to read a device on serial port. The data is sent in multiline from the device when i send a command string "a"

 

This is the data to  read. I read it on hyperterminal and i can  read it fine. 

 

 

a00:  682159  106.258mV =2028.89 a01:    2118    0.330mV =0.13 a02:    2088    0.325mV =39 a03:    1633    0.254mV =0.51
 a04:      36    0.006mV =5.5 a05:      53    0.008mV =0.66 a06:      47    0.007mV =7.7 a07:     -56   -0.009mV =0.88
 a08:      59    0.009mV a09:      60    0.009mV a10:      10    0.002mV a11:      50    0.008mV
 a12:      18    0.003mV a13:      41    0.006mV a14:      19    0.003mV a15:      -2   -0.000mV

 

 

However from labview i get

 

"\sa00:\s\s682351\s\s106.288mV\s=2028.95\sa01:\s\s\s\s2137\s\s\s\s0.333mV\s=0.13\sa02:\s\s\s\s2092\s\s\s\s0.326mV\s=39\sa03:\s\s\s\s1638\s\s\s\s0.255mV\s=0.51\r\n"

 

Thats effectly the data from the first line. I am writing "a\n" to thr serial port to read data. Somehow i am not able to read data from rest of the lines. 

 

. I am using the basic 2 port serial write read VI from labview examples. 

 

Can anyone suggest a way around. 

 

Thanks

 

Abhi

0 Kudos
Message 1 of 2
(3,068 Views)

Check the help on VISA Configure Serial Port VI.  A termination character of '\n' is enabled by default causing the read operation to stop when it gets to the linefeed character.

0 Kudos
Message 2 of 2
(3,054 Views)