ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
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.
已解决! 转到解答。
@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.
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.