plasma THC define custom tool parameter for THC set volts
-
- Posts: 7
- Joined: Thu Nov 09, 2023 9:58 am
plasma THC define custom tool parameter for THC set volts
Hi Folks,
please bear with me I'm an absolute know-nowt regarding gcode and post processors!
I run a plasma table with a Razordance THC unit.
I can set the desired cut volts for this via the S word in my gcode on tool changes
I want to be able to do this via the tools set in sheetcam
I'm led to believe that I can do this by defining a custom tool parameter which is done in the post processor, then calling this parameter at tool changes in the post processor.
To that end I have added this line:
post.DefineCustomToolParam("PlasmaTool", "THC volts", "setvolts", sc.unit0DECPLACE, 49, 0, 200)
and then this is my tool change section:
function OnToolChange()
post.Text (" M06 T")
post.Number (tool, "0")
post.ModalNumber(" F",feedRate * scale,"0.#")
post.Text (" S")
post.Number (setvolts, "0")
post.Text (" (", toolName, ")\n")
end
This doesn't work, when I try to save the post processor edit it says that this bit is wrong: post.DefineCustomToolParam("PlasmaTool", "THC volts", "setvolts", sc.unit0DECPLACE, 49, 0, 200)
pardon my probable stupidity! Does that line need to be in a particular context? What have I done wrong?
thanks in advance!
please bear with me I'm an absolute know-nowt regarding gcode and post processors!
I run a plasma table with a Razordance THC unit.
I can set the desired cut volts for this via the S word in my gcode on tool changes
I want to be able to do this via the tools set in sheetcam
I'm led to believe that I can do this by defining a custom tool parameter which is done in the post processor, then calling this parameter at tool changes in the post processor.
To that end I have added this line:
post.DefineCustomToolParam("PlasmaTool", "THC volts", "setvolts", sc.unit0DECPLACE, 49, 0, 200)
and then this is my tool change section:
function OnToolChange()
post.Text (" M06 T")
post.Number (tool, "0")
post.ModalNumber(" F",feedRate * scale,"0.#")
post.Text (" S")
post.Number (setvolts, "0")
post.Text (" (", toolName, ")\n")
end
This doesn't work, when I try to save the post processor edit it says that this bit is wrong: post.DefineCustomToolParam("PlasmaTool", "THC volts", "setvolts", sc.unit0DECPLACE, 49, 0, 200)
pardon my probable stupidity! Does that line need to be in a particular context? What have I done wrong?
thanks in advance!
-
- Posts: 7
- Joined: Thu Nov 09, 2023 9:58 am
Re: plasma THC define custom tool parameter for THC set volts
this is the error i get
- Attachments
-
- IMG-53251.jpg (1.38 MiB) Viewed 67064 times
Re: plasma THC define custom tool parameter for THC set volts
Which section did you insert the define in? I believe it has to be in a certain place. Look at another post that has a custom parameter and see where it goes.
- Les Newell
- Site Admin
- Posts: 3680
- Joined: Thu May 11, 2006 8:12 pm
Re: plasma THC define custom tool parameter for THC set volts
DefineCustomToolParam should be outside of any functions. Code that is outside of a function will execute immediately when the post is selected in machine options, or when an edited post is saved.
Having said that, even if you do have that code inside a function you should not get that error. I just pasted that line into a post here and it ran fine.
Just a thought, is there an error in the code immediately preceding line? In some cases you can get an error where preceding code is actually the problem. Missing brackets in particular can cause some odd errors.
If you can't find the issue send me a copy of the post and I'll take a look at it.
Having said that, even if you do have that code inside a function you should not get that error. I just pasted that line into a post here and it ran fine.
Just a thought, is there an error in the code immediately preceding line? In some cases you can get an error where preceding code is actually the problem. Missing brackets in particular can cause some odd errors.
If you can't find the issue send me a copy of the post and I'll take a look at it.
-
- Posts: 7
- Joined: Thu Nov 09, 2023 9:58 am
Re: plasma THC define custom tool parameter for THC set volts
Thanks Les,
I have sent you a message with a copy of the post processor.
I tried with DefineCustomToolParam inside and outside functions, and in various places within the post. When it was within a function obviously it didn't immediately run so the error didn't show, but obviously it didn't work either.
I've checked brackets and formatting and can't see anything amiss.
Removing the custom tool parameter line restores the post processor to its former operation which has always been perfect
It's very odd!
as a background to this, I have run my plasma table since 2017 without the THC (this was never set up by the supplier, who just said that it didnt have thc, in reality it was incorrectly installed and didn't work) since it's z touchoff and I don't cut many huge parts its never been a real problem. Recently we have been looking at laser cutters to improve cutting on smaller parts, but we cant really stretch to a nice fibre laser, and an older co2 laser is a bit power hungry and won't really work with our power supply situation. off the back of that i gained the impetus to actually get the razordance THC working. Having rewired it, re-installed mach 3 and done a few other changes I now have working DTHC and its absolutely amazing, literally faultless. At the moment I have to set the volts manually though and that's whats prompted me to try and set the volts in sheetcam so my guys have an easy to use system and I don't get a daily questioning on how to use it.
I have sent you a message with a copy of the post processor.
I tried with DefineCustomToolParam inside and outside functions, and in various places within the post. When it was within a function obviously it didn't immediately run so the error didn't show, but obviously it didn't work either.
I've checked brackets and formatting and can't see anything amiss.
Removing the custom tool parameter line restores the post processor to its former operation which has always been perfect
It's very odd!
as a background to this, I have run my plasma table since 2017 without the THC (this was never set up by the supplier, who just said that it didnt have thc, in reality it was incorrectly installed and didn't work) since it's z touchoff and I don't cut many huge parts its never been a real problem. Recently we have been looking at laser cutters to improve cutting on smaller parts, but we cant really stretch to a nice fibre laser, and an older co2 laser is a bit power hungry and won't really work with our power supply situation. off the back of that i gained the impetus to actually get the razordance THC working. Having rewired it, re-installed mach 3 and done a few other changes I now have working DTHC and its absolutely amazing, literally faultless. At the moment I have to set the volts manually though and that's whats prompted me to try and set the volts in sheetcam so my guys have an easy to use system and I don't get a daily questioning on how to use it.
- Les Newell
- Site Admin
- Posts: 3680
- Joined: Thu May 11, 2006 8:12 pm
Re: plasma THC define custom tool parameter for THC set volts
I just tried your post here and it worked. What version of SheetCam are you using?
-
- Posts: 7
- Joined: Thu Nov 09, 2023 9:58 am
Re: plasma THC define custom tool parameter for THC set volts
just checked, I'm on version 4.0.2
-
- Posts: 7
- Joined: Thu Nov 09, 2023 9:58 am
Re: plasma THC define custom tool parameter for THC set volts
can I just install a newer version with my existing licence?
thanks
thanks
- Les Newell
- Site Admin
- Posts: 3680
- Joined: Thu May 11, 2006 8:12 pm
Re: plasma THC define custom tool parameter for THC set volts
As long as you have SheetCam TNG then yes, your license will work with the latest version.
-
- Posts: 7
- Joined: Thu Nov 09, 2023 9:58 am
Re: plasma THC define custom tool parameter for THC set volts
Thanks Les!!
problem is solved!
Yes, updated sheetcam and now everything is perfect!
Much appreciated
thanks again
Nat at Retropower
problem is solved!
Yes, updated sheetcam and now everything is perfect!
Much appreciated
thanks again
Nat at Retropower
-
- Posts: 12
- Joined: Wed Mar 27, 2024 5:06 pm
Re: plasma THC define custom tool parameter for THC set volts
hope you dont mind me hijacking this thread,
But i am struggling to get my Razordance THC to work, and wondered if you have any tips/things to look out for?
cheers!
But i am struggling to get my Razordance THC to work, and wondered if you have any tips/things to look out for?
cheers!