07-05-2012 11:13 PM
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.
07-05-2012 11:34 PM
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
07-05-2012 11:35 PM
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.
07-05-2012 11:39 PM
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 😞
07-05-2012 11:43 PM
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.
07-05-2012 11:51 PM
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
07-05-2012 11:54 PM
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.
07-05-2012 11:58 PM
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.
07-05-2012 11:59 PM
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.
07-06-2012 05:52 AM
Attached vi will give you more Idea to resolve your problem.
you can try this way also.