I'm using linuxcnc with plasmac. I can create a materials file from the tool table of sheetcam. It's a good materials file for sheetcam.
Now how do I get sheetcam to output that into a M190 P# in the gcode? I edited the post processer and setup the materialFile = true in there. I also added the following snippet to OnInit() as it doesn't appear to call the OnToolChange() at all. Material is always 0 therefore it never runs this.
post.Text (" (Material: ", material, ")\n")
if(material > 0 and materialFile) then
post.Text(" M190 P", material, "\n")
post.Text(" M66 P3 L3 Q1\n")
I added this snippet into the OnPenDown() function just to see if I added to the wrong place. Basically the tool number is not being output or material is not being set at all by looking at the tool number and making material equal to it
Code: Select all
N0010 (Filename: makerCARVER Gantry Plates v1.ngc) N0020 (Post processor: LinuxCNC PlasmaC.scpost) N0030 (Date: 20/02/2021) N0040 G21 (Units: Metric) N0050 G40 G64 P0.005 G90 N0060 F1 S1 N0070 (Material: 0) N0080 (Part: makerCARVER Gantry Plates v1) N0090 (Operation: No Offset, 0, 45 Amp 1/4" Mild Steel) N0100 G00 X72.7981 Y83.2771 N0110 M65P2 (THC On) N0120 M65P2 (THC On) N0130 (Material: 0) N0140 (Material: 0) N0150 M03 $0 S1 N0160 G04 P0.6 N0170 G03 X73.8404 Y84.7316 I-1.4111 J2.1119 F[#<_hal[plasmac.cut-feed-rate]> *