Spindle Control, external buttons, a gearbox comp, and Gmoccapy

More
02 Dec 2018 20:33 #121727 by RotarySMP
Hello Norbert,

Thank you for Gmoccapy. Brilliant work. Now that I have my MAHO MH400E up and running, I am getting to know it, and it works great.

The MAHO uses discrete spindle speeds from gear ratios rather than continuously variable speeds from a VFD. Our gearbox comp sets the speed nearest to commanded speed, and returns this actual speed to the hal. I still have a bit of work still to get the gearbox.comp playing nicely with Gmoccapy. I would appreciate your input to the following issues...

1) I added a physical spindle Off button to my control panel. I wanted theis to mirror the behavior of the spindle off button in gmoccapy. I netted halui.spindle.stop to the gearbox.comp, to enable it to stop the spindle. How does gmoccapy's virtual button stop the spindle? I see no gmoccapy pin for this.

2) The Maho provides "Spindle is stopped" feedback with a time relay which closes 5 sec after a stop is commanded. In our gearbox.comp, we monitor this this signal as the inhibit to not change gear while the spindle is running. When a stop is commanded in Gmoccapy, in addition to the stop command, it sets the commanded speed to zero. Is this gmoccapy behavior, or linuxcnc? The result for my installation:
> spindle is commanded stop.
> it stops.
> after 5 sec the "spindle is stopped" relays closes removing the gearbox inhibit.
> gearbox.comp sees the new commanded speed = zero
> gearbox.comp changes gear into neutral.

What do I need to do to have Gmoccapy's display and report the last commanded speed, rather than drop to zero?

3) I have two encoders, one of feed-rate override, and the other I would like to use to set the continuous jogging speed, with its push button resetting a standard value. What do I need to do to add this to gmoccapy?
Mark

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

More
03 Dec 2018 16:07 - 03 Dec 2018 16:09 #121753 by newbynobi

1) I added a physical spindle Off button to my control panel. I wanted theis to mirror the behavior of the spindle off button in gmoccapy. I netted halui.spindle.stop to the gearbox.comp, to enable it to stop the spindle. How does gmoccapy's virtual button stop the spindle? I see no gmoccapy pin for this.




gmoccapy sends the command to stop or start the spindle directly to the linuxcnc component, there is no pin for this.
To whatch the spindle state, you may use:
spindle.0.on
or
halui.spindle.0.is-on

to start or stop just use the corresponding halui pin


What do I need to do to have Gmoccapy's display and report the last commanded speed, rather than drop to zero?

If you look at the info panel you will see, that gmoccapy is displaying the commanded spindle vel correct, go to MDI and enter S2000 M3, see the S value in the info panel. But there is no hal pin to get the values. If you look at spindle.0.speed-cmd-rps you will see, that this value will drop to null as soon as the spindle is not spinning. Internally gmoccapy uses the stat interface to get the speed,
its around line 3220 you will find speed = self.stat.spindle[0]. That value is not exported as hal pin.


3) I have two encoders, one of feed-rate override, and the other I would like to use to set the continuous jogging speed, with its push button resetting a standard value. What do I need to do to add this to gmoccapy?




gmoccapy offers several hal pin to set the jog velocity, please see
gmoccapy.jog.jog-velocity......
you may use a potentiometer through analog value or a encoder, counting increments.
There is no way to use a button to reset to default value. You may include a button as embedded tab and handle that behavior in hal.
I am not sure if you will get unexpected behavior if you set a direct value with a hal pin and use at the same time an encoder, so please test first in a sim config.

Norbert
Last edit: 03 Dec 2018 16:09 by newbynobi.
The following user(s) said Thank You: RotarySMP

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

More
03 Dec 2018 18:57 - 03 Dec 2018 18:57 #121761 by RotarySMP

1) gmoccapy sends the command to stop or start the spindle directly to the linuxcnc component, there is no pin for this.
To whatch the spindle state, you may use:

spindle.0.on
or
halui.spindle.0.is-on

to start or stop just use the corresponding halui pin.


Oh, we didn't realise you could interact with the main linuxcnc component directly. Our comp creates pins and we interface everything externally. Is there a "how to" somewhere which describes how to do this direct interface?


What do I need to do to have Gmoccapy's display and report the last commanded speed, rather than drop to zero?

newbynobi wrote:

If you look at the info panel you will see, that gmoccapy is displaying the commanded spindle vel correct, go to MDI and enter S2000 M3, see the S value in the info panel. But there is no hal pin to get the values. If you look at spindle.0.speed-cmd-rps you will see, that this value will drop to null as soon as the spindle is not spinning. Internally gmoccapy uses the stat interface to get the speed,
its around line 3220 you will find speed = self.stat.spindle[0]. That value is not exported as hal pin.

3) I have two encoders, one of feed-rate override, and the other I would like to use to set the continuous jogging speed, with its push button resetting a standard value. What do I need to do to add this to gmoccapy?


gmoccapy offers several hal pin to set the jog velocity, please see
gmoccapy.jog.jog-velocity......
you may use a potentiometer through analog value or a encoder, counting increments.
There is no way to use a button to reset to default value. You may include a button as embedded tab and handle that behavior in hal.
I am not sure if you will get unexpected behavior if you set a direct value with a hal pin and use at the same time an encoder, so please test first in a sim config.

Norbert

I think I'll use that button to toggle bettween rabbit and tortoise.

Mark
Last edit: 03 Dec 2018 18:57 by RotarySMP.

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

More
06 Dec 2018 17:14 #121962 by andypugh

RotarySMP wrote: Oh, we didn't realise you could interact with the main linuxcnc component directly. Our comp creates pins and we interface everything externally. Is there a "how to" somewhere which describes how to do this direct interface?


If you are working in Python then it is fairly easy:
linuxcnc.org/docs/2.7/html/config/python-interface.html (note that some things are different in the master version, look at the master docs if that is what you are using)

I don't think you can do anything like that in C. The "canonical interface" is in C++ and I don't think that works in realtime comps. (But I have never tried, and this is a guess).

You could _try_ calling functions direct: github.com/LinuxCNC/linuxcnc/blob/master...l_intf/canon.hh#L242

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

More
07 Dec 2018 10:17 - 07 Dec 2018 10:18 #121997 by newbynobi
Hallo Mark,

I need to retrofit a DECKEL FP4, that machine also uses a gearbox.
Are you willing to share your gearbox.comp?
That would help, need to begin from Null.

Norbert
Last edit: 07 Dec 2018 10:18 by newbynobi.

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

More
07 Dec 2018 20:48 - 07 Dec 2018 20:49 #122016 by RotarySMP
Hello Norbert,

It is all posted to github . My friend Sergey did the programming. Since he is a professional coder, it is very well documented. We also posted all the assumptions into the associated Wiki.

I'll be happy to help you with this.

I believe that the big difference between the MAHO MH and the Deckel FPgearboxes is that the MAHO rotates the shafts in both directions between ends stops, the FP shafts can rotate in 360° till they reach the correct position.
Mark
Last edit: 07 Dec 2018 20:49 by RotarySMP.

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

More
11 Jan 2019 16:54 - 11 Jan 2019 19:43 #123979 by RotarySMP
Hello Norbert,

When I net gmoccapy.turtle-jog to an external momentary switch the state change do not latch, the way it does with the on screen button. It only goes to turtle as long as I hold down the button. What would I have to do to have the state change and latch with each push of my physical momentary button please?
Mark
Last edit: 11 Jan 2019 19:43 by RotarySMP.

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

More
03 Feb 2019 12:13 #125580 by newbynobi
@RotarySMP

turtle jog button is a toggle button and the corresponding hal pin will react to any change. So if you want to use a momentary switch to toggle the button, please take a look to the hal component toggle2nist.

That exactly to solve your issue.

Norbert

P.S. Sorry for the very late answer
The following user(s) said Thank You: RotarySMP

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

More
03 Feb 2019 18:17 #125594 by RotarySMP
Thanks Norbert.

Are you making progress on implementing that Deckel gearbox.comp?
Mark

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

More
06 Feb 2019 16:05 #125817 by newbynobi
I stoped the Deckel FP3 project, will go on in summer?
Or even later, lot of work to do?

Norbert

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

Moderators: newbynobi
Time to create page: 0.116 seconds
Powered by Kunena Forum