NI LabVIEW,CVI,数据采集等产品讨论区

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

新手请教一个有关knob的问题

我想用一个knob做电压数字输入,电压最小间隔是0.0005V,范围是从0-20V。我想让用户在转动旋钮的时候能够之间转到整数的位置,如果要输入小数电压才在digital display中输入,请问有没有办法实现这个功能?我如果设置increment为0.0005V,转动旋钮的时候就很难转到整数位置了,请问有没有办法解决呢?
0 项奖励
1 条消息(共 13 条)
6,566 次查看
虽然knob的本身属性不支持这样的设置,但可以用coding达到你的目的。例如用knob来表示整数,用一个单独的数字控件(numerical control)作为小数点后面的值,两者之和就是你需要的最终的值。
0 项奖励
2 条消息(共 13 条)
6,554 次查看

谢谢你的建议,这是个挺好的替代方式:)

我还有一个问题想再请教一下。如果我用text ring作为Knob的值,可不可以给每个marker赋多于6为小数的值呢?我发现如果小数超过6位就会自动裁掉,这时候的format设置好像不起作用的样子。

 

0 项奖励
3 条消息(共 13 条)
6,527 次查看
in the Format and Precision property, select: floating point, select "Digits of precision" instead of "Significant Digits", uncheck "Hide Trailing Zeros". it should show all the number you specify.

make sure you use DBL instead of SGL, as SGL has only 6 digits of precision.
0 项奖励
4 条消息(共 13 条)
6,520 次查看
You may right click the Text Ring, select Format & Precision, then increase the digit of precision, i.e. floating point, 8 digit of precision
John L.
0 项奖励
5 条消息(共 13 条)
6,519 次查看
谢谢!但是用Text Label的时候好像不起作用,还是6位,奇怪。
0 项奖励
6 条消息(共 13 条)
6,489 次查看
把你的程序简化之后发上来吧,看看你的需求是什么
感觉你们说的不是一回事
0 项奖励
7 条消息(共 13 条)
6,488 次查看
好,谢谢。就是example里面的这个样子,用knob来表示一个电流量程选择,想用knob值表示量程最大值
0 项奖励
8 条消息(共 13 条)
6,470 次查看
please provide the vi in labview v7.1 or 7.11 format.
0 项奖励
9 条消息(共 13 条)
6,462 次查看
这是7.1的,谢谢高兴表情
0 项奖励
10 条消息(共 13 条)
6,447 次查看