LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Front Panel Controls reset at every VI run.

Solved!
Go to solution

Hello, 

 

I have a test stand of which the GUI is designed in Labview; it takes pressure measurements and write to a word report. I currently encounter  an issue regarding the behavior of VI when i run it. It's explained below:

 

All my front panel settings and controls which i feed in before running the vi reset to blank windows when I run the VI. 

Also, I initially thought that, ok, even though the control values disappear, As long as they get written to the report, it's fine. But, It doesn't happen that easily. When i feed the front panel controls prior to running the VI and then run the VI, I have to stop the VI and run it again for them to be printed to the report. 

 

The pattern is like this:

 

1. Feed Front Panel control values.

2. Run the VI ===> Front Panel control values vanish. 

3. Conduct the test, stop the VI and Print the report ===> No control values get printed. 

4. Restart the VI again without entering any control values. 

5. Run the VI ==> Front Panel controls are blank(Obviously, because no values were entered).

6. Conduct the test, stop the VI and Print the report ===>Control values initially entered get printed. 

 

So, essentially, the front control values not only disappear when the VI is run but it also takes two consective runs for the values to go into memory and get printed in the report. 

 

The goal is to punch in control values -> Run the VI ->> Print report and the report is complete with all the control values in there. 

 

Now a little about the VI:

 

The control values I am talking about are simple String controls like Company Name, Operator name et al. 

The block diagram consisits of (LEFT TO RIGHT):

 

Producer & Consumer loops --> Type in Front panel controls --> Print report. 

 

That is, the Producer/Consumer loops output the data to the report generation tool kit. But the Front panel contols to be fed lie in between the Producer/Consumer loops and the print report function.(No express Vis used)

 

 

So, How do i get rid of my Front Panel control values disappearing. I want them to display when the VI is running. 

 

Please advice. 

 

Thanks in advance, 

RP. 

 

0 Kudos
Message 1 of 22
(4,845 Views)

Are they actually indicators and the VI properties are configured to clear indicators when called?

0 Kudos
Message 2 of 22
(4,827 Views)

Hey Alten, 

 

No, they aren't indicators and the VI is not configured to "Clear indicators when called". 

 

They are Controls on the front panel which feed their inputs to the word report. 

 

Regards, 

RP. 

0 Kudos
Message 3 of 22
(4,815 Views)

Is there a re-init all to default method involked?

 

We can keep playing twenty questions or you can provide an example that demonstrates the behavior.


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 22
(4,801 Views)

All I can think of are the "did you plug in the power cord" suggestions such as:

- Right-click on the control and search for locals, property nodes, etc.

- Instead of clicking Run, click Start Single Stepping on the block diagram. Put probes on the wires, turn on highlighting.

0 Kudos
Message 5 of 22
(4,799 Views)

Hello Jeff, Todd, 

 

@ Jeff

 

I can email you the code that I've written, if that's fine by you. 

 

@ Todd

 

I have tried these options but i can't  get to the bottom of the issue. I have checked the execution settings/status too. 

 

If there's anything intrinsic to the logic which is causing this, I am trying to figure that out.

 

Please share your thoughts on this. 

 

Regards, 

RP.

0 Kudos
Message 6 of 22
(4,771 Views)
Since you are not willing to attach your code, anyone here is just going to be playing the twenty question game that Jeff mentioned.
0 Kudos
Message 7 of 22
(4,760 Views)

Hi Dennis, 

 

I have the VIs in the Project form. Can i attach the whole project or should i attach only the top level VI ?

 

 

Thank you, 
RP.

0 Kudos
Message 8 of 22
(4,736 Views)
You should zip all of the VIs in the project. Attaching just the project file does nothing.
0 Kudos
Message 9 of 22
(4,726 Views)

... or open the toplevel VI and "save for previous". Select the same version and save to a new folder. Then zip up the folder. This should include most dependencies.

 

(I suspect we don't really need any subVIs to see the problem, unless you are doing some advanced weird stuff with references and such. As a first step, simply attach the toplevel VI.)

0 Kudos
Message 10 of 22
(4,717 Views)