Originally Posted by
popspipes
I can draw one part, export to sprutcam, use the transform function to machine the multiple parts, quick and easy, I would like to add sequential serial numbers to some of the parts at some point though.
Hi Mike
As I mentioned earlier that's the way I would normally create multiple parts but G47 doesn't fit in too well with this approach (please let me know if I'm missing a glaringly obvious solution!). The code for the serial number generation is just one single statement but contains the X and Y coordinates:
Code:
G47 X0 Y0 Z-0.25 P[8/3] Q4.00 R2 D3
This line could be added with Sprutcam using a macro or Fusion using a "Pass through" but the coordinates would need to be incremented for each part, otherwise the serial numbers would all be machined on top of each other. In this case it wouldn't actually be too difficult to call G47 8 times with different coordinates, especially if the numbers were convenient (like G47 X0 Y0... G47 X2 Y0... G47 X4 Y0... etc - but even when writing this example I made a stupid mistake!). On the other hand, in the real world subroutines usually contain multiple commands, and like in Cliff's example the coordinates are not nice round numbers.
Cliff solved this problem by creating a separate WCS for each part so the relative positions of the serial numbers with respect to X0 Y0 of each WCS always remained the same. My second variant used just one WCS but offset this WCS for each part, with the same result.
There's no "one size fits all" solution but it's useful to have a range of available options when you come across the inevitable next problem.
Step
Edit: another possibility:
If the X and Y parameters are not specified the current position is used for the serial number origin. If the CAM can position the tool at the correct coordinates for each part the G47 would automatically engrave the number at the corresponding location. I can't think of a direct way of moving the tool to specific position in CAM without actually performing an op except by adding a line of G-code (perhaps it will occur to me as soon as I post this) but perhaps a pseudo drill op at the serial number origin using the engraving tool but drilling in air just above the part? Any better ideas?