05-14-2015 05:49 AM
Dear NI commuunity,
Im pretty new in LabVIEW, so i have some broblems with data reading.
I take a screenshot and mark a problem as Part - A and Part -B below:
The goal description:
I'm making a mathematical simulation using the old software whitch exporting results as shown in Case1... .DAT file, also it shown in picture (notepad).
Firstly i need no read this data then i need to draw XY graph.
Problem Description:
I was created a LabVIEW program and im using a read spreadsheet funciont shown in Part -B but when im trying to read data im getting all zeros...
so i cant identify my problem... what is wrong?
i have try different file to read its Case_test_working.txt and everything is good with this data but when im trying to read *.DAT file the zeros comes to array...
I was tryed to use different seperator symbols, also try to imort data to exel then export to *.scv, *.txt formats, but rezults was the same as shown in Part-A.
Every time i get zeros but not a results as in *.DAT or other exported format file with same data.
Please be respectifull and understand that im still newbie in labview but i think its great software for data analysis filtering and calculations, so i want master this software for my future usages.
With Respect,
Tomas E
Solved! Go to Solution.
05-14-2015 06:54 AM
The decimal point , rather than a comma , can be solved by using a period .
Then, replace "," to "."
05-14-2015 07:14 AM
@KONDOH wrote:
The decimal point , rather than a comma , can be solved by using a period .
Then, replace "," to "."
You could also use "%.;%6f" for the format string. The "%.;" sets the localization decimal to use a period.
05-14-2015 07:56 AM
Dear KONDOH,
i was tried to use different decimal point symbol, but result was the same. You post the picture with block diagram, can you explaint what is the function of this diagram? some of this bloks i newe use and dont know how to find them. I want to try to create similar diagram and try again to read *.DAT file.
Thank you for quick responce,
Tomas E.
05-14-2015 08:13 AM
05-14-2015 08:16 AM
The picture i posted is " VI snippet " .
Drag a VI Snippet PNG image onto the block diagram it will drop the snippet as LabVIEW code. http://www.ni.com/tutorial/9330/en/
05-14-2015 08:54 AM
Delimiter of the DAT file are Two spaces.
Decimal point is piriod.
Format is Scientific Notation.
05-18-2015 03:28 AM - edited 05-18-2015 03:28 AM
Dear KONDOH,
This time is almost perfect, except negative values. this block diagram do not understand negative values and somehow convert it to positive.
here is a screenshoot of the results shown in part a.
I try to edit your block diagram to solve this problem but its to difficult with my expierence, so i posted the results with oroginal your diagram.
Sorry for long respond, i was in conference last weekend.
Thanks for your solution, this time all values are readed except negative.
With Respect,
Tomas E.
05-18-2015 04:51 AM
Dear tmsworld
Oh! This data file is not a separated string.
This data file is fixed length string file.
05-18-2015 05:31 AM
Dear KONDOH,
I do not understand why everything works well for you, but for me its still zeros...
Maybe, my computer or LabVIEW settings are different? or something with configuration?
There is your Block Diagram results:
I make the assumption that something is wrong with configuration, or my computer do not uderstand some fragments of block diagram...
Do you have any advice for this, or maybe need to take same changes in diagram?
Thanks for your patience with me,
With Respect,
Tomas E