Probing in the Buildbotics Controller requires that you connect the probe to the controller and configure the controller to recognize the probe. When that's done, you can issue g-code commands from the MDI interface or from your G-Code program that cause the controller to search for the probe and stop when it finds it. Finally, you can configure the controller to automatically execute a sequence of g-code commands that can cause the machine to probe every time a tool change is encountered in your g-code program.
Connecting the probe
The Buildbotics Controller uses probes that either close or open a contact when the probe finds its target. To connect the probe to the Buildbotics Controller, you simply connect one side of the probe to the probe input (pin 22 on the DB25 connector) and the other side to ground (pin 7, 19, 25, or 26 on the DB25 connector).
Note - Many probes that are available simply provide one wire to a touch plate and another wire to a clip. To initiate a probing action, connect the clip to the spindle bit. When the bit touches that plate, contact is made and sensed by the Buildbotics Controller. In some cases, the bit on the spindle already has continuity to ground. If this is the case, the probe input will trip as soon as the user attaches the clip to bit. If this happens, the clip is not needed, simply connect the plate to pin 22 and leave the ground pin disconnected.
Configuring the probe interface on the Buildbotics Controller
Configure the probe by setting the "probe" pull-down menu on the "Settings" page to either "normally-open" or "normally-closed" depending on whether the probe makes or breaks the contact when the plate is touched. In most cases, contact is made when the bit touches the plate, so "normally-open" will be selected. Click "Save" after making the change.
Probing with G-Code Commands
Probing actions are controlled through G-Code commands, which are found in G-Code programs. G-Code commands can also be entered manually through the MDI interface on the "Control" page.
G38.2 is the probing command. When G38.2 is executed, the machine will begin to move towards the location specified by the argument at the current feed rate. For instance G38.2 Z-50, will cause the machine to move towards Z=-50 at the current feed rate. If no feed rate has been specified, the probe will not happen and an error will be presented. There are a few things to consider when issuing a G38.2 command:
- Movement will move towards the location specified in the argument. For instance, if G38.2 Z-50 is issued, the spindle will move towards Z=-50. But if the current Z-axis location is below Z=-50 (e.g. Z=-100) the spindle will actually go up rather than down. Of course, it will not find the touch plate by moving up and the probing action will stop when it reaches Z=-50. You can avoid this confusion by putting the machine in "incremental distance mode" (G91) before issuing the G38.2 command. That way, the spindle will move in the desired direction regardless of the current position of the axis. For instance, if the machine is in "incremental distance mode" and the spindle is currently at Z=25 and G38.2 Z-50 is issued, the spindle will move down until the plate is touched or the spindle has moved by -50 (to Z=-25) and stops.
- G38.2 movements occur at the current feed rate in the machine. Often times this feed rate is too high and will cause the bit to hit the plate too hard. This could cause the probe to be inaccurate and it could damage your bit and/or the probe plate. You should set the feed rate to a value that allows the bit to slowly approach the plate.
The following sequence of commands can be used for probing on the Z axis. Comments are provided to explain each command:
- G21 (Use metric units)
- F100 (set the feed rate to 100mm/minute)
- G91 (put the machine in incremental distance mode)
- G38.2 Z-50 (probe downward. Stop when the plate is touched, or when Z has moved down by 50mm)
- G92 Z19.05 (set the Z axis to +19.05mm)
The Buildbotics Controller can be configured to execute a predefined sequence of commands whenever a tool change command (M6) is encountered in a g-code program. The commands are entered into the "tool-change" text entry box on the "Settings" page. The following bits of information will prove useful when entering g-code commands in the "tool-change" field:
- The commands are not saved and do not become effective until the "Save" button is clicked.
- You will have to make some state changes in your program (e.g. metric vs. imperial units and feed rate). You will not be able to predict the state of the G-Code program when the tool change is encountered. Therefore, you will have to save the machine state (M70) at the beginning of the probing sequence and recover the saved state (M72) at the end of the sequence.
- Comments that begin with "M0 (MSG," cause the Buildbotics Controller to pause operation and present a dialog to the user. The dialog will contain the remaining text in the comment. The machine will remain paused until the user clicks "Continue".
- You may not be able to count on the machine calling for a tool change when the spindle is sitting above a smooth, flat surface of a known height. Therefore, you will probably want to designate a place on your machine where probing will occur. Your probing sequence will have to move the spindle to that location to do the probing.
- M70 (save the current machine state. (e.g. feed rate and units)
- G21 (metric units)
- G90 (set the machine to "absolute distance mode")
- G0Z50(raise the spindle to a height that makes it easy to change the bit)
- G0 X-50Y-50 (make a rapid move to a good place to sit the probe plate)
- M0 (MSG, Change bit and attach probe) (prompt the user to change the bit and attach the probe)
- G91 (put the machine in "incremental distance mode")
- F100 (set the feed rate to a slow speed for probing)
- G38.2 Z-100 (probe down until the plate is touched or until Z has moved by -100mm)
- G92 Z19.05 (set the Z axis to the height of the probe plate)
- G90 (set the machine to "absolute distance mode")
- G0 Z50 (raise the Z axis to a safe height where it is easy to remove the probe.)
- M0 (MSG, Remove the probe) (prompt the user to remove the probe)
- M72 (recover the original machine state(e.g. feed rate, distance mode, and units))
Doug