Hello everyone, for some time now, I'm using LinuxCNC to control a dispenser to treat PCB panels (applying glue or globtop to electronic dies). Because not all of these panels are exactly aligned in the machine, a webcam sits on the Z joint using which I can get the real positions of fiducial marks on the panels. A python script then calculates a coordinate system offset and rotation from those positions and applies it to one of the G5x coordinate systems. This works OK.
But, now I have the problem, that those panels are not always exactly fabricated, sometimes there is a uniform scaling (same for X and Y), which must be compensated. Sometimes, the scaling is not even uniform (X and Y scaling different) and in rare cases, the whole stuff isn't even rectangular, but somewhat trapezoidal. All of these deviations are in the range of some 0.1% of course, but that's already too much for some processes. So what I would now need is a way to apply a transform to all the coordinates in an NGC file. While this could be handled with little effort for the first two cases (uniform and non-uniform scaling) directly in the NGC file, this has two problems: 1. It is not flexible, as it would be necessary to modify the file prior to each run. 2. If the scaling is not uniform, a G2/G3 arc may cause an error, as the curve should be an elliptical arc, not a circular one. So what I would like now is some extended coordinate system. It should support not only offset and rotation, but also scaling and probably even a way of handling non-rectangular coordinates. The easiest way to describe it would be a 3x3 matrix (for XY) or a 4x4 matrix (for XYZ). The calculations for most things should not be too complicated, but it could get hairy when it comes to nonlinear moves (arcs, splines, etc.). Is there a sensible way to implement such functionality (or is it already present)? I know, that the kins could be used for it (in fact, I've implemented something like this already for another machine where the X and Y joints are not exactly rectangular), but this seems to be an ugly hack to compensate for properties of the workpieces. From my point of view, it should be implemented on the same level as the usual G5x and G9x coordinate system handling, but it needs to be much more flexible. Please give me some advice about what I could or should do. I have no problems with modifying the code if necessary, but I don't really know where a good place for this would be. Thank you! Best regards, Philipp ------------------------------------------------------------------------------ DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
