LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CSV content corrupted (symbols # - & not displaying properly)

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

0 Kudos
Message 1 of 6
(1,245 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(1,200 Views)

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.

0 Kudos
Message 3 of 6
(1,189 Views)

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

0 Kudos
Message 4 of 6
(1,145 Views)

nvm what i posted was already suggested.

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 5 of 6
(1,126 Views)

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?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(1,117 Views)