Info about a feature into "Create Plasma Tool" dialog

Having problems with or questions about SheetCam? Post them here.
Post Reply
shineworld
Posts: 15
Joined: Tue Nov 13, 2018 8:30 am

Info about a feature into "Create Plasma Tool" dialog

Post by shineworld »

There is a way to use the two read-only fields "Current" and "Voltage" as fields of the tool created with the button "Create Tool"?
001.png
001.png (22.83 KiB) Viewed 1249 times
My CNC board can control the Ampere of the plasma generator through a specific G-Code so this field is very interesting.
The CNC board uses an analogic input to manage THC and also Voltage parameter is useful.

I've already added two custom tool parameters:

Code: Select all

--
--- SHEECAM CUSTOM TOOL PARAMETERS
--
--
post.DefineCustomToolParam("PlasmaTool","Generator Ampere","cutAmpere",sc.unit0DECPLACE, 0, 0, 500)
post.DefineCustomToolParam("PlasmaTool","THC Cut Volts","cutVolts",sc.unit0DECPLACE, 0, 0, 500)
002.jpg
002.jpg (77.18 KiB) Viewed 1249 times
but obviously when I create a new tool with "Create Plasma Tool" these fields are set to 0.

There is a lua script and info on how to extend behaviour ?

Thank you for suggestions.
User avatar
djreiswig
Posts: 484
Joined: Sat Feb 20, 2016 4:47 am
Location: SE Nebraska

Re: Info about a feature into "Create Plasma Tool" dialog

Post by djreiswig »

In your tool parameter declaration one of the two zeros is the default value. I don't recall which one it is but it should be in the manual. I'm not sure if that is what you're looking for or not.
shineworld
Posts: 15
Joined: Tue Nov 13, 2018 8:30 am

Re: Info about a feature into "Create Plasma Tool" dialog

Post by shineworld »

Ok, I can also add a default value in "cutAmpere" & "cutVolts" custom tool parameters but that I would
like to know is if it is possible, in PlasmaTool.lua, to get database (csv) Current and Voltage fields and place
programmatically the values in the custom parameters during "Create Tool" (onCreate) event.
Post Reply