Gmoccapy - A new screen for linuxcnc
this is the content of plasma.py
# This is only to show, that you can implement also your
# own python callbacks.
import linuxcnc
import os
class Plasma:
def __init__(self,halcomp,builder,useropts):
inifile = linuxcnc.ini(os.getenv("INI_FILE_NAME"))
self.builder = builder
self.THC_StepSize = self.builder.get_object("THC_StepSize")
value = inifile.find("PLASMA","THC_StepSize")
self.THC_StepSize.set_value(float(value))
self.TravelHeight = self.builder.get_object("TravelHeight")
value = inifile.find("PLASMA","TravelHeight")
self.TravelHeight.set_value(float(value))
self.TravelGap = self.builder.get_object("TravelGap")
value = inifile.find("PLASMA","TravelGap")
self.TravelGap.set_value(float(value))
self.SwitchTravel = self.builder.get_object("SwitchTravel")
value = inifile.find("PLASMA","SwitchTravel")
self.SwitchTravel.set_value(float(value))
self.PierceDelay = self.builder.get_object("PierceDelay")
value = inifile.find("PLASMA","PierceDelay")
self.PierceDelay.set_value(float(value))
self.PierceGap = self.builder.get_object("PierceGap")
value = inifile.find("PLASMA","PierceGap")
self.PierceGap.set_value(float(value))
self.Piercing_auto = self.builder.get_object("Piercing_auto")
value = inifile.find("PLASMA","Piercing_autostart")
self.Piercing_auto.set_active(int(value))
self.HeightLock = self.builder.get_object("HeightLock")
value = inifile.find("PLASMA","enable_HeightLock")
self.HeightLock.set_active(int(value))
self.CHL_Threshold = self.builder.get_object("CHL_Threshold")
value = inifile.find("PLASMA","CHL_Threshold")
self.CHL_Threshold.set_value(float(value))
self.THC_TargetVoltage = self.builder.get_object("THC_TargetVoltage")
value = inifile.find("PLASMA","THC_TargetVoltage")
self.THC_TargetVoltage.set_value(float(value))
def on_btn_torch_toggled(gtkobj,data=None):
if gtkobj.get_active():
print("active")
else:
print("not active")
def get_handlers(halcomp,builder,useropts):
return(Plasma(halcomp,builder,useropts))
Norbert
Please Log in or Create an account to join the conversation.
Regards
Marius
www.bluearccnc.com
Please Log in or Create an account to join the conversation.
The only thing I haven't found is a way to toggle the spindle brake. If I need to customize this myself, I'd like to replace the coolant mist button with the brake toggle since I don't have mist.
Is there a guide to basic customization that I haven't found?
Thanks again!
Please Log in or Create an account to join the conversation.
In my ini I have it setup for imperial like this...
[TRAJ]
LINEAR_UNITS = inch
[RS274NGC]
RS274NGC_STARTUP_CODE = G18 G20 G40 G49 G54 G80 G90 G94 G8 M9 M5 G64 P0.005
Here is a screen shot...
Is there another setting I need to make or is this a bug?
Thanks,
Wes
Please Log in or Create an account to join the conversation.
_MM = 0 # Metric units are used
_IMPERIAL = 1 # Imperial Units are used
Still the diameter DRO is in metric no matter what.
Please Log in or Create an account to join the conversation.
I've been playing with migrating my mill config from Axis to Gmoccapy and I'm really impressed. With the touchscreen, it's a pleasure to use. Thank you.
The only thing I haven't found is a way to toggle the spindle brake. If I need to customize this myself, I'd like to replace the coolant mist button with the brake toggle since I don't have mist.
Is there a guide to basic customization that I haven't found?
Thanks again!
Hallo sliptonic;
the easiest would be just replacing the button image and connect the mist signal to the spindle brake, but this will invoke a very big risk, if the gcode contains an M7, the brake will be activated.
There are different ways to adapt gmoccapy to your needs. The easiest is adding a custom glade panel with all the additional buttons, there are several examples in the sim / gmoccapy folder.
Second would be modifying the gmoccapy glade file, what might need some python editing of gmoccapy.py file.
The third way it to explain to me, why you need the spindle brake button on the screen and convince me to add the button, even if I do not know jet where to place it. In my knowledge there is no need for a special button, as motion does include the spindle-brake hal pin so the brake should be connected there.
Norbert
Please Log in or Create an account to join the conversation.
you got me!
That is a bug!, better there are two of them!
Do we need 4 digits for the max and actual feed boxes?
We are running out of space setting F125.1234, getting to long stringnumber!
What about the tool Info part, it shows 3 digits by default?
I will fix that as soon as possible!
Norbert
Please Log in or Create an account to join the conversation.
So the bugs will be fixed as soon as Chris does the push.
Test the gmoccapy_lathe_imperial.ini
All DRO are now in machine units
Tool offsets are shown with 4 digits
and the vel and feed labels do have two digits at this moment,
if you imperial users want more digits, I will add them.
Norbert
Please Log in or Create an account to join the conversation.
On my lathe I am currently retrofitting. Two digits for the velocity and speed will not be enough if I am understanding you correctly. This machine is capable of 500 ips rapids and 200 ipm cutting. For the tool number I only see a need for two max. I will only use two digits. Maybe there is a way we can show the wear offset on the screen when using the Fanuc style lathe tool change patch? Not sure if thats possible as I am not sure there is anything in hall to use for that yet? Another suggestion would be buttons on the screen that can turn the mpg on and off as well as select what axis you are jogging. Maybe even an LED on the button showing active or not. Also any chance we could move the exit button to the setting screen like gscreen industrial so that the user can exit without a password?
Thanks,
Wes
Please Log in or Create an account to join the conversation.
fixed some bugs on displaying labels in wrong units while in imperial mode
ver. 0.9.8.4
- diameter dro does not show imperial units, even if
machine units are imperial, fixed.
- tool info only with three digits in imperial mode,
now 4 digits
- active feed and active vel label not in machine units,
if in imperial mode, fixed
- cosmetic changes to gmoccapy_lathe.ini
- introduced a imperial lathe ini
Norbert
Please Log in or Create an account to join the conversation.