Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: M250cnc on February 16, 2010, 06:12:10 PM
-
Tool_Num = GetDRO (24)= PWM Base DRO
If Tool_Num <>0 then
Z_Shift = GetOEMDRO (1002)= next to set tool offset
Z_Offset = GetOEMDRO ( 49 )= Part Z Offset DRO
Axis_Pos = GetOEMDRO(85)= Z Machine Coord DRO
Tool_Offset = Axis_Pos - Z_Offset -Z_Shift
Call setOEMDRO(42, Tool_Offset)= Tool Z Offset DRO
End if
This is what is on the SET TOOL OFFSET BUTTON on page 5 of the standard screen for mill
It's in the Gage Block Height section
I am trying to understand it and i have looked up the dro codes in the XLS file Hood posted
The OEMdro for number 24 is clearly wrong for in the context its being used for
Can anyone shed any light please.
Phil
-
Phil,
Do you mean 42 ... instead of 24 ?
-
Thanks
Definitely 24 it was late last night and i have just noticed the syntax seems to be wrong as well
Tool_Num = GetDRO (24)= PWM Base DRO
This is the first line of code on the button should it not be GetOEMDRO
The number 24 = PWM Base DRO
Phil
-
GetDRO (24) is the same as GetOemDRO(824)
Some DRO's and Buttons etc are what is called Standard DROs/Buttons and can be written either way, think of the Ref All button, it calls DoButton(23) but could also be written DoOemButton(1023)
Hood
-
Thanks Hood
I knew about adding 1000 but not 800 to the numbers
Phil
-
Oh..I see it now at the top of your post phil,,,,totally missed that line.
gotcha now,
Russ