LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

from single 6-Data string (datas separated by commas) to different 1D arrays : LabVIEW based

I have Instrument generated a data-string (6 datas separated by commas) for single run and the instrument will keep on generating the another data string (another updated 6 data separated by comma) in a loop.....how to separate the 6 datas from single string and store it in different 1D arrays in LabVIEW and plot a "XY type" graph? finally how to store all the data (the datas are getting updated for each loop) in a .csv file? LabVIEW software

0 Kudos
Message 1 of 3
(625 Views)

Hi abhikanp,

 


abhikanp15@gmail.com wrote:

I have Instrument generated a data-string (6 datas separated by commas) for single run

how to store all the data (the datas are getting updated for each loop) in a .csv file?


Simply save those instrument data strings directly to a file as you already receive CSV-formatted data! (Maybe you need to add a CR after each string, depending on your device settings.)

 


abhikanp15@gmail.com wrote:

how to separate the 6 datas from single string and store it in different 1D arrays in LabVIEW and plot a "XY type" graph?


Use SpreadsheetStringToArray to separate your data into elements of a 1D array.

Then you can use any array functions you like to (including shift registers) to hold/collect/process your data!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(564 Views)

abhikanp15@gmail.com wrote:

I have Instrument generated a data-string (6 datas separated by commas) for single run and the instrument will keep on generating the another data string (another updated 6 data separated by comma) in a loop.....how to separate the 6 datas from single string and store it in different 1D arrays in LabVIEW and plot a "XY type" graph? finally how to store all the data (the datas are getting updated for each loop) in a .csv file? LabVIEW software


As graphical programmers, we don't really like long and ambiguous verbal descriptions. Maybe you could attach a simple VI that contains a few typical received strings.

 

So each string contains 6 values and I assume you want to collect those in a 2D array with 6 columns and N rows (much more reasonable than 6 different 1D arrays!!!).

 

What do you want to show on the xy graphs? Is one of this columns "x" (or time)? Is time information obtained separately? Is x equally spaced? how many plot do you want on the xy graph (e.g. 3 plots: col1 vs. col0, col3 vs col2, col5 vs col4)? Do you want to graph them continuously as new data arrives or only after all data is available?

 

You mention "single run". how do you define that term? Typically a program always runs in a state machine, where one state is idle in nothing needs to be done. I hope you are not talking a detour to edit mode between "runs"....

0 Kudos
Message 3 of 3
(542 Views)