T word question (v2.117)
Posted: Wed Nov 13, 2024 2:58 pm
I'm updating my M6 error checking code and have a question about how T word / newtool = exec.Getnewtool() work. After some experimenting, I found that if you start UCCNC and load a program without a T word (or without an integer with the T) prior to or on the same line as a M6, and start execution, newtool = -1 (that I believe indicates an error). If you start UCCNC and load a program with a valid T word like T2, and start execution, newtool = 2 just as expected. Now if you leave UCCNC running and load a new program without a T word, and start execution, newtool = 2 rather than -1. It seems UCCNC holds the prior program's T number when a new program is loaded and thus does not recognize that a needed T word is missing when the newly loaded program runs. So, my question is, shouldn't UCCNC reset its internal newtool value when a new program loads?
I realize this is probably an unusual situation, but for error checking purposes I'm looking for consistent results when a T word is missing from a program for some reason. And there are various issues that can come up during the M6 process if the missing T word is not caught at the outset.
Running 2.117 in demo mode. I haven't tested any other version.
Thank you, Frank
I realize this is probably an unusual situation, but for error checking purposes I'm looking for consistent results when a T word is missing from a program for some reason. And there are various issues that can come up during the M6 process if the missing T word is not caught at the outset.
Running 2.117 in demo mode. I haven't tested any other version.
Thank you, Frank