9515
« on: January 31, 2012, 02:34:19 PM »
DoOemButton(251) is the oem code to toggle the axis inhibit for the Y axis so you could add that to a text file and save as something like m1111.m1s and save it to your profiles macro folder. Any time you call m1111 from MDI or code it will toggle the Y axis inhibit, ie if its inhibited it will turn it back on, if its already on it will inhibit.
You could write two macros and have them looking at the Y axis inhibit LED and that way you could make sure that when you want to inhibit it will and turn back on it will. For example if you saved the following as m1111.m1s it would inhibit the Y even if its already inhibited, ie it wouldnt toggle it back on.
If Not GetOemLED(87) Then
DoOemButton(251)
End If
If you saved the following as m1112.m1s then it would turn the axis back on even if it is already on, ie it wouldnt toggle it to inhibit it.
If GetOemLED(87) Then
DoOemButton(251)
End If
So you could call m1111 when you want to inhibit and m1112 when you want to enable and you would be safe in the knowledge that you wouldnt inadvertently toggle to the opposite of what you want.
Hood