‎08-22-2017 11:36 AM
I've been using the config file vi's to save the values of some indicators and controls on closing the program and repopulating them at startup. This has worked well but now I've run into a problem. I have an indicator for a timer that displays in hours:minutes. When the value is saved it shows in the file as the correct time in seconds. When I try to populate the indicator from the file a probe shows the correct value (in seconds) going to the indicator's local variable but the indicator itself remains at zero. I've tried using both local variables and a property node/value with the same results. Any ideas how to get this to work?
Solved! Go to Solution.
‎08-22-2017 11:41 AM
Can you show / upload the code where you load this data in?
‎08-22-2017 12:09 PM
Are you using a timestamp control? If so, you only need to convert the timestamp to a double and write it to file. Then when you read it back in, convert it to a timestamp and wire it to your control/indicator.
‎08-22-2017 01:04 PM - edited ‎08-22-2017 01:05 PM
gregoryj - here's a part of the code the rest is too large and has too many references and variables to upload. This is how it's being written to and read from the file :
To answer the other question no it is not a time stamp but a numeric indicator configured to display relative time.
‎08-22-2017 01:19 PM
Hi RT,
Part of the reason I wanted to see the code is to see how the control display is configured and if you might have any race conditions present.
‎08-22-2017 01:40 PM
Well Gregory that solved it. No race conditions but you got me thinking and as it turns out that it's populating the indicator just fine. Problem turned out to be immediately after that the first thing the timer part of the code does is write the current time to it, which is zero. Thanks for getting me to look at the problem from a different angle.