OK, here is what I found.
G90/G91 commands are always modal, no matter where or how they are used.
So, if you ever use G90/G91 anywhere in your programs/scripts/macros/MDI, then:
- Any script must set the appropriate G90/G91 mode for itself.
- Any script must remember and restore the original G90/G91 mode.
Here is what such a script could look like:
Code:
CurrentAbsMode = GetOemLED(48) 'Remember current G90/G91 mode
Code "G90" 'Set mode to G90
'--------------------------------------------
'The main script routine goes here
'--------------------------------------------
If CurrentAbsMode = 0 Then
Code "G91" 'Restore G91 mode if it was active originally
End If