Showing results for 
Search instead for 
Did you mean: 

Read in Binary form in VISA read function

Here's a Lab VIEW example I found about ASCII VS Binary. 


Perhaps my understanding of strings needs adjustment, when it comes to Lab VIEW strings.  For example, in C, a string is a nul terminated array of characters.


However the Lab VIEW example talks about a binary string.  The display of the binary string looks like ASCII escape codes for null "\00", which would make it more like an ASCII string representing binary values or some such thing.  I don't know, really. 


0 Kudos
Message 11 of 13

I think you're getting hung up on displaying the data as a string type versus an integer type. Since your data isn't encoded as ASCII, it makes more sense to display it as integer.


And it wasn't clear if you got past the issue of the COM driver stripping off the "0" byte (ASCII NUL) or not.

0 Kudos
Message 12 of 13

The backslashes are a display mode (right click on the string box to see) to show different characters that aren't printable.  It is a mix between human readable and displaying non-printable characters.


What you are seeing is a \0F which means a 0F byte (SI or Ctrl-O in the ASCII table).  If you had a null character is would show up as \00 in the \codes display mode of a string.


The other modes are normal (purely human readable, non-printable characters don't show), hex display (all bytes show up as their hex value), and password display (hides all characters).


How to display strings is a basic part of LabVIEW.  I would recommend looking at the online LabVIEW tutorials.
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

0 Kudos
Message 13 of 13