12-07-2022 01:18 AM
Hello
I have a LabVIEW program that reads the content from a CSV file and displays the content on the front panel. The codes were developed on my personal computer, compiled to EXE, and run on another computer (machine).
On my computer, there are no issues found but on the machine, the original CSV file runs without issue and if the file (CSV) is edited on that computer, the symbols # - & change to +ACM-1 +AC0- +ACY-1
I'm not sure if this is an issue related to the file formatting (as the machine runs LibreOffice and the original file was created in MSOffice Excel) or if is there anything that should be done with my LabVIEW codes.
Note: I've used this method in my earlier projects with similar setups without any issues
Attached are the screenshot of both good and bad outcomes and the LabVIEW code
12-07-2022 06:26 AM - edited 12-07-2022 06:46 AM
Hi nitty,
your CSV files contains those "#"/"&" chars. Point.
So the issue seems related to that other computer:
Which language setting does it use?
Which codepage is set as default for that computer?
Is there any other INI file setting for your (LabVIEW) executable?
Does the same problem show when opening the CSV with a text editor like Notepad++?
Can you load the file using ReadBinary in a new executable and display it in a string indicator set to \-code display? Does the char conversion also take place here?
Btw. both chars are valid ASCII chars so they should show the very same on all (Windows) computers…
Suggestion:
Improve your VI. Remove all those Rube-Goldbergs, local variables and that stacked (!) sequence structure.
See this as a suggestion:
This is just a first step: those while loops mostly should be autoindexing FOR loops…
12-07-2022 07:05 AM
Is the other computer using exactly the same Criteria.csv file as you? Or they're creating/editing themselves? I wonder if LibreOffice is converting those symbols to +AC... You should try looking at the .csv file on the other computer using Notepad (or similar) and see what is shown.
12-07-2022 08:02 PM
Yes, The CSV file is the same. The original one was created by myself on my PC and that could run well in the machine. Once the file edited in the other computer it gets corrupted.
I'm having the same thought that the LibreOffice is converting the data in someway but can't find out if that's the real root cause.
However, I'll try out your advise to open in notepad and see
Thanks
12-07-2022 11:23 PM - edited 12-07-2022 11:24 PM
nvm what i posted was already suggested.
12-08-2022 01:02 AM - edited 12-08-2022 01:03 AM
Hi nitty,
@nitty wrote:
Yes, The CSV file is the same. The original one was created by myself on my PC and that could run well in the machine. Once the file edited in the other computer it gets corrupted.
Here it is!
Can you attach the edited version of that file? That's the most interesting part of the puzzle!
(Why do they use LibreOffice to edit a simple CSV text file?)
And can you please answer the questions from my previous message?