How does probing work?

Look here to see if your question has already been answered.
Post Reply
User avatar
Doug
Posts: 50
Joined: Fri Feb 02, 2018 4:56 pm

How does probing work?

Post by Doug » Mon Jun 03, 2019 2:26 pm

Overview
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 physical height of the bit will be equal to the height of the probe plate when it touches the plate and stops. After this happens, you will set the current location of the axis using a G92 command. For instance, G92 Z19.05 sets the Z axis to 19.05.

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)
Configuring the Buildbotics Controller to execute a probe sequence when tool changes are encountered
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 "(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.
The following sequence of commands are an example of a probing sequence that can work in the "tool-change" field on the "Settings" page. Comments are provided to explain each command
  • 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)
  • (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.)
  • (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))
Hope this helps. Comments welcome.

Doug

jefflangendoerfer
Posts: 3
Joined: Tue Jun 04, 2019 1:56 pm

Re: How does probing work?

Post by jefflangendoerfer » Fri Jun 21, 2019 9:47 pm

Hello Doug I am having some issues probing.

Can you review your notes again below and confirm they are correct?

When I read your explanation above, you note that G91 sets the machine to absolute distance mode, however when I search this, I find that G90 is the code for absolute distance mode..

My issue is that when I probe the Z and have the controller set the offset for my probe sensor to .75 inches and then move 1 inch above 0, the end mill moves to a position slightly less than 1inch (.905) and the controller reads the Z position as:

Z position= 1"
absolute = .905
offset = .095

Here is what I have typed into the tool-change box which is what you had originally given me.

M0 G0 Z1 X1.5 Y1.5 M6 (MSG, CHANGE TOOL AND ATTACH PROBE)
F5
G38.2 Z-1
G92 Z.75
G0Z1
M0 (MSG, REMOVE PROBE)


I would like to switch to what you have posted here, however when I do it doesnt function correctly, so hence my question here in my post. Any assistance would be great!

Thanks

User avatar
Doug
Posts: 50
Joined: Fri Feb 02, 2018 4:56 pm

Re: How does probing work?

Post by Doug » Sat Jun 22, 2019 12:02 pm

Thanks for pointing out these mistakes. In the original post, I was mistakenly saying that G90 was incremental mode and G91 was absolute mode. The reverse is true and I made those corrections in the original post. I also tried to use G70 to push the program state in the example program. M70 is the correct command. I corrected that in the original post as well.

Thanks again Jeff and sorry for the confusion.
Doug

Post Reply