LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wy is RestoreVIstate 'unstable'?

Using the SaveVIState.vi and restoreVIstate.vi vi's leads often to an error while reading in the ini file. Sometimes due to the name of an indicator, sometimes it works and after a while it don't work anymore. Anybody an idea what's going wrong?
0 Kudos
Message 1 of 10
(3,235 Views)
I don't think the two VIs you refer to are standard VIs that come with LabVIEW. I don't have them on my system at least in LabVIEW 7.1.

You may need to do a bit of looking to see where they came from, or you could post them here so we can have a look at them.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 10
(3,235 Views)
I've got the vi's from:

http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=C92473BE25246318E034080020E74861&p_node=DZ53012&p_submitted=N&p_rank=&p_answer=&p_source=External

I also tested comparable vi's from OpenG. They had the same problem. The error emerges when applying the VI method 'set control value' and only for a few controls on the user interface (e.g. the state of a tab control). Sometimes the errors are disappearing (everything works fine) and after a few runs errors are comming back.
0 Kudos
Message 3 of 10
(3,235 Views)
OK,

I don't see anything obvious in those VIs that would be causing the errors. So this might be difficult to figure out, especially since it�s an intermittent problem.

If you could post your problem VI (or a simplified version of it) so we can see what�s going on, that would probably help.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 4 of 10
(3,235 Views)
Ed,

The GUI contains 4 tab controls, 5 tables, 10 graphs and a lot of numeric and string controls/indicators.
It's not possible to send you the VI.

But I have made a work-around. It are always the same controls which are causing the error during loading the values from an ini file. And they do not contain (fortunatelly) necessary information for the user. So I extended the saveVIstate vi and provided the possibility to give a list of controls/indicator as input parameter(by name) which will not be stored in the ini file. After excluding an error and tab control, everythings works fine.

Best regards,
Bert
0 Kudos
Message 5 of 10
(3,235 Views)
Glad you found a workaround, but I was wondering what controls were causing the problems. You already mentioned that Tab controls were probelmatic. Were there others?

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 6 of 10
(3,235 Views)
I have encountered errors when reading the config file if :
-controls/indicators don't have names
-control's/indicators have a standard name (eg. Tab Control does not work, changing the name to MyTabctrl solved the problem
-by applying this rules all errors were eliminated except the erro on 1 tab control with name TC.I solved this problem by excluding this tab control form the ini file.

Bert
0 Kudos
Message 7 of 10
(3,235 Views)
I can understand the first one. The Save and Restore VIs use the Names(labels) of the controls and indicators as a reference to them. So if they have an empty label, it's not going to work because it won't have a reference to go by.

For the second one, if there was more than one control or indicator with the same name, it could also cause problems as it wouldn't know which one to reference. It looks like it will always operate on the first instance (by Tab Order I think) of liked named elements. However, LabVIEW won't create duplicate names itself, so unless you renamed them to be the same, that's probably not it. Not sure why a default name would cause problems, it works fine for me with default names
.

For the third one, I could not duplicate the problem. A Tab Control named TC.1 worked fine for me.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 8 of 10
(3,235 Views)
I changed some default names of error causing controls/indicators what solved the problem. But it is of course not sure it has only to do with the names. What the tab page TC concernes, change of this name does not solve the problem. That's the reason wy I had to exclude this control from the ini file what resolved the problem when loading the ini file. The only 'special' thing I see about TC is that it is drawn inside another tab page.

..and thanks for your comments.
Bert
0 Kudos
Message 9 of 10
(3,235 Views)
Today, I have found another source of problems : when de label of a control/indicator contains a line break (to split the label over two lines) it is loaded in the ini file in two different fields en de original label is not recognised on the vi panel when loading the ini file.
But this does not explain the problem with the tab control TC.
0 Kudos
Message 10 of 10
(3,235 Views)