LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Config file formatting changes automatically in cRIO

This is a LabVIEW/RT issue that I have yet to figure out...  I have a cRIO that is using a standard .ini configuration file, and it updates that file when certain parameters change (to be used during intialization if it is rebooted later).  The file is updated with the necessary changes, but for some reason, it loses all of the carriage return formatting, and ends up all on one line.  The functions it is using for read/write are actually the exact same functions I use on the desktop host program, and the issue does not occur there, so it must be an inherent issue with how the cRIO processes configuration files...  Or perhaps an issue with how the files are transferred from the processor?

 

Anyone else run into this?  Any causes and/or solutions?  If it stays like this, it may be the final push for me to completely rewrite my configuration code to use XML format in the long run, but I really need a solution in the short term here to make these files more easily readable for troubleshooting.

0 Kudos
Message 1 of 4
(2,629 Views)
Quick mobile reply: use wordpad or notepad++. Notepad does not like the linux linefeeds the crio uses.
Michael.
0 Kudos
Message 2 of 4
(2,624 Views)

Ah, good call.  I'll try that out when I get a chance and see how it looks!  I had a feeling there was an easy answer, it just wasn't coming to me through knowledgebase searches...

0 Kudos
Message 3 of 4
(2,620 Views)

Hi Vrmithrax,

 

The GNU/Linux operating system and the Windows operating system utilize different formatting methods for text files.  Because of this, you will need to use a text editor that supports the formats used for GNU/Linux such as the editors mentioned previously by Michael78.  The default notepad text editor in Windows does not include this functionality and will cause issues like the one you are experiencing.  

 

The deeper explanation is that Windows uses a "Carriage Return; Line-Feed" set of characters at the end of a line whereas the unicode (Linux-default) text file structure only uses a "Line-Feed" at the end of a line.

 

Hopefully that helps!  Let me know if you have any further questions.

| Zach J. | Systems Engineer, HIL and Test Cells | National Instruments |
0 Kudos
Message 4 of 4
(2,588 Views)