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

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

动态输入数目 子vi

大家好!请问如何编写输入数目不定的子vi?类似于C语言中带有动态输入数目的函数。LabVIEW8.2

 

0 项奖励
1 条消息(共 9 条)
5,955 次查看
Don't quite understand what you want to do... what about Random Number (0-1)? It can be used to produce any Random number with little coding...
Message Edited by ian fung on 04-03-2010 02:13 PM
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
2 条消息(共 9 条)
5,945 次查看

你好,首先谢谢你的帮助。可能我的描述不够准确。但是我不是要生成一个随机数,而是编写一个子vi,可以接受动态数目的输入个数。比如此VI可以接受1个输入,2个输入,等等。

 

thank you for your kindness.but what I want is a vi witch can accept different number of inputs,for example 1,2,or 3 inputs,and so on.The vi you passed to me can produce a random number,I cant understand.

0 项奖励
3 条消息(共 9 条)
5,935 次查看

What is(are) the input type(s)?

Are the input(s) of the same type(s)?

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 项奖励
4 条消息(共 9 条)
5,916 次查看
One way, for taking dynamic data of the same type, is using CSV string...
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
5 条消息(共 9 条)
5,913 次查看

Thank you very much.The vi is really helpful.I think maybe I can creat an array with all the inputs of the same type,and the subvi accept an array.Then,in the subvi,I can use the Array-size function to get the size of the input array.Thus it maybe also a way for inputs of the same type.

But what if the inputs are of different types?

0 项奖励
6 条消息(共 9 条)
5,903 次查看

By the way,how can I get the type of a control ?

0 项奖励
7 条消息(共 9 条)
5,902 次查看

Cluster, for example, can be Flatten To String, passed to sub-vi , and recovered with Unflatten From String. I maybe wrong but this, however, seems to work only with known cluster (with know set of diff. data type).

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 项奖励
8 条消息(共 9 条)
5,884 次查看

Thank you.

0 项奖励
9 条消息(共 9 条)
5,876 次查看