ni.com is currently undergoing scheduled maintenance.

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

取消
显示结果 
搜索替代 
您的意思是: 

String Indicator Hex Display Limit Bytes Per Line

已解决!
转到解答

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 项奖励
1 条消息(共 4 条)
3,084 次查看
解答
已被主题作者 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.

2 条消息(共 4 条)
3,070 次查看

Haha great idea.

0 项奖励
3 条消息(共 4 条)
3,051 次查看

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

4 条消息(共 4 条)
3,049 次查看