LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why same data write into txt file and write csv file,then read txt and csv .result is different

Dear All Why Meanwhile write same data into txt file and csv file .then read the data from txt file and csv file . the rusult is not identical,it should be same data .but the result is different. i found that csv file data is right,but txt file data is wrong. why is txt file save data wrong? Best Regards hoover
0 Kudos
Message 1 of 10
(3,506 Views)

Have any code for us to look at so we can diagnose where you went wrong?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 10
(3,489 Views)

Dear  crossrulz

 

the program purpose is to calculate accurately the Yamaichi times through the value((times-C/B Name.txt)+Yamaichi Name.txt) .inside the C/B Name.txt save the C/B value,inside Yamaichi Name.txt save the Yamaichi value.

explanation is the procedure


PART1
1:Path1    C/B Name.txt save the C/B times from the C/B. flat sequence 0 read from C/B Name.txt, flat sequence 1 write to C/B Name.txt
2: Path2    Yamaichi Name.txt save the yamaichi times.  flat sequence 0 read from Yamaichi Name.txt, flat sequence 1 write to Yamaichi Name.txt
3:times is the C/B value from DUT everytime test  add 1 automaticlly.

 

PART2

Save the (Timestamp)  (YMCode)  (C/B used time) (YM used time) (Note) in the FHE_CB_233 A.csv.

every day (C/B used time) value is righ,diffC/B  in the .csv file should be equal to the diffYM

 but from 2014/09/04 is not equal to the diffC/B value.

i doubt that Write/Read txt file occur garbage,but have any evidence.

Why data in .csv is right ,save in txt may be save abnormal.


Calculate Yamaichi.vi is mainvi
YAMAICHI_2014_05_14_0604.vi is the subvi.

attach is tha program.

thanks for pointing out the problen in the program.

 

Best Regard

 

hoover

0 Kudos
Message 3 of 10
(3,463 Views)

Please attach your code in the commonly used .zip file format.

 

Very few people use .7z.

0 Kudos
Message 4 of 10
(3,434 Views)

7zip will even zip to the .zip format that everyone else uses.  Don't be difficult.

0 Kudos
Message 5 of 10
(3,428 Views)

 

Dear  OriolesFan

 

Thanks for you help.

attach is the zip format.

 

Thanks

 

Best Regards hoover

0 Kudos
Message 6 of 10
(3,398 Views)

@natasftw wrote:

7zip will even zip to the .zip format that everyone else uses.  Don't be difficult.


I don't think he's being particularly difficult.  As long as someone is using Windows XP or greater, they can extract a .zip file even if they have NO archiving programs.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 10
(3,390 Views)

Yes.  But, that's not true for a 7z file.  That's why using 7zip to zip it to .7z instead of .zip is being more difficult than needed.

0 Kudos
Message 8 of 10
(3,378 Views)

@natasftw wrote:

Yes.  But, that's not true for a 7z file.  That's why using 7zip to zip it to .7z instead of .zip is being more difficult than needed.


That's what I get for posting after I should be in bed.  I totally misread your original post.  For some reason or other I thought you were advocating using the 7z format.  You are abosultely correct!  Sorry about that.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 9 of 10
(3,366 Views)

I'm having a hard time from your description trying to figure out what you are trying to do.  Because you use a lot of abbreviations for data items, its difficult to figure out how everything relates to each other.

 

I do see some problems with your code.  First, start with doing a block diagram cleanup.  And where you have a stacked sequence structure, replace it with a flat sequence structure.  Then it will be easier to fix other problems.

 

You use an excessive number of local variables.  Why?  Most places, if you just used wires, you can eliminate the local variables.  If you're lucky, right now the local variables just make it harder to figure out what is going on.  If you are unlucky, then you have race conditions where you have no control over what parts of code get executed first, and the values used in one part of your VI are stale from a previous iteration of the VI.

 

You have some case structures are stacked pretty deep making it hard to find out what is going on.  But also within those case structures, you have code duplicated.  If some code is the same between the cases, it belongs outside of the case structure.  Likewise you don't need local variables in each case, you can wire in from the outside.

0 Kudos
Message 10 of 10
(3,348 Views)