LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

template controls

Solved!
Go to solution

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

0 Kudos
Message 1 of 10
(3,045 Views)
you may be able to use a cluster with different data types in it
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 2 of 10
(3,042 Views)
here is a picture of a cluster:
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 3 of 10
(3,036 Views)

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

0 Kudos
Message 4 of 10
(3,025 Views)

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...

- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 5 of 10
(3,004 Views)

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.

- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 6 of 10
(3,003 Views)

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:)

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 7 of 10
(3,000 Views)
Solution
Accepted by topic author vivekkde

this thread may help:

 

http://forums.ni.com/ni/board/message?board.id=170&message.id=176208&query.id=165237#M176208

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 8 of 10
(2,994 Views)

Thank you Karold!

 

Really an eye-opener.

- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 9 of 10
(2,981 Views)

Aaha !!!! One more time discussion forum helped me ......

Thanks A Zeal To Harold !!!!

 

Cheers 🙂

0 Kudos
Message 10 of 10
(2,973 Views)