From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use single element as both control as well as indicator in labview

Hi All,

 

I need to use single element for both control and as an indicator.

I need not want to use its value property os shift register.

0 Kudos
Message 1 of 15
(3,618 Views)

Hi pmg,

            I think this thread will be helpful to you.

           http://forums.ni.com/t5/LabVIEW/Using-a-control-as-both-an-indicator-and-control/td-p/1113158 

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 2 of 15
(3,611 Views)

You need to use a control since you said you want to use a control.

 

If you want to update what is displayed in the control programmatically, you don't have to use a value property node.  You can write to a local variable of that control.

0 Kudos
Message 3 of 15
(3,609 Views)

If we use local variable or value of property node then i can't use it as a sub vi. This is the problem i am facing 😞

0 Kudos
Message 4 of 15
(3,606 Views)

You never mentioned anything about a subVI in your original post.  That is why it is important to give some detail on what you are actually trying to do.

 

You can use a property node in a subVI.  You can pass a reference of the control that you want to manipulate to the subVI.  Then wire that reference to a value property node inside the subVI.  Now the subVI can change the value of the control in the main VI.

0 Kudos
Message 5 of 15
(3,602 Views)

 Find the attachment code, you may get some idea as what i am trying to do. But if i am using value of this number i am unable to use this VI as sub VI for any other VI's

 

 

 

 

0 Kudos
Message 6 of 15
(3,600 Views)

If you don't mind can you show the code of how to use reference and propety node in main VI's and sub Vi as you mentioned please.

0 Kudos
Message 7 of 15
(3,598 Views)

Your code still doesn't explain your actual problem. If you want to perfor any calculation inside a sub vi do as same and create and indicator instead of using the value property node and the create a sub vi with the control and indicatior terminals and then use it in your main vi.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 8 of 15
(3,593 Views)

Your attached VI really doesn't show what you say you are trying to do.

 

Searching the forums for subVI and reference finds numerous message threads on what you are trying to do.  Here http://forums.ni.com/t5/LabVIEW/Control-Slide-in-subvi-by-reference/m-p/1420526 is one that I think is a pretty good example.

0 Kudos
Message 9 of 15
(3,589 Views)

Attached vi will give you more Idea to resolve your problem.

you can try this way also.

Regards
Prabhakant Patil
0 Kudos
Message 10 of 15
(3,567 Views)