Easyscriber engrave attachment for Hypertherm torch's

Code snippet placement

Post your questions or tips on SheetCam software in this topic.
Post Reply
Posts: 64
Joined: Sat Apr 01, 2017 5:38 pm

Code snippet placement

Post by rbmgf7 » Fri Jan 26, 2018 9:56 am

So I looked up how code snippets work and supposedly the code is placed at the beginning of an operation. I played with it a little before but never got it working. I recently got a repeating job where I want to control the THC.

Here's a condensed program with the first operation I want the THC on and the second I want it off.

Line 8 is the first operation and then line 9 and 10 are repeated in 11 and 12. Why the duplication?

Then at the end of the first operation it jumps into the second operation name (line 39), turns the THC ON, and then turns the torch OFF from the first operation. Then proceeds to turn the THC on again on line 44. Obviously I need the torch to turn off from the first operation before jumping into the second. Also I don't need the THC to turn on before the torch turns off from the previous operation.

How can I fix this? Obviously all I need is the THC condition to be posted right after the operation declaration.

EDIT: I just found Sheetcam's forum and saw that someone asked the same exact thing a few days ago: https://forum.sheetcam.com/viewtopic.ph ... pet#p23234

Would be better if it could place the command before the torch is triggered.

Code: Select all

N0010 (Filename: 5 lug - test.tap)
N0020 (Post processor: Mach3 THC with scriber v1.scpost)
N0030 (Date: 26/01/2018)
N0040 G20 (Units: Inches)
N0050 F1
N0060 G53 G90 G91.1 G40
N0070 (Part: 5 lug)
N0080 (Operation: Outside Offset, Colour 0, T40: Steel 0.25 - 45A)
N0090 M998; THC OFF
N0100 G00 X3.9039 Y7.1336
N0110 M998; THC OFF
N0120 G00 X3.9039 Y7.1336
N0130 G31 Z -100 F19.685
N0140 G92 Z0.0
N0150 G00 Z0.0591
N0160 G92 Z0.0
N0170 G00 Z0.3000
N0180 M03

Blah blah blah

N0390 (Operation: Inside Offset, in, T40: Steel 0.25 - 45A)
N0400 M999; THC ON
N0410 M05
N0420 G00 X4.1071 Y7.0359 Z0.5000
N0430 X0.6598 Y4.1147
N0440 M999; THC ON
N0450 G00 X0.6598 Y4.1147
N0460 G31 Z -100 F19.685
N0470 G92 Z0.0
N0480 G00 Z0.0591
N0490 G92 Z0.0
N0500 G00 Z0.3000
N0510 M03

Blah blah blah

N1120 M05
N1130 G00 Z0.5000
N1140 X0.0000 Y0.0000
N1150 M05 M30

Posts: 1099
Joined: Tue Feb 28, 2012 6:47 pm

Re: Code snippet placement

Post by tcaudle » Sun Jan 28, 2018 11:36 am

The only way to place a code IN an operation is to use a cut rule. Code snips are an operation in themselves so you can insert them before an operation or after an operation. A Cut Rule lets you define a "trigger" to run the code but be aware that M codes are executed as a line in the code and motion stops until the M code returns from what its doing. Cut rules may or may not put the code in the exact spot you want because it depends on the trigger point.

Post Reply

Return to “SheetCam”