ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

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
(4,055 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
(4,032 Views)
Solution
Accepted by 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
(4,030 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,986 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,977 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,957 Views)