ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String Indicator Hex Display Limit Bytes Per Line

Solved!
Go to solution

Hey,

 

I was wondering if there is a way to limit the amount of bytes per line in a string indicator that is in the Hex Display mode.  I am reading in 50 bytes using the VISA functions and I would like look at sets of 50 bytes each on a new line.  I tried just resizing the indicator but I found that if the 50 bytes have a lot of large characters like C's and D's then it will overflow to the next line and become a mess to look at.

0 Kudos
Message 1 of 4
(3,031 Views)
Solution
Accepted by Gus67

@Gus67 wrote:

Hey,

 

I was wondering if there is a way to limit the amount of bytes per line in a string indicator that is in the Hex Display mode.  I am reading in 50 bytes using the VISA functions and I would like look at sets of 50 bytes each on a new line.  I tried just resizing the indicator but I found that if the 50 bytes have a lot of large characters like C's and D's then it will overflow to the next line and become a mess to look at.


I would suggest using a fixed-width font, such as Courier New. This way, for 50 characters, it will always be the same length on the indicator.

Message 2 of 4
(3,017 Views)

Haha great idea.

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

You could append a linefeed character after each read if you know that you're always going to read 50 bytes.  But, then, you'll still have the strings misaligned if you don't use a fixed-width font and you won't be able to easily compare different readings in the indicator.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 4 of 4
(2,996 Views)