LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can '\' (backslash) mode be interpreted from a string or can it only be viewed by a control, indicator, constant

Solved!
Go to solution

Hello, 

 

I was reading through the most recent posts regarding backslash mode on https://forums.ni.com/t5/LabVIEW/Is-the-backslash-a-printable-character-in-format-string/td-p/308056...

 

I previously worked on parsing RS-232 data however couldn't determine whether it would be possible for data in the text file to be formatted in '\' mode rather than hex. Is it possible for the backslash mode to be converted when being parsed via a text file? Are there any functions that can achieve the interpretation which is equivalent. 

 

The only way I know to make all formats compatible is by right clicking on a control, indicator or constant so that all formats can be viewed.

 

Many Thanks

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

It is possible, but will be a pain to program.  It would be easier to get a program that will let you view the text file in hex mode.  Generally, the \ Codes is just a display format for the data in a string.  And yes, you are not using the basic ASCII display, do so the format type.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,513 Views)
Solution
Accepted by neunited

I already answered to this question here.

Basically you need a string control or indicator whose display style is "\" Codes display. Read the text formatted with "\" codes from file and then assign it to the Text.Text property of the control: this is equivalent to manually typing the text into the control. After this assignment, the value of the control will be the desired string (e.g. the text \s will appear as a space character).

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 3 of 3
(2,498 Views)