LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert txt-file

Hey,

 

I have an easy question but for me it is quite difficult to find a solution. I am new in Labview. My question goes as follow:

 

When you have a txt-file and you want to read it in labview. How do you do that?

This txt-file exits off numbers. You can see an example of the txt-file in the appendix. After reading the txt-file in labview, I want to put the numbers in an array. So the first column of the array  contains numbers that you can find in the first column of the txt-file. How can you do that?

 

If you can help me, thank you very much!

 

Kind regards,

 

Nicolas  

 

 

0 Kudos
Message 1 of 8
(2,450 Views)

Use the Read From Spreadsheet File.vi. Look at the LV help for how to use this function.

 

note: with a png it is not possible to determine what are the column separators, the txt file would have been more usefull.

 

Ben64

0 Kudos
Message 2 of 8
(2,445 Views)

Hi,

 

       Try using "Read From Spreadsheet File.vi".

 

Best Regards,

Luis A. Mata C.
Ing. Electrónico
Whatsapp: +58-414-1985579
BBM Pin: 2B83E99A
Thanks: Kudos
0 Kudos
Message 3 of 8
(2,441 Views)

Hello,

 

I have read your explanations, I have try it, but I don't understand it. Labview is something new for me. So can you please give me a little bit more explanation about the program who reads the txt file in array?

 

Is it possible to describe step by step how I need to work?

 

Kind Regards,

 

Nicolas

0 Kudos
Message 4 of 8
(2,409 Views)

Hello Nicolas,

 

Can you post an example (in txt-format) of the spreadsheet file you want to read?

 

Have you already went through this page?

http://www.ni.com/gettingstarted/labviewbasics/

 

This will learn you some LabVIEW basics which can be very useful for a new LabVIEW programmer.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 5 of 8
(2,390 Views)

Use Read from spreadsheet file and give input to this function as your txt file.

0 Kudos
Message 6 of 8
(2,386 Views)

You need:

Path control (points to the text file)

Read from spreadsheet file (looks like tab separated)

Index array, to get your 1st column

Array indicator to show your result.

 

Done. 🙂

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 8
(2,361 Views)

You also would need some wires... 😉

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 8 of 8
(2,308 Views)