LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change front panel value after reading numeric input from file?

I want to change the default value of one of the numeric inputs after reading value from a text file.

Can someone help me. I am struck. 

 

In the photo shown below, I want to change the value of "Start Carrier" to a value that I read from a text file. 

0 Kudos
Message 1 of 17
(3,587 Views)
An image of the front panel does nothing to explain the problem you are having or what you have tried. To change the value, you can simply write to a local variable. There have been numerous posted examples of using an ini file.
0 Kudos
Message 2 of 17
(3,578 Views)

You have a few options.  I would just use a local variable to read the current value (at the beginning of the program, that will be the actual default), use Bundle By Name to update the Start Carrier in the cluster and then another local variable to write the cluster value to the control.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 17
(3,573 Views)

crossrulz wrote:

You have a few options.  I would just use a local variable to read the current value (at the beginning of the program, that will be the actual default), use Bundle By Name to update the Start Carrier in the cluster and then another local variable to write the cluster value to the control.



I am totally new to Labview, didn't have much time to learn as this is a very small part of my project. 

 

Can you PLEASE HELP ME with this. I can share the code with you. 

 

0 Kudos
Message 4 of 17
(3,563 Views)

@ Dennis_Knutsson :  I am new to Labview and I am from Computer Science background, I don't understand INI files or the variables that you mentioned.

I went through the explames but couldn't understand a thing.

 

Maybe, a snap of the front panel isn't enough. Tell me, what should I upload for you to help me ? My code ot block diagram ?

 

I really appreciate your help, mate.

0 Kudos
Message 5 of 17
(3,558 Views)

gauraangKhurana wrote:  I can't understand a thing that you wrote.

If you do not know of Local Variable and Bundle By Name and Cluster, then you definately need to go through some of the tutorials.  They will help you a lot more than we can at this point.

3 Hour Introduction
6 Hour Introduction
LabVEW Basics
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training
Learning NI
Getting Started with NI Products


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 17
(3,555 Views)

No, please dont do this. Please, I beg you.

 

Okay, so here is the situation.

 

I have a "Start Carrier" field in my front panel which is a part of a cluster constant. I just want to change the value of this field by inputing from a file.

I know how to read a file and read the values in the file. Can you please just explain to me, how can I set these values(that I've read from the file) to the "Start Carrier" field again.

 

Please help me crossrulz

0 Kudos
Message 7 of 17
(3,542 Views)
Ini files have been around for a very long time on pc's. Probably older than you and something a computer science major should know of. Some basic Windows tutorials might also help.

https://en.m.wikipedia.org/wiki/INI_file
0 Kudos
Message 8 of 17
(3,537 Views)
You've already been told what to do. You've already been told that you need to show your code. This is not the place for getting your homework done for you. It is expected that you actually try to do something yourself and put a little effort into learning the language.
0 Kudos
Message 9 of 17
(3,532 Views)

Thanks for the very informative "INI" tutorial. 

 

No, you are getting me wrong. I did go through the tutorials on YouTube (atleast 20-30) of them. 

I just cant figure out how to change the default value of my front panel programmatically.

 

I have been struck on this for hours. That is why I came up here.

 

Here, is my code. I need to change "Start Carrier" which is a part of "Rx Parameters".

 

Thanks alot. 

 

 I am not trying to get my homework done. Just trying to get some help from the community. Maybe the level of questions isn't that good, but plz help me.

0 Kudos
Message 10 of 17
(3,518 Views)