SheetCam Plasma Post Magic
20 Jun 2015 03:41 - 20 Jun 2015 03:49 #60005
by BigJohnT
SheetCam Plasma Post Magic was created by BigJohnT
After forgetting to set the voltage for the thc componet for the upteenth time and hating the spin box and complaining on the IRC that I needed to set a pin from G code cradek came to my rescue and made a comment that sent me down the path to discover how to do just that.
Setting the pin was dead easy as it is a float pin so using M68 I set the pin value at the start of the G code file.
The hard part was getting SheetCam to post the voltage on the M68 E0 Q. I opened up the post file and after hours and hours of guessing what lula is I finally got the answer.
My "Tool Name" looks like this:
So what I did is find the v then make a substring from the string with just the volts and concatenated that onto the M68 E0 Q
The resulting G code output of OnNewOperation is
JT
Setting the pin was dead easy as it is a float pin so using M68 I set the pin value at the start of the G code file.
# reads the volts setting from the G code M68 E0 Q
net volts-requested thc-pid.volts-requested <= motion.analog-out-00
The hard part was getting SheetCam to post the voltage on the M68 E0 Q. I opened up the post file and after hours and hours of guessing what lula is I finally got the answer.
function OnNewOperation()
post.Text ("(Process: ", operationName, ")\n")
VoltsStart = string.find(operationName, "v") - 2
VoltsEnd = string.find(operationName, "v") - 1
Volts = string.sub(operationName, VoltsStart, VoltsEnd)
post.Text ("M68 E0 Q", Volts, "\n")
if (plungeRate <= 0) then
post.Warning("WARNING: Plunge rate is zero")
end
if (feedRate <= 0) then
post.Warning("WARNING: Feed rate is zero")
end
end
My "Tool Name" looks like this:
FC 16ga 40a 79v
So what I did is find the v then make a substring from the string with just the volts and concatenated that onto the M68 E0 Q
The resulting G code output of OnNewOperation is
(Part: 12v Dual USB Bracket)
(Process: Outside Offset, 0, T10: FC 16ga 40a 79v)
M68 E0 Q79
JT
Last edit: 20 Jun 2015 03:49 by BigJohnT.
Please Log in or Create an account to join the conversation.
21 Jun 2015 13:33 #60030
by Rick G
Replied by Rick G on topic SheetCam Plasma Post Magic
That's neat John!
Rick G
Rick G
The following user(s) said Thank You: grijalvap
Please Log in or Create an account to join the conversation.
Moderators: Skullworks
Time to create page: 0.098 seconds