Gmoccapy - A new screen for linuxcnc

More
07 Nov 2013 03:16 #40602 by newbynobi
Hallo,

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.

More
08 Nov 2013 06:39 #40647 by mariusl
Thanks Norbert, all working now. I have started with the component but it is going to take a while as I have to test it very well. I am snowed under with work at this time but lucky it is all plasma machines so I will get enough opportunity to test.

Regards
Marius


www.bluearccnc.com

Please Log in or Create an account to join the conversation.

More
08 Nov 2013 07:56 #40652 by sliptonic
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!

Please Log in or Create an account to join the conversation.

More
08 Nov 2013 12:57 - 08 Nov 2013 14:20 #40657 by DaOne
I am having a problem with the lathe screen in imperial mode. The diameter is displaying metric while the radius is showing imperial. I also show metric in the "Max Velocity" box when I jog the axis.

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
Attachments:
Last edit: 08 Nov 2013 14:20 by DaOne.

Please Log in or Create an account to join the conversation.

More
08 Nov 2013 16:01 #40663 by DaOne
Ok, I got the "Max Velocity" box fixed by changing the "gmoccapy_handler.py" file to this...
_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.

More
09 Nov 2013 16:50 - 09 Nov 2013 16:51 #40681 by newbynobi

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
Last edit: 09 Nov 2013 16:51 by newbynobi. Reason: typo

Please Log in or Create an account to join the conversation.

More
09 Nov 2013 16:56 - 09 Nov 2013 18:35 #40682 by newbynobi
Halo Wes,

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
Last edit: 09 Nov 2013 18:35 by newbynobi.
The following user(s) said Thank You: DaOne

Please Log in or Create an account to join the conversation.

More
09 Nov 2013 19:46 #40683 by newbynobi
I just sent a patch to Chris, asking him to push the changes.
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
The following user(s) said Thank You: DaOne

Please Log in or Create an account to join the conversation.

More
10 Nov 2013 03:59 - 10 Nov 2013 10:48 #40693 by DaOne
Norbert,

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
Last edit: 10 Nov 2013 10:48 by DaOne.

Please Log in or Create an account to join the conversation.

More
11 Nov 2013 02:54 #40710 by newbynobi
gmoccapy 0.9.8.4 has been pushed

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.

Moderators: newbynobiHansU
Time to create page: 0.347 seconds
Powered by Kunena Forum