微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 测试测量 > 虚拟仪器 > LabVIEW中Ring和Enum两数据类型有什么区别?

LabVIEW中Ring和Enum两数据类型有什么区别?

时间:12-13 整理:3721RD 点击:
如题,LabVIEW中也提供这两者的控件,不知两者有些什么区别?
.139

The enumerated constant is similar to a ring constant, but you cannot customiz
e the corresponding numeric values for the string labels in an enumerated cons
tant. The numeric value is always an integer from zero to n – 1, where n is t
he number of values in the enumerated constant.
Unlike the ring constant, the labels associated with an integer value are part
of the data type. If you pass the value from an enumerated constant to an ind
icator, LabVIEW displays the string label instead of the numeric value.
简单来说,enum必须从0到n-1.ring无所谓.
.70

ring缺省状况下对应的数值和Enum一样,也是从0到n-1, 怎么对ring对应的数组进行设置
呢?
.139

右键--properties--edit item--uncheck顶上那个sequential value复选框, values就可
以随便写了.
come on, 你从不看帮助吗?
.70

我的LabVIEW中怎么没这项快捷菜单,右键点击后,出现如下图片。
我的LabVIEW版本是6.1, 你的呢?
文章中所说的图片在Web中可以看到。
.139

我的是labview 7.0 evaluation version.
也许你add item的时候可以修改这个值, 也许ring输出是string, num是数值, 也许在lv6
里面他们就没区别. 你还是查帮助吧.
实在不行,就用combo.然后转换string到数值.
.70

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top