Сustomization QTvcp

More
5 years 10 months ago #192253 by hottabich
Replied by hottabich on topic Сustomization QTvcp
Clicked action button spindle_up_action or spindle_down_action, start spindle, start fwd or revers. I think it's wrong. Your comment please.
Attachments:

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

More
5 years 10 months ago #192261 by cmorley
Replied by cmorley on topic Сustomization QTvcp
That is how it's designed.
If the spindle is not running it starts, if it's running it changes speed.

Of course you could code the button to do something else

Chris

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

More
5 years 10 months ago - 5 years 10 months ago #192269 by hottabich
Replied by hottabich on topic Сustomization QTvcp
Thank you, I see!
Last edit: 5 years 10 months ago by hottabich.

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

More
5 years 10 months ago #192279 by cmorley
Replied by cmorley on topic Сustomization QTvcp
as it is now:
CCW always sets speed down, if the spindle is already running and CW always sets the speed up, if the spindle is already running.

I could see the argument for the button that starts the spindle always being the speed up button.

Chris
The following user(s) said Thank You: hottabich

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

More
5 years 10 months ago - 5 years 10 months ago #192342 by hottabich
Replied by hottabich on topic Сustomization QTvcp
And please tell me how to programmatically disable the run in action button UP, Down function? This is for the safety of the car, I think so. Thanks for attention!
Last edit: 5 years 10 months ago by hottabich.

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

More
5 years 10 months ago - 5 years 10 months ago #192355 by cmorley
Replied by cmorley on topic Сustomization QTvcp
So this is the relevant code in action_button.py
it checks what spindle you wish to start (-1 means all spindles)
If the spindle is running it speeds them up.
If the spindle isn't running it starts it at the default spindle speed.
Code:
elif self.spindle_up: if self.joint == -1: a = 0 b = INFO.AVAILABLE_SPINDLES else: a = self.joint b = self.joint +1 for i in range(a,b): if STATUS.is_spindle_on(i): ACTION.SET_SPINDLE_FASTER(i) else: ACTION.SET_SPINDLE_ROTATION(linuxcnc.SPINDLE_FORWARD, INFO['DEFAULT_SPINDLE_{}_SPEED'.format(i)],i)


Here might be a function to add to the handler file to be called from a button.
You would need to use designer to connect a signal to it.
It assumes you only wish to speed up the spindle number 0
Code:
def spindle_faster(self, state): if state: if STATUS.is_spindle_on(i): ACTION.SET_SPINDLE_FASTER(0)

Chris
Last edit: 5 years 10 months ago by cmorley.
The following user(s) said Thank You: hottabich

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

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