LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with the formatting spreadsheet to array

I'm a newbie with programming labview, so constructive comments would be welcome!  This is a whole new way of programming for me, but I like it.

I'm trying to receive the following protocol.  Here is a couple of sample packets:

 

&&\r\n
0108136.19\r\n
0110146.19\r\n
01130.35\r\n
012350.00\r\n
!!\r\n

 

&&\r\n
2350155.19\r\n
!!\r\n

 

They send multiple packets but it always starts with the 0108 code(first 4 characters of 0108136.19).  I store the multiple packets beginning at 0108 in one row in the array, watch for the next 0108 to start the next row.    I remove all the &&, !! and \n\r.  So I would like to wait for a 0108 before storing any data because I'm getting a partial row of data.

I also store the data(offset of 4 until the end of line).  I strip out the data and format the data into a string used with 'spreadsheet to array'.  Also when receiving a 0108 I insert an EOL, a timestamp in seconds, then a comma, then the first data.

 

The problem I'm having is:  I dont know what the last line of data is so I insert the EOL in front of the timestamp.  Well this works, except it inserts a partial line into the first element of the array. I would like to insert the EOL at the end of the line but I have tunnel vision right now.  Any suggestions?

 

Also any help on waiting to start until I receive the 0108 would be great.

My vi's are Labview 2010

 

TIA,

 

Jerry

 

 

Download All
0 Kudos
Message 1 of 2
(2,406 Views)

Please ignore this post.  I made some progress and did a new post with more descriptive subject.

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