Qtlathe

More
25 Jun 2020 05:58 #172687 by cmorley
Replied by cmorley on topic Qtlathe

How to add mm / inс mapping with conversion of speed of movement.

please explain - if you set g20/g21 increments should change.

Sim panel is used for jogging, pausing and stopping etc - the original screen did no include screen keys for jogging.
It was designed similar to touchy.

DTG is available in dro_widget as reference type 2

yes conversion would be good to add to calculator.

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

More
25 Jun 2020 10:09 - 25 Jun 2020 15:18 #172697 by hottabich
Replied by hottabich on topic Qtlathe
I mean the numbers in the status label jog rate, active feed as in the screenshots of the previous post.
I give screenshots of how it works in this interface. As 72 beat, 72 remains. When run macros error z positive limit. In INI file I put MAX_LIMIT = 4.0 the error goes away. Also added macros go_to_zero and go_to_home please check the correct operation. Test file works good.DTG necessary or not? If necessary, how to add a third page to dro?
Last edit: 25 Jun 2020 15:18 by hottabich.

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

More
26 Jun 2020 03:46 #172772 by cmorley
Replied by cmorley on topic Qtlathe
ahh yes jog rate in status label should switch units when in g20/g21 mode.

right click on stacked widget in designer allows adding pages.

DTG on lathes is popular.

I am too busy at work to do much coding for another 10 days or so..
The following user(s) said Thank You: hottabich

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

More
26 Jun 2020 14:32 #172800 by hottabich
Replied by hottabich on topic Qtlathe
Sorry for the wrong question. I cannot add a DTG page to the handler. In the designer, I can.
def toggle_dro(self):
        cur = self.w.droPaneStack.currentIndex()
        if cur == 0:
            self.w.droPaneStack.setCurrentIndex(cur+1)
        else:
            self.w.droPaneStack.setCurrentIndex(0)
When will the time please tell me. I'm not in a hurry just a hobby.

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

More
27 Jun 2020 02:43 #172827 by cmorley
Replied by cmorley on topic Qtlathe
try this:
def toggle_dro(self):
        next = self.w.droPaneStack.currentIndex() +1
        if next > 2:
            self.w.droPaneStack.setCurrentIndex(0)
        else:
            self.w.droPaneStack.setCurrentIndex(next)

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

More
27 Jun 2020 02:52 #172828 by cmorley
Replied by cmorley on topic Qtlathe
Or better (you can add as many pages as you like and it will toggle between all of them)
def toggle_dro(self):
        next = self.w.droPaneStack.currentIndex() +1
        if  next = self.w.droPaneStack.count() :
            self.w.droPaneStack.setCurrentIndex(0)
        else:
            self.w.droPaneStack.setCurrentIndex(next)

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

More
27 Jun 2020 23:39 #172929 by cmorley
Replied by cmorley on topic Qtlathe
pushed a fix for status label's jograte and maxvelocity units on g20/21
The following user(s) said Thank You: tommylight, hottabich

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

More
29 Jun 2020 11:35 - 29 Jun 2020 17:04 #173073 by hottabich
Replied by hottabich on topic Qtlathe
Thanks, that works (if next == self.w.droPaneStack.count). But here you can somehow register
when g21 then mm / min. Everything works except F12 and remove Shutdown after Start.
I added another golden widget MDITouchy.
Attachments:
Last edit: 29 Jun 2020 17:04 by hottabich.

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

More
01 Jul 2020 02:29 #173283 by cmorley
Replied by cmorley on topic Qtlathe
Change:
    def processed_key_event__(self,receiver,event,is_pressed,key,code,shift,cntrl):
        # when typing in MDI, we don't want keybinding to call functions
        # so we catch and process the events directly.
        # We do want ESC, F1 and F2 to call keybinding functions though
        if code not in(QtCore.Qt.Key_Escape,QtCore.Qt.Key_F1 ,QtCore.Qt.Key_F2,
                    QtCore.Qt.Key_F3,QtCore.Qt.Key_F5,QtCore.Qt.Key_F5):
            raise

to:
    def processed_key_event__(self,receiver,event,is_pressed,key,code,shift,cntrl):
        # when typing in MDI, we don't want keybinding to call functions
        # so we catch and process the events directly.
        # We do want ESC, F1 and F2 to call keybinding functions though
        if code not in(QtCore.Qt.Key_Escape,QtCore.Qt.Key_F1 ,QtCore.Qt.Key_F2,
                    QtCore.Qt.Key_F3,QtCore.Qt.Key_F5,QtCore.Qt.Key_F5,
                    QtCore.Qt.Key_F6,QtCore.Qt.Key_F7,QtCore.Qt.Key_F12):
            raise


change to:
    def before_loop__(self):
        STATUS.connect('state-estop',lambda q:self.w.close())
        #self.w.close()

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

More
01 Jul 2020 23:47 #173365 by cmorley
Replied by cmorley on topic Qtlathe
pushed a fix for feed/jog/max velocity units in status labels
The following user(s) said Thank You: tommylight

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

Moderators: cmorley
Time to create page: 0.131 seconds
Powered by Kunena Forum