Hello Guest it is March 28, 2024, 06:01:44 PM

Author Topic: SWITCH OFF AXIS  (Read 3372 times)

0 Members and 1 Guest are viewing this topic.

SWITCH OFF AXIS
« on: January 30, 2012, 03:33:51 PM »
Apart from disconnecting an axis motor from the board, is it possible to to switch an axis off via G code to go from 3 axis milling to 2 axis turning?
ie xyz milling to xz turning to avoid unintentional movement in the y unused axis which would be locked/clamped.
Graham

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: SWITCH OFF AXIS
« Reply #1 on: January 30, 2012, 04:08:53 PM »
You can disable the axis from VB so you could have a macro in your code to do it
Hood

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: SWITCH OFF AXIS
« Reply #2 on: January 30, 2012, 04:20:13 PM »
Can you just set up two profiles?
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: SWITCH OFF AXIS
« Reply #3 on: January 31, 2012, 04:54:31 AM »
I understand the two profiles reply, but what is VB AND MACRO is it a kind of subcode within the G code?
Graham

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: SWITCH OFF AXIS
« Reply #4 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
Re: SWITCH OFF AXIS
« Reply #5 on: January 31, 2012, 02:47:52 PM »
Thanks Hood
This is a new to language/code to me. Will experiment tomorrow if all goes well and I do not have to go on a shopping trip >:D
Graham