05-08-2009 06:15 AM
Hi,
I am looking for an option like template in C++ where I create one template control let's say ring, use it in a VI and calling this VI with different rings(rings with different data entered). While I tried on my own way, but not getting the result. I hope this could be possbile with labview.
Please do let me know any techniques available if anybody has worked on such things earlier.
Thanks in Advance,
Vivek
Solved! Go to Solution.
05-08-2009 06:18 AM
05-08-2009 06:21 AM
05-08-2009 06:35 AM
Thanks Harold for your suggestion.
Actually, my requirement is like my Vi input should be capable of giving the text of any ring connected to it. I dont' know how many possibilities of rings could be, otherwise i could have tried cluster. That is why I am looking for something in the template side which could help me in achieving the design. Template in C++ ceates generic data type so runtime properties of data type is passed to it.
I hope such activities is also possible in labview.
Thanks,
Vivek
05-08-2009 07:47 AM
Hi Vivek,
You can save the ring in a VI as a Control (.ctl) in LabVIEW. Place a ring in a VI & rt-click >> Advanced >> Customize... It ll get opened in the Control Editor. There you can choose what type of Control [such as Control, Trpedef, Strict Typedef] you wish to save it to be used across many VIs.
Try this out. Hope this helps...
05-08-2009 07:49 AM
Forgot to mention...
During run-time, you need to pass the varying set of strings to the Strings[] property of the ring using the property node.
05-08-2009 07:57 AM
hmmm I understand what a template is I use C++ alot.
you want to use a ring control to pass several different types of types.
which is what a template does in C++ so that you do not need to make several different types of the same data.
I will look into it:)
05-08-2009 08:02 AM
this thread may help:
http://forums.ni.com/ni/board/message?board.id=170&message.id=176208&query.id=165237#M176208
05-08-2009 08:13 AM
Thank you Karold!
Really an eye-opener.
05-08-2009 08:34 AM
Aaha !!!! One more time discussion forum helped me ......
Thanks A Zeal To Harold !!!!
Cheers 🙂