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,437 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,426 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,403 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,352 Views)