LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create constant

Let's say that I wiring the Open File.vi from Labview 6i. If I
right-click on the deny mode input and select create->constant, I get
this nice little pull-down box (is it an enum?). I want to be able to
do this on my own sub-VI's. How do I create the input for the sub-VI?
What type is it? How do I define the different values (e.g. 0 = deny
read & write, 1 = deny write-only) for my own sub-VI? Will it be
possible for me to be able to do the right-click create->constant for my
sub-VI?

thanks,
stephen
0 Kudos
Message 1 of 3
(3,397 Views)
The answer is to use a control called a text ring. It is located in the Controls->List & Ring palette. If you use this control, and then connect it to the connector pane of your subVI, when you place it in a parent VI and select create->constant on that input, the pull-down box that you are referring to will appear, providing that you have put in text in the control in the subVI for each numeric that the text represents.

Hope that helps.

Mark
0 Kudos
Message 2 of 3
(3,397 Views)
Hi Stephen

You can do this by using an "Enumerated Type" control (List and Ring
pallete) on the subvi's front panel (and assigned on the connector pane).
It is much like a ring control, but it has a couple of handy features.
Check out the Labview help reference on "Enumerated Type Control", which is
what I did, because it explains it all.

Paul

Stephen Gray wrote:

> Let's say that I wiring the Open File.vi from Labview 6i. If I
> right-click on the deny mode input and select create->constant, I get
> this nice little pull-down box (is it an enum?). I want to be able to
> do this on my own sub-VI's. How do I create the input for the sub-VI?
> What type is it? How do I define the different values (e.g. 0 = deny
> read & write, 1 = deny write-only) for my own sub-
VI? Will it be
> possible for me to be able to do the right-click create->constant for my
> sub-VI?
>
> thanks,
> stephen

--

Research Assistant
School of Physiotherapy, Curtin University of Technology
Selby Street, Shenton Park, Western Australia, Australia. 6008
email: P.C.Davey@curtin.edu.au
Tel. +61 8 9266 4657 Fax. +61 8 9266 3699

"Everyone who calls on the name of the Lord will be saved." Romans 10:12
"For all have sinned and fall short of the glory of God, and are justified
freely by his grace through the redemption that came by Christ Jesus."
Romans 3:23-4
0 Kudos
Message 3 of 3
(3,397 Views)