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: 

Question about CR and LF

Solved!
Go to solution

Hey guys,

 

Quick question about LF and CR. As you can see I am writing LF and CR into a text file and directly reading it back.

t

 

However, I am not getting the CR back when I read it. Why is this? Is this because Windows ignores the CR?

 

Thanks

0 Kudos
Message 1 of 4
(2,434 Views)
Solution
Accepted by topic author doradorachan

Hi dora,

 

read the help for the WriteText function.

 

There is an option for handling of CR/LF characters and it is explained mentioned in the "Advanced" section of the help article!

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,423 Views)

Yeah this is one of those rare cases where right clicking a primative gives you more options.  From a interface prospective I like that this type of setting is quick to change and means less inputs to a subVI.

 

From a developer perspecive I feel like they are hiding features behind menus.  Maybe if more functions supported right click options I would like it more, but as it is I think there are probably a dozen or so functions that do this.  Array to Cluster, Format Into String, Scan From String, Read/Write Text File, VISA Write/Read, Compound Arithmatic, In Range and Coerce, and several XNodes have extra menus too.  I probably missed some, but in the grand scheme of things where you have 100s of things on the palette, not many functions support this feature.

Message 3 of 4
(2,400 Views)

Thanks guys,

 

I totally forgot about that some VIs had the right click options.

As hooovahh mentions, its a bit confusing that they would hide some aspects of certain VIs..

0 Kudos
Message 4 of 4
(2,349 Views)