Ok, here’s my newest problem (starting to sound like a broken record). Due to the holidays, I’ve not cut anything for a couple of weeks, so today I went out to cut some backlog. First cut, the torch is dragging on the plate. What the ?.. So I did some checking and measuring, and it turns out the Switch Offset is not being applied. So I’ve done a lot of test posts on various files and find that the Switch Offset Lift is not being posted in the g-code. But…, on one of my test posts, it was, using the same Sheetcam version, same post and same file. So out of 30 or so tries, one was right. I’m not sure if this is a Sheetcam thing, or a CandCNC post thing.
So here’s a few lines from each g-code file, showing the lift at line N0300 in one and not the other. I’ll post this same question over on the CandCNC forum also.
If anyone has any ideas, I’d appreciate it, cause I’m a bit baffled right now.
Steve
This is the Good one: (Note: my switch offset is not really .75, I was just changing the offset in the post to see if it made any difference.)
N0020 (Post processor: DTHC-HYT-TAP_SoftPierce+Marker-rev11D.scpost)
…
N0240(Paused: Check the DTHC Settings Hit RUN to continue)
N0250 G00 Z1.929
N0260 X-0.000 Y-0.033
N0270 M900 (Check for Z active)
N0280 G28.1 Z0.02 (Start Touch-Off )
N0290 G92 Z0.0
N0300 G00 Z0.750 (Switch Offset Lift) <-------------------------
N0310 G92 Z0.0
N0320 G00 Z0.150
N0330 M03
N0340 G04 P0.7
N0350 G01 Z0.060 F60.0
N0360 F36.0
N0370 S20 (DTHC is on)
This is the bad one:
N0020 (Post processor: DTHC-HYT-TAP_SoftPierce+Marker-rev11D.scpost)
…
N0240(Paused: Check the DTHC Settings Hit RUN to continue)
N0250 G00 Z1.929
N0260 X-0.000 Y-0.033
N0270 M900 (Check for Z active)
N0280 G28.1 Z0.02 (Start Touch-Off )
N0290 G92 Z0.0
N0300 G00 Z0.150
N0310 M03
N0320 G04 P0.7
N0330 G01 Z0.060 F60.0
N0340 F36.0
N0350 S20 (DTHC is on)
N0360 X4.908 F40.0
N0370 G03 X4.941 Y0.000 I0.000 J0.033
In SheetCam go to Options->machine->post processor. Do you have the edited version of your post selected? If you have the unedited version your switch offset may be set to 0.
Yea, I’m using the edited version. What I’ve worked out so far is this started in the last 2 to 4 weeks. In those weeks I’ve updated Sheetcam, as well as Windows 7. So I’m not sure what has caused the problem. I’ve been mulling over whether or not to roll back my system to before this trouble started.
I’m using the CandCNC Ethercut controller and posts. I’ve discovered that the post DTHC-HYT-TAP_SoftPierce+Marker-rev10a works just fine. rev11d, which is supposed to be the latest and greatest, does not work. It was working, and has worked 1 time out of all the trouble shooting attempts I’ve done so far.
I’ve been going thru the post, and see where the Switch Offset Lift is supposed to be posted to the g-code if the offset is > 0. So my assumption is that it is seeing 0 when it should be seeing 1.7 mm, which is my offset. All the code leading up to that point seems to be working, it’s just those 2 lines of code that are not. If I had some way of single stepping thru the post while it was running, and watching the variables, I could probably figure it out. It’s been many years since I’ve done any coding, and just don’t have the tools anymore to trouble shoot code.
My next line of thought is to compare the rev10a and rev11d posts and see what is being done different.
Steve
This does sound like a post problem. I have to admit I don’t have a copy of rev 11d.
I’m not sure if Tom wants this post made publicly available so could you email it to me or PM me with a copy and a sample job file.
You can single step posts. Open the post editor then click in the left hand darker grey margin to set a breakpoint. Leave the editor open and run the post. There are buttons for single step, continue etc on the top toolbar in the editor. There is a window on the bottom of the editor that shows any current errors and the stack (all variables and the function call stack). If you can’t see the bottom window, you should be able to enlarge it by dragging it’s sash upwards.
Les, thanks for the editing tip. I have done some more testing, and proved that the Switch Offset was not being set. (I embedded a little code into the post to print out what the offset was at the place where it was tested) I then wondered if it didn’t like the format that the Offset was being entered in. I’ve been entering the offset by editing the post directly, as you used to have to. So I used the set custom post options button, and the post worked. What I see is I was entering the offset as “1.7” mm. The Set custom post options enters it as “01.700”. This evidently makes a big difference to the post processor. As jeepsr4ever mentions in his post, 11d must be pretty finnicky.
Thanks for your help. If you still want a copy of the post just say so, and I’ll email you a copy along with the test file I was using. (Just a simple 3" square box imported as dxf file.)
I’ll email Tom with what I’ve found also.
Steve
If you send me a copy of the post I’ll take a look and see if I can figure out what is going on.
I had a look at the post and I can’t see anything obviously wrong with it. The switch offset code is pretty simple.
Just a thought - Did you set the switch offset from within the job, using a ‘set post processor variable’ operation? That would override the setting in your post.
Les, I didn’t set the switch offset from within the job. There is something strange going on though. I powered up the computer today, and again the switch offset was not posting. I entered the offset using the set custom options again, and it started posting again. It seems like the offset is being stored somewhere in temporary memory, and then being lost when the computer is powered off. I’ll have to think on this a bit more.
Steve
Where exactly do you mean by set custom options?
Under the machine options/Post processor tab on the Post processor section is a “Set custom post options” button. If I set the Switch Offset using that button and the resulting pop-up window, then the post works. If I use the “Edit post” button to open the post in the Post editor, and set the offset there, then the post doesn’t work.
It is a bit strange, as the post is working fine today after powering on the computer. Some days is works, some days it doesn’t. I am a bit curious as to where the edited posts are stored on the computer, as it doesn’t appear that they are stored under Sheetcam TNG/Posts folder.
Anyway, I’ve attached a screenshot of the “Set custom post options” button.
Steve
I’d forgotten about custom options. So few posts use them. This may be a problem with custom options. I’ll take a look on Monday.
Edit your post and look for this line:
post.DefineCustomOption("Switch Offset", "switchOffset", sc.unitLINEAR, 0, 10000)
and change it to
--post.DefineCustomOption("Switch Offset", "switchOffset", sc.unitLINEAR, 0, 10000)
Now the switch offset you define in the post will always be the one that is used.
I am a bit curious as to where the edited posts are stored on the computer, as it doesn’t appear that they are stored under Sheetcam TNG/Posts folder.
Later version of Window don’t allow normal users to write to program files so edited posts are stored in application data. The path varies between different different versions of Windows but you can find it by going to Help->open settings folder.
Thanks Les. So far things are back to normal.
Steve