Hello Guest it is January 16, 2021, 12:31:03 PM

Author Topic: OEM Code Magic Decoder Ring...  (Read 2815 times)

0 Members and 1 Guest are viewing this topic.

OEM Code Magic Decoder Ring...
« on: February 22, 2009, 06:18:15 PM »
I try to avoid writing macros, because writing a macro always means spending an hour or more tearing my hair out trying to figure out which OEM codes I need, and then figuring out why they don't work as it seems they should.  For example, in writing my recent tool length setting macro, I needed to know whether G91 or G90 are in effect.  Of course, there are LEDs for both (OEM LEDs 48 and 49).  But, only one of them actually works!  The other is ALWAYS zero!

Right now, I'm looking into writing a custom macro for loading the tool length offset table, using my touch plate.  Looking at the existing button macro, the first line reads:

Tool_Num = GetDRO (24)

Clearly, DRO 24 *must* be the DRO on the various screens that shows the currently selected tool.  But, referring to the (many) OEM code spreadsheets, they all tell me DRO 24 is the "PWM Base DRO".

It is incredible to me that there isn't a complete, correct, *official* list of OEM codes, and their meanings.  I've had so many occassions where the codes are clearly NOT what the documentation would suggest, or don't work, or are simply so vaguely defined, that it's impossible to even guess what the function is.  Add to that the fact that there are a bunch of functions that the Mach3 customization guides indicates are deprecated, and so should not be used, yet they *are* still used in the production code.  And, in some cases, it does not even appear to me there is any other way of doing what they do.  It all makes writing macros a real exercise in frustration.

Ray L.
Ray L.

Offline Hood

  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: OEM Code Magic Decoder Ring...
« Reply #1 on: February 22, 2009, 07:01:20 PM »
All part of the fun :)
GetDRO is not the same as GetOemDRO ;)
Just the same as in the RefAll button you have DoButton(23), if you want to use DoOemButton it would be  DoOemButton(1023)
For Dro's you add 800 so your GetDRO(24) would be GetOemDRO(824)

Offline ger21

  • *
  •  6,287 6,287
    • View Profile
    • The CNC Woodworker
Re: OEM Code Magic Decoder Ring...
« Reply #2 on: February 22, 2009, 08:21:59 PM »
The Wiki seems to be accurate, but is missing a few. It lists 824 as the current tool.

2010 Screenset

JointCAM Dovetail and Box Joint software