Skip to content

Tutorials: Orientation of gcode

SteveMoto edited this page Dec 11, 2018 · 1 revision
  • This is an example on how to orientate the g-code to fit the object present in the machine.
  • For testing I've placed at a random position and orientation, a PCB that I made some time ago.

Switch to Camera system

  • Switch to the camera system, by clicking the "Switch" button on the ribbon. The button creats a virtual offset with G92 on the present workspace as the centre is moved to the camera location.
  • By switching back to the spindle, the offset is cancelled with a G92.1 command

Add 1st Orientation marker

  • Change to the "Probe -> Probe" tab
  • In the PCB the holes are 0.6mm, so I set the Diameter to 0.6mm
  • Jog the camera to a known location. In this example I've used a couple of drilled holes.
  • Click on the Orient -> Add button
  • Click with the mouse to the line on the centre of the hole. Note: there is a snapping mechanism in bCNC, that will snap to the closest gcode control point

Jog to 2nd marker

  • Jog to the 2nd marker

Zoom on 2nd marker

  • Zoom and align the camera on the second marker
  • In this quick example I had to make steps of 20um to align the holes

Add 2nd Marker

  • Click on Orient->Add
  • Click on the second marker gcode point on the canvas

Jog to 3rd Marker

  • Repeat with a 3rd marker

Add 3nd Marker

  • Add the 3rd marker
  • Note: 2 markers are sufficient, but the more you provide the more accurate the system is going to be determined. bCNC is solving an overdetermined system to find the best match.
  • Note: always observe the error for each marker. If too high, you can move the marker with the mouse or delete and add again.

Orientation gcode

  • At this point clicking on the Orient -> Orient button the gcode will be transformed to match the markers.

Change to gantry view

  • I've changed the location of the Camera display from Bottom Right to Gantry so that the camera image follows the gantry location when displayed in X-Y

Inspect #1

  • Inspect some points and see the camera image with the gcode overlay.
  • Note: The image distortion from the macro focusing is visible. The gcode is matching close to the center but at larger distances is distorted.

Inspect #2
Inspect #3

Clone this wiki locally