LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

txt string spreadsheet

Hi :

 

i have txt string and i want to spread it to array

 

for example my txt string is like the

 

Power Off,0.00,0,0,Volts,Pass
Relay Init,1.00,1,1,,Pass
Power On,12.00,11.8,12.2,Volts,Pass
-- Result Pass (59/0)

 

and i want to each raw insert to array\record like this

index 0 = Power Off,0.00,0,0,Volts,Pass

index 1=Relay Init,1.00,1,1,,Pass

index 2=Power On,12.00,11.8,12.2,Volts,Pass

index 3=-- Result Pass (59/0)

 

how can i do that in labview

 

 

 

 

0 Kudos
Message 1 of 5
(2,133 Views)

Hi,

 

Take a look at the code i have attached .. This will solve your problem.


Regards,


Nitzz

(Give Kudos to good Answers, Mark as a solution if your problem is Solved:smileywink:)

0 Kudos
Message 2 of 5
(2,124 Views)

Hi Elyan wisam,

see the "Spreadsheet String to Array" function. It's located in the string palette.

 

Mike

Message 3 of 5
(2,120 Views)

Hey Elyan

 

As Mike wrote this is what you could do.

stringToArray

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

If you want to load your string input from a txt file you need to use the read txt file subVI in the File I/O palette.

 

Sletten

0 Kudos
Message 4 of 5
(2,115 Views)

Hi Mike,


Thanks for this solution.. I didn't think about this simple solution..:)

 

Regards,

Nitzz 

0 Kudos
Message 5 of 5
(2,113 Views)