LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read and write(control should act as indicator and viceversa)

Solved!
Go to solution

Have you at all tried to use the Local Variables ?

0 Kudos
Message 21 of 30
(1,508 Views)

hey,its not about local variables or global (I agree that string could be updated).ALL im asking is for 1string icon to be used for the same purpose of read and write

-------------------------------------------------------------
kudos welcome
0 Kudos
Message 22 of 30
(1,507 Views)

You don't get it ?

you CAN use the local variables for that control to read AND write the value of the control

 

But you can NOT change the way controls are made. They are controls for mainly inputting values, and that is what they will continue to be.

 

And what is 1string icon ??? control, indicator, Local or global variable. Give the right description!

 

0 Kudos
Message 23 of 30
(1,498 Views)

please...

Open labview.exe-->create one control(string or integer)-->right click on it-->goto properties-->goto databinding-->select data socker-->in access type you find read/write option

 

same  im asking for unbound section.I think this time im clear

-------------------------------------------------------------
kudos welcome
0 Kudos
Message 24 of 30
(1,494 Views)

Why would you want this ??

There has be a lot of suggestions for how you normally will handle write to a control. Why are you not using those ?

0 Kudos
Message 25 of 30
(1,486 Views)

 


omprakash wrote:

In my vi,i will be making string to be displayed to user so that there would be no need for him to fill it(JUST RUN PROGRAM).

But now if he wants to change string and writes his own, then comes the problem(UPDATED STRING VALUE TO BE TAKEN).


 

OK, if the pre-filled text is always the same and should exist at the start of the program until changed by the users, use a plain string control, enter the desired text, and make the current value the default. Save the VI (No code needed!). If you later want to reset the text programmatically to a different value, you write the desired new value to a local variable of the string control.

 

For some reason you seem stuck. Can you explain what is giving you problems? What is your LabVIEW version?

 

0 Kudos
Message 26 of 30
(1,469 Views)

You CANNOT write to a control directly.  Period.  Labview doesn't allow it.  You aren't ever going to be able to do this. 

 

But you can change the control's value programatically by creating a LOCAL VARIABLE and writing to that local variable.  If you do this, then the user does not have to type in anything, the program will do it for him, and then the user can change it if he wants.  See diagram below:

 

20853iE7753A3BE1D023FA

- tbob

Inventor of the WORM Global
0 Kudos
Message 27 of 30
(1,468 Views)

Try this example (LV 8.0):

 

 

  1. The text control has a non-empty default value.
  2. The text control can be modified by the user
  3. there is a button to change the text control to a given value.
Questions?

 

0 Kudos
Message 28 of 30
(1,458 Views)
Solution
Accepted by omprakash

Here's a slightly better way that eliminates the update delay when things change.

Message 29 of 30
(1,453 Views)

Smiley Happy

Thanks for your unstopping effort.

sorry to say this,at present im following the same way as your vi did... but using global variables instead.

you are the one who thinks much and understood what i was looking for...

Here in our logic we need one control and one indicator seperately for the same purpose.ALL i was looking was to getboth in one.

THANKS A LOT FOR YOUR EFFORT PUT TP HELP ME

-------------------------------------------------------------
kudos welcome
0 Kudos
Message 30 of 30
(1,413 Views)