LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

i would like to use indicators as controls and vice versa

Dear Colleagues,
Hello all
i would like to read parameters from a file,make some changes if necessary in some parameter value,execute my application(using these new parameters for some application)and then save these parameters values to a new file.
what i adoing right now is to write parameters to a file in a separate VI and again when i call another VI, i read the text file and using some local variable in a separate control, i change the value like Amplitude 1.but i dont want to use separate indicator an control for that purpose. i want that what i am reading in amplitudea, i could be able to change vaue in same amplitudea, but not in extra amplitude 1. i have attached My vis. please tell me how can i
do that?
0 Kudos
Message 1 of 6
(3,196 Views)
Have you noticed that a local variable can be either "Read" or "Write" ? Just right-click the terminal, and change to read (or write).
Then write directly the local variable...

I guess that by the time you get this answer, you found that by yourself !

Additional comments :
1/ keep your diagram compact : it should ALWAYS fit in a 1024/768 screen, whatever your screen size. It is much easier to debug/maintain a vi when you can see everything at a glance. Consider that ALSO as a kind of courtesy to others...
2/ respect ALWAYS the left to right wiring rule. This will avoid misunderstandings, as in your second frame. Consider that ALSO (2) as a kind of courtesy to others...
3/ there is no need to convert an array into a cluster to read the elements
: just use an "Index array" node and expand it to reach further outputs (have you noticed that with multiple outputs, there is no need to wire all the index inputs (auto-indexation)?).
4/ use an "Array subset" node to suppress the first column and first row of your data array, in a single operation, instead of two "Delete from array" nodes.

See the attached image to have an idea of how your diagram should have looked...
Chilly Charly    (aka CC)
0 Kudos
Message 2 of 6
(3,196 Views)
Thanks.
is there any way to use property nodes for this purpose.
using property node would be better? how to use property nodes here instead of local variable.
what are the advantages of property nodes over local variable and what are the advantages of local variable over property nodes.
regards
0 Kudos
Message 3 of 6
(3,196 Views)
Of course, you could use property nodes.
But they are usually slower than local variables (run in the User Interface thread).
Their main advantages are :
a/ they can be used dynamically (you can get refs programmatically for any control on the FP), and
b/ a value change can generate an event (to be used in association with an event structure).

In both case, the memory cost is the same (copy of the data), and the LV data flow is impaired.

CC
Chilly Charly    (aka CC)
0 Kudos
Message 4 of 6
(3,196 Views)
i tried to use property nodes as indicator and control. that means in amplitudea indicator i am reading some value and i would like to write other value in the same amplitudea indicator(that means convert the same object from indicator to control).with property nodes i tried, but it does not work why?
thanks
0 Kudos
Message 5 of 6
(3,196 Views)
You can neither convert a control to an indicator nor the reverse.
The only thing you can do is *write* programmatically to a control, or *read* an indicator. But the object will remain the same, as when created.
Local variables can be used either to write or to read any control/indicator on the FP.
Same for property nodes.
Attached is an example of what you can do...

Hope this helps !

CC
Chilly Charly    (aka CC)
0 Kudos
Message 6 of 6
(3,196 Views)