Qtlathe

More
6 years 4 months ago #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 to join the conversation.

More
6 years 4 months ago #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?

Please Log in to join the conversation.

More
6 years 4 months ago #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..

Please Log in to join the conversation.

More
6 years 4 months ago #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.
Code:
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 to join the conversation.

More
6 years 4 months ago #172827 by cmorley
Replied by cmorley on topic Qtlathe
try this:
Code:
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 to join the conversation.

More
6 years 4 months ago #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)
Code:
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 to join the conversation.

More
6 years 4 months ago #172929 by cmorley
Replied by cmorley on topic Qtlathe
pushed a fix for status label's jograte and maxvelocity units on g20/21

Please Log in to join the conversation.

More
6 years 4 months ago #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.

Please Log in to join the conversation.

More
6 years 3 months ago #173283 by cmorley
Replied by cmorley on topic Qtlathe
Change:
Code:
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:
Code:
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:
Code:
def before_loop__(self): STATUS.connect('state-estop',lambda q:self.w.close()) #self.w.close()

Please Log in to join the conversation.

More
6 years 3 months ago #173365 by cmorley
Replied by cmorley on topic Qtlathe
pushed a fix for feed/jog/max velocity units in status labels

Please Log in to join the conversation.

Time to create page: 0.087 seconds
Powered by Kunena Forum