05-13-2013 12:15 AM
Hello...
Can we change the default value of any control in run-time??
Say, i'm having a numeric control,where the default value set as 103. Now in run time I will change it to 150 and next time when I run my VI the numeric control should have value 150,and not 103.
Thanking you,
sushmith
05-13-2013 12:18 AM
No its not possible. You can set Default value only in edit mode.
05-13-2013 12:22 AM
Hello,
Oh then it is a long procedure to change the value, we will have to store it in a file and reload everytime when i run my VI.
Thanking you,
sushmith
05-13-2013 12:31 AM
Exactly..
05-13-2013 12:34 AM
Why cant you use property node to change the value in run time. As soon as program loads pass the wanting value.
05-13-2013 07:48 AM
@Ranjeet_Singh wrote:
Why cant you use property node to change the value in run time. As soon as program loads pass the wanting value.
Read the question more carefully. They want to retain a value between runs. The OP asked if you could just change the default value in the run-time so that the value will be retained. This can't happen. You have to save the value to a file. You can then use a property node or local variable to set the value after reading the value from the file.
05-14-2013 01:42 AM
Hello crossrulz,
Yes, that is wat I wanted. I wanted to change DEFAULT value of a control during run-time. I wanted to know if any alternative method is there instead of saving it into a file and accessing it.
05-16-2013 05:52 AM - edited 05-16-2013 05:59 AM
..
05-16-2013 07:03 AM
Sir crossrulz,
May be my line is not correct. What I mean to say is here.
Run the master VI and from the menu select set option. Then next time it will read the previous value.
Friend sushmith_ks,
May be what I am saying is not correct but it can be implemented in this way as I dont know your application. but try like this.
Thanks
05-16-2013 09:10 AM
You can do something like this to save & retrieve values without using a file.