From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO end-of-line localization bug?

 

With labview version 8.6.1 localization of end-of-line is not the same with all functions on my compact RIO 9012 target. "End of Line Constant" seems to be CR-LF, but "Array To Spreadsheet String" seems to use only one character. Is it a bug? What is the correct end-of-line for compact RIO? When the same VI is run on Windows XP both functions use CR-LF and it works as expected.

0 Kudos
Message 1 of 3
(2,571 Views)

"svein" <x@no.email> wrote in message
news:1235653807477-860860@exchange.ni.com...
> &nbsp;With labview version 8.6.1 localization of end-of-line is not the
same with all functions on my compact RIO 9012 target. &quot;End of Line
Constant&quot; seems to be CR-LF, but &quot;Array To Spreadsheet
String&quot; seems to use only one character. Is it a bug? What is the
correct end-of-line for compact RIO? When the same VI is run on Windows XP
both functions use CR-LF and it works as expected.

As far as I know, Array To Spreadsheet String always uses \n (LF) as end of
line character. The difference probably occors when storing the string to
file. The write file functions have an input convert EOL, which might be
important in your case.

You can always replace all \n's with \r\n's with the search and replace
string function.

Hope it helps,

Wiebe.


0 Kudos
Message 2 of 3
(2,531 Views)

Old topic, but the problem just occurred again... it is cRIO-specific:

 

On cRIO the "End of Line Constant" seems to be CR/LF, but the "Array To Spreadsheet String Function" uses LF. I find this inconsistent.  

"End of Line Constant" should be platform-dependent according to documentation. "Array To Spreadsheet String Function" obviously is platform-dependent as EOL is different on PC and cRIO. What can I expect from other string functions on cRIO?

 

The suggested workaround of using search and replace throughout the code to handle this is not very satisfying, although it works. 

 

NI, please document what the EOL-character(s) should be on cRIO. Then I can know when I need to add search&replace-workarounds, and when I don't.

 

Svein

 

PS: Last year I made my own "End of Line Constant" that defaults to CR/LF on Windows and LF on cRIO. But I don't know if this is "right" and if it will work correctly in future versions of Labview.

0 Kudos
Message 3 of 3
(2,371 Views)