LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display Window in Hex Format using a LF/CR

hello,

 

I am displaying the raw data from the Visa Read port in Hex format which is straight forward. I am concatenating the strings with a shift register and adding a Carriage Return to the string to display for each buffer so it scrolls in the window but in the Hex display format, it does not recognize the CR.. It just appends the data to the end of the previous data. It will display the 0D as data. How can i go to the next line each time I display the Visa Read buffer contents in this mode..

 

thanks

 

0 Kudos
Message 1 of 4
(3,094 Views)

It sounds like you want a hybrid type of display which LabVIEW doesn't have.

 

What you can do is take your string and convert all of your characters to a hex string, except those characters which are a carriage return or linefeed.  Then display that in a string indicator set for normal display mode.

0 Kudos
Message 2 of 4
(3,092 Views)

@Roadrunna wrote:

hello,

 

I am displaying the raw data from the Visa Read port in Hex format which is straight forward. I am concatenating the strings with a shift register and adding a Carriage Return to the string to display for each buffer so it scrolls in the window but in the Hex display format, it does not recognize the CR.. It just appends the data to the end of the previous data. It will display the 0D as data. How can i go to the next line each time I display the Visa Read buffer contents in this mode..

 

thanks

 


I'm a little confused why you would want to add a CR/LF to a string indicator displayed in hex. It seems to me that most people would just format the indicator so that X number of characters are shown, then make sure the vertical scrollbar is on the right-hand side. From your question it sounds like you may:

 

(1) Want to separate strings coming from different inputs, even though you need to concatenate them into one string for further processing? If so, you can do that just by having a separate indicator for each one. But you would have thought of that.

 

(2) Want to separate strings coming from the same input, but separated in time (different messages) where you get an indication (a termination character, or time lag, etc.) of when an individual message ends? If so, I wouldn't know how to put a blank line in (as RavensFan said, this is not a normal text indicator thing), but after each message you could introduce your own line's worth of characters which is not likely to show up in the data stream, say 1111 1111 1111 1111 1111 1111, which would give you a visual indication (but don't add it into the string which has to be processed, only your indicator).

 

or (3) Want to make sure that the text box always keeps up with the end of the character string, no matter how long it gets. This one's been answered before, and there is a KnowledgeBase page on it: How Do I Modify a Text Indicator So the Scrollbar is Always at The Bottom-Most Position?

 

Or maybe something else. Without a more-detailed description of your question (and the code you are presently using in the VI - NOT A PICTURE OF THE CODE!) I couldn't help you any further.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 3 of 4
(3,080 Views)

Why not do the binary to Hex conversion yourself and add the carriage/linefeed where you want and display it in normal text mode?

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(3,061 Views)