LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert fragment string from File to values

Solved!
Go to solution

Wich function use to convert fragment string to values?

 

I have this string in File:

 

Instrument:NI-DAQ;Date:01-10-2008;
Quantity:Voltage[V];
Results: 1.23,3.45,5.65,6.89,...;

 

And i need values - 1.23,3.45,5.65,6.89

0 Kudos
Message 1 of 6
(3,547 Views)

Hi Cris,

 

open the context help, then move the mouse pointer of all those functions in the string functiosn palette!

 

I would use MatchPattern to search for a keyword (like "Results:" in your case), followed by SpreadsheetStringToArray with proper format string, delimiter and array constant inputs…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(3,524 Views)
Solution
Accepted by topic author crisdragon

 Hi crisdragon,

 

You have to use the native LabVIEW file and string API.

I made you an example.

 

Hope this help.

Sabri JATLAOUI - Certified LabVIEW Architect - Certified LabVIEW Developer
Download All
0 Kudos
Message 3 of 6
(3,522 Views)

Spreadsheet String to Array followed by Array Subset might work if the header format is well defined. You may need to change the delimiters.

 

Lynn

0 Kudos
Message 4 of 6
(3,478 Views)

sabri.jatlaoui

 

You are awesome. I have one question how make one Array Control and Indictator at the same time like in example?

0 Kudos
Message 5 of 6
(3,469 Views)

 Hi crisdragon,

 

Right click on the input, output or wire you want and choose create control or indicator.

 

Godd luck.

Sabri JATLAOUI - Certified LabVIEW Architect - Certified LabVIEW Developer
0 Kudos
Message 6 of 6
(3,449 Views)