LabVIEW:将数值数组转换为字符串数组
使用 LabVIEW 2009,我有一个可以输出 U64 整数数组的 VI。
我希望用户能够从此数组的元素中执行离散选择。
我正在考虑通过以编程方式填充菜单环来实现此目的 (如http://digital.ni.com/public.nsf/allkb/所示FB0409491FAB16FA86256D08004FCE7E)。
但是,我显然需要将 U64 整数数组转换为字符串数组, 因为它是一个字符串数组,用于填充菜单环。
我的问题:如何将 U64 整数数组转换为字符串数组?
Using LabVIEW 2009, I have a VI that outputs an array of U64 integers.
I'd like the user to be able to perform discrete selection from among the elements of this array.
I'm thinking of accomplishing this by programmatically populating a Menu Ring
(as shown at http://digital.ni.com/public.nsf/allkb/FB0409491FAB16FA86256D08004FCE7E).
However, I apparently need to convert my array of U64 ints to an array of strings,
as it is an array of strings that is used to populate the Menu Ring.
My question: how can I convert the array of U64 ints to an array of strings?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过“字符串\转换”调色板中的“数字到十进制字符串”原语?它甚至应该接受一个数组。
我不确定它是否适用于 U64 号码,因为我似乎有一个模糊的记忆,它会将号码强制转换为 I32,但它可能会。无论如何,如果您希望环控制的实际值是您想要的数字,请务必将环控制的表示形式更改为U64。
Did you try the Number to Decimal String primitive from the String\Conversion palette? It should even accept an array.
I'm not sure if it will work on U64 numbers, because I seem to have a vague memory of it coercing number to I32, but it probably will. In any case, if you want the actual value of the ring control to be the number you want, be sure to change the representation of the ring control to U64.
Format Into String 似乎可以工作(尽管它不接受数组,因此您必须对其进行循环)。
Format Into String seems to work (although it won't accept arrays, so you'll have to loop over it).