Pin for manual command is running

More
01 Feb 2023 09:31 #263427 by HiSH
While a gcode-command is running, it is signed at the pin halui.programm.is-running.
Is there a pin, which shows a manual command from the ui is running?

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

More
01 Feb 2023 18:34 #263455 by andypugh
halui.program.is-running is also set when a manual (MDI) command is running.
But if you look at halui.mode.is-auto and ...mode.is-mdi you can tell them apart.

 
Attachments:

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

More
02 Feb 2023 07:53 #263500 by HiSH
Thank you for your answer. Sorry, but i didn't mean a manual mdi-command. 
I mean the buttons on the first tab in "axes". (see attachment)

 
Attachments:

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

More
04 Feb 2023 10:50 #263654 by andypugh
In that case, no. Only the GUI knows that you have pressed those.

What is the use case? The buttons only do a very limited number of things, most of which directly set a HAL pin (spindle on, flood on etc)

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

More
06 Feb 2023 08:53 #263807 by HiSH
May be, i am using the wrong way, but for switching the spindle-gear on my cnc, i remap the s-code and set an motion.analog-out-00 pin as speed-cmd. So, if the user press for example "+"-button on the manual page for the increasing spindle-speed, i need this info for using an other speed-cmd pin as setpoint for the new spindle-speed and for switching the gear.

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

More
06 Feb 2023 10:44 #263811 by andypugh
For this particular situation you can create a HAL pin that changes state when the spindle buttons are operated, but I am not sure how you will then use that pin to call your remap.

Use a "ddt" component monitoring spindle speed command, and then a "wcomp" to set a bit when the ddt is non-zero.

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

More
07 Feb 2023 07:34 #263902 by HiSH
Thank you! I think this may work. I could use halui.spindle.0.is-on with halui.program.is-running to decide, whether the correct speed source is.

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

More
07 Feb 2023 10:25 #263911 by andypugh
A better answer might be a custom HAL component that sits between the spindle pins and the controller.

I have something like this on my lathe.

The component takes spindle speed command and spindle-on as input (plus the state of the auto / manual and brake enable/disable switches) and outputs a motor speed command to the VFD along with gear change commands. And, also, spindle-at-sped so that motion does not continue until the spindle is in the new gear and up to speed.

It also considers the current motion-mode and only does a gear change when the system is doing a G0 or is not moving.

It attempts to synch the input and output shaft speeds so that it can change gear without stopping the spindle, too. but that is of a lot more relevance to a lathe than a mill as on a lathe in CSS mode the spindle speed varies a lot more than with a mill (where, typically, spindle speed only changes due to a tool change)

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

More
07 Feb 2023 12:19 #263920 by HiSH
>>A better answer might be a custom HAL component that sits between the spindle pins and the controller.
I am already using a custom HAL component for switching the gears.

>>The component takes spindle speed command and spindle-on as input (plus the state of the auto / manual and brake enable/disable switches) >>and outputs a motor speed command to the VFD along with gear change commands. And, also, spindle-at-sped so that motion does not >>continue until the spindle is in the new gear and up to speed.
Yes, i do it in my component similar as you, but my problem is, to understand which pins of which components should be served by which other component pins. Is there anywhere a schema or a plan, which shows the context between the components? 
For example, there is the component "spindle" and i thought, the setpoint of the speed of the "spindle" should be the "speed-in"-pin, but this pin seams internaly connected with the "halui"-component and when i press the "+"-button on the "Manual control [F3]" tab, the "speed-in"-pin will increased. So I use
"spindle.0.speed-out" as input one und motion.analog-out--00 as input two in my user component. But, when the component "spindle" represents the issues of a spindle, both manual actions on the "Manual control" tab and g-codes like "S1000" should control the "spindle.0.speed-in". That meas for switching a gear, my user component should get the setpoints vom the ui and from the g-codes and control the "spindle.0.speed-in".

>>It attempts to synch the input and output shaft speeds so that it can change gear without stopping the spindle, too. but that is of a lot more >>relevance to a lathe than a mill as on a lathe in CSS mode the spindle speed varies a lot more than with a mill (where, typically, spindle speed >>only changes due to a tool change)
Ok, i have a mill, which makes it easier.

I still have the problems, between mdi-commands and manual inputs in the manual tab. Sometimes when chosinging the manual tab while a gcode like S1000 is running, the pin halui.program.is-running remains in true for ever and i didn't know why. Only a estop can help. 

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

More
07 Feb 2023 13:06 - 07 Feb 2023 13:07 #263925 by andypugh
Does your HAL component need to know _why_ the spindle speed has changed? Mine doesn't care, if spindle.0.speed-out changes then the component calculates a new VFD frequency and (if necessary) shifts gear.
It doesn't matter what the cause of the speed change is.

linuxcnc.org/docs/stable/html/man/man9/m....html#SPINDLE%20PINS
Last edit: 07 Feb 2023 13:07 by andypugh.

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

Time to create page: 0.204 seconds
Powered by Kunena Forum