Re: Problems using constructor and distructor to save curren
Posted: Wed Apr 25, 2018 7:08 am
Yes, it's true that a missing value causes exception. But why is it missing?
UCCNC alone never makes a missing value. Check the code where you write your key for that Writekey which writes no value. Maybe a conversion problem or a missing data to write. The only way you can make missing value is to write no value:
(I have a lot of data to read on startup and write back on exit. I had some similar problems when the startup macro could not run correctly and on exit there was no valid data to write. Now I turn on a LED in the last line of M99998 to show that it finished, and in M99999 I check this LED and if it's OFF then I do not save anything. Since I made this trick there was no data error.)
I've got a strange issue that UCCNC sometimes cancels the value of the key in the .pro file
UCCNC alone never makes a missing value. Check the code where you write your key for that Writekey which writes no value. Maybe a conversion problem or a missing data to write. The only way you can make missing value is to write no value:
- Code: Select all
exec.Writekey("MyCNC", "CurrentTool", "");
(I have a lot of data to read on startup and write back on exit. I had some similar problems when the startup macro could not run correctly and on exit there was no valid data to write. Now I turn on a LED in the last line of M99998 to show that it finished, and in M99999 I check this LED and if it's OFF then I do not save anything. Since I made this trick there was no data error.)