LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Format data from Rs232 connection Newb questions

Basically put this is my data;

4.2,30.9,968.8,1816,18/09/17,14:41:49
4.5,30.9,968.8,1814,18/09/17,14:41:59
.... ect.
The goal is to display this on screen in rows/columns and perform some very basic math between readings and then averaging readings.
next step. expert to excel 
Data is separated by commas.. I was thinking 2D array but I'm open to suggestions. 
 
Can anyone one help a newb out?
Thanks
 
0 Kudos
Message 1 of 4
(2,763 Views)

You can convert the data to an array using the "spreadsheet string to array" function found in the string palette. Depending on what you wire to the "array type" input will define what type of array it is converted to (the default is Dbl, but you can wire an array of string as well), This will give you an array to work with. If you have an array of string it can be wired directly into the value property of a table.

You say that the values are comma separated, what defines the end of a row, as you have shown it?

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 4
(2,757 Views)

Hi Caffeine,

I thinks you use "VISA Read" to have these datas. the output is a String

Use élement of String Palette to perform operations of formatting. Then, you can use the palette Array. to perform others operations.

 

Yes, I thinks also that it is the right way.

 

Regards,

Fred

0 Kudos
Message 3 of 4
(2,754 Views)

Use the "Spreadsheet String to Array" vi and set the delimiter to a comma.

 

That will separate your data into a string array, then you will have to convert the strings to numbers to do any math on them.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 4
(2,747 Views)