Transition Machine Coordinate System through Planned Modification - strChrisLee/openpnp GitHub Wiki
Recipe
A machine coordinate system can be reconstructed from three or better more well-known locations, that are sufficiently far away from each other in both X and Y. Before modifying a machine, securely mount and capture multiple fiducials on PCB Z height. These will help reconstruct a machine coordinate system after the machine underwent modification.
The following is a simple recipe using OpenPnP's board fiducial system to help you do the math:
-
You must do this before you modify the machine!!!
-
Create a fake (huge) Board in OpenPnP.
-
Add the fiducials that you added to your table as Placements.
-
Capture their location as good as you can using the eye.
-
Run the fiducial check:
-
Now position to each fiducial. It should now be the precision location determined by vision, i.e. the AffineTransform is applied:
-
Now copy what you see in your DRO into the fiducials location, manually:
Note, you can't use the capture button, because it would reverse-apply the AffineTransform, i.e. change nothing.
-
Repeat for each fiducial.
-
Once you have these precision fiducial coordinates, make sure to screenshot them, just to be sure to have a technically independent copy:
-
And save the Job:
-
This
.job.xml
file and more importantly the accompanying.board.xml
file is now the very important record of your OpenPnP machine coordinate system. Go check them out where you saved them. -
Now you can safely modify the machine.
-
Afterwards, try to make the coordinates as similar as possible on the controller side (set your homing coordinates, so the coordinates match up roughly, i.e. ±1mm).
-
Load the Job.
-
Perform another fiducial check:
-
Now look in the log for lines like this:
2022-07-11 10:54:38.513 ReferenceFiducialLocator INFO: Machine to placement transform X: X Factor: 1.000681 Y Factor: 0.000620 X Offset: -0.047904 2022-07-11 10:54:38.513 ReferenceFiducialLocator INFO: Machine to placement transform Y: X Factor: -0.000773 Y Factor: 0.999558 Y Offset: -0.044157
-
Enter the coefficients into your X and Y
ReferenceLinearAxis
:
See also the Linear Transformed Axes page.