Feed override, Rapid override and Jogging synchronization

More
10 Aug 2023 13:01 #277533 by Taichi
Hello. Please help me with speed settings. I am using a 23 position toggle switch and muxgen to work out its positions. Feed override is changed with this switch. I need to make Feed override and Rapid override change at the same time. The first position of the switch is 1% in Feed override and it is necessary that there should also be 1% in Rapid override.
But that's not all. As I understood in linuxcnc there are 3 independent speeds. G1 - Feed override, G0 - Rapid override and manual movement - jogging.
Is it possible to adjust so that the jogging speed also changes proportionally to the position of the switch? For example, the jogging speed is 2000 mm/min (2 on image) and the switch is in the 10% position (1 on image). 2000/10 = 200 mm/min jogging speed.
You ask, what is all this for? Answer: To minimize the number of touches to the touch panel with dirty hands.


I also want to connect an additional 3 physical buttons to control the selected axis on the MPG. 1. Movement in a positive direction. 2. Movement in the negative direction. 3. Accelerated movement when the button is held down (Rabbit and turtle) Is it possible to implement all this in linuxcnc and gmoccapy gui?

Thx for answer.
Attachments:

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

More
10 Aug 2023 15:37 #277539 by Aciera
gmoccapy makes the feed override quite easy as it comes with the necessary input pins. I use a potentiometer to set the override so you will have to provide the required analog values using your 23 position switch.

#*******************************************************************
# --- FEED/SPEED OVERRIDES BY PANEL POTENTIOMETERS ---
#*******************************************************************
# --- POTENTIOMETER FEED OVERRIDE ---
setp gmoccapy.jog.jog-velocity.analog-enable 1
setp gmoccapy.feed.feed-override.analog-enable 1
setp gmoccapy.rapid.rapid-override.analog-enable 1
net poti-feed-scaled => gmoccapy.jog.jog-velocity.direct-value
net poti-feed-scaled => gmoccapy.feed.feed-override.direct-value
net poti-feed-scaled => gmoccapy.rapid.rapid-override.direct-value


As for the jogging buttons, this example will let you also jog before homing the machine. If you don't want that remove the pins starting with 'halui.joint.'

net x-plus <= your_input_pin => halui.axis.x.plus => halui.joint.0.plus
net x-minus <= your_input_pin => halui.axis.x.minus => halui.joint.0.minus
net y-plus <= your_input_pin => halui.axis.y.plus => halui.joint.1.plus
net y-minus <= your_input_pin => halui.axis.y.minus => halui.joint.1.minus
net z-plus <= your_input_pin => halui.axis.z.plus => halui.joint.2.plus
net z-minus <= your_input_pin => halui.axis.z.minus => halui.joint.2.minus

For the accelerated movement you could trigger a delay from either of the jog buttons and change the scale of the jog speed. This is going to take a bit of work in hal but it's all doable.

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

More
10 Aug 2023 19:08 #277565 by rodw
there are a number of halui jogging pins that let you do what you want. the 2 speeds can be done with a mux2 to select jog speed and rapid speed.

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

More
10 Aug 2023 20:28 #277569 by cmorley
use two mux components that use the same switch inputs.
One mux can be used as input for feed overrde.
The other mux can be used as input for rapid override.

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

More
14 Aug 2023 15:09 - 14 Aug 2023 15:20 #277965 by Taichi
loadrt mux_generic config="ss32"
addf mux-gen.00 servo-thread

# --- Feedrate overide - FO-INCR-A ---
net fo-incr-a     <=  hm2_5i25.0.7i76.0.3.input-00
# --- FO-INCR-B ---
net fo-incr-b     <=  hm2_5i25.0.7i76.0.3.input-01
# --- FO-INCR-C ---
net fo-incr-c     <=  hm2_5i25.0.7i76.0.3.input-02
# --- FO-INCR-D ---
net fo-incr-d     <=  hm2_5i25.0.7i76.0.3.input-03
# --- FO-INCR-E ---
net fo-incr-e     <=  hm2_5i25.0.7i76.0.3.input-04
# connect feed overide increments - switches
    setp halui.feed-override.count-enable true
    setp halui.feed-override.direct-value true
    setp halui.feed-override.scale .01
    setp halui.rapid-override.count-enable true
    setp halui.rapid-override.direct-value true
    setp halui.rapid-override.scale .01
net feedoverride-incr   =>  halui.feed-override.counts halui.rapid-override.counts

net fo-incr-a           =>  mux-gen.00.sel-bit-00
net fo-incr-b           =>  mux-gen.00.sel-bit-01
net fo-incr-c           =>  mux-gen.00.sel-bit-02
net fo-incr-d           =>  mux-gen.00.sel-bit-03
net fo-incr-e           =>  mux-gen.00.sel-bit-04
net feedoverride-incr   <=  mux-gen.00.out-s32
    setp mux-gen.00.debounce-us      200000
    setp mux-gen.00.suppress-no-input False
    setp mux-gen.00.in-s32-00          0
    setp mux-gen.00.in-s32-16          1
    setp mux-gen.00.in-s32-17          2
    setp mux-gen.00.in-s32-01          3
    setp mux-gen.00.in-s32-09          4
    setp mux-gen.00.in-s32-25          5
    setp mux-gen.00.in-s32-24          6
    setp mux-gen.00.in-s32-08          7
    setp mux-gen.00.in-s32-10          8
    setp mux-gen.00.in-s32-26          10
    setp mux-gen.00.in-s32-27          15
    setp mux-gen.00.in-s32-11          20
    setp mux-gen.00.in-s32-03          30
    setp mux-gen.00.in-s32-19          40
    setp mux-gen.00.in-s32-18          50
    setp mux-gen.00.in-s32-02          60
    setp mux-gen.00.in-s32-06          70
    setp mux-gen.00.in-s32-22          75
    setp mux-gen.00.in-s32-23          80
    setp mux-gen.00.in-s32-07          85
    setp mux-gen.00.in-s32-15          90
    setp mux-gen.00.in-s32-31          95
    setp mux-gen.00.in-s32-30          100  ​​​​​​​
Solved the problem with rapid override and feed override synchronization. Added a thread between them. Highlighted in bold. 
Now I need to do at least some synchronization with jog speed?
How to make it so that when starting the program, the jog speed is already 3000 mm/min?

Is it possible to link jog speed with this net? --> ​​​​​​​​​​​​​​net feedoverride-incr   =>  halui.feed-override.counts halui.rapid-override.counts ​​​​​​​
Thx for answer
Last edit: 14 Aug 2023 15:20 by Taichi.

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

More
14 Aug 2023 15:36 - 14 Aug 2023 15:39 #277967 by Taichi
loadrt mux4 count=1
addf mux4.0 servo-thread


setp axis.x.jog-vel-mode 1
setp axis.y.jog-vel-mode 1
setp axis.z.jog-vel-mode 1
setp axis.a.jog-vel-mode 1
setp axis.b.jog-vel-mode 1

setp mux4.0.in0 0.001
setp mux4.0.in1 0.01
setp mux4.0.in2 0.1

net scale1 mux4.0.sel0 <= hm2_5i25.0.7i76.0.3.input-26
net scale2 mux4.0.sel1 <= hm2_5i25.0.7i76.0.3.input-27

net mpg-scale <= mux4.0.out
net mpg-scale => axis.x.jog-scale
net mpg-scale => axis.y.jog-scale
net mpg-scale => axis.z.jog-scale
net mpg-scale => axis.a.jog-scale
net mpg-scale => axis.b.jog-scale


net axis-select-x <= hm2_5i25.0.7i76.0.3.input-20 => axis.x.jog-enable => halui.axis.x.select
net axis-select-y <= hm2_5i25.0.7i76.0.3.input-21 => axis.y.jog-enable => halui.axis.y.select
net axis-select-z <= hm2_5i25.0.7i76.0.3.input-22 => axis.z.jog-enable => halui.axis.z.select
net axis-select-a <= hm2_5i25.0.7i76.0.3.input-23 => axis.a.jog-enable => halui.axis.a.select
net axis-select-b <= hm2_5i25.0.7i76.0.3.input-24 => axis.b.jog-enable => halui.axis.b.select

net jog-counter <= hm2_5i25.0.7i76.0.3.enc0.count

net jog-counter => axis.x.jog-counts
net jog-counter => axis.y.jog-counts
net jog-counter => axis.z.jog-counts
net jog-counter => axis.a.jog-counts
net jog-counter => axis.b.jog-counts


net axis-for-plus  =>   halui.axis.selected.plus  hm2_5i25.0.7i76.0.3.input-10
net rapid-on => halui.rapid-override.count-enable hm2_5i25.0.7i76.0.3.input-09
net axis-for-minus =>   halui.axis.selected.minus hm2_5i25.0.7i76.0.3.input-08


This is code from jog.hal.  All axes work fine, scale changes fine, MPG works fine. But I need to program 3 more physical buttons. For the selected axis to move with jog speed in the positive direction, another in the negative direction.The third button, when pressed, changed from "turtle" to "rabbit". And when it was released, the slow speed returned again. I tried to solve it myself, these are the 3 last lines in the code.
Please help to solve this problem
Last edit: 14 Aug 2023 15:39 by Taichi.

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

More
14 Aug 2023 16:10 #277972 by Taichi
net axis-for-plus  =>   halui.jog.selected.plus  hm2_5i25.0.7i76.0.3.input-10
net rapid-on       =>   gmoccapy.jog.turtle-jog hm2_5i25.0.7i76.0.3.input-09-not
net axis-for-minus =>   halui.jog.selected.minus hm2_5i25.0.7i76.0.3.input-08
Will this work?

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

More
14 Aug 2023 18:11 #277988 by Aciera
Note that everything that involves pins for gmoccapy gui like:
gmoccapy.jog.turtle-jog

Will need to be done in a 'postgui' - halfile because the regular hal files load before the gui has been created so none of the gui pins will be found at that stage.
The following user(s) said Thank You: Taichi

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

More
14 Aug 2023 18:36 #277992 by Taichi
There are so many nuances in LCNC... I would change the parameters tomorrow and I wouldn't guess why it wouldn't work. Thank you.

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

More
15 Aug 2023 17:04 #278053 by Taichi
It turned out to be configured as I wanted. It turns out that in lcnc there are no pins with the name "halui.jog.selected.minus" in halshow, but only "halui.axis.selected.minus".
But in order for it to work, you need to set the speed "halui.axis.jog-speed". So I used mult2 to multiply the value from "gmoccapy.spc_jog_lin_vel.value" and the value I got earlier in jog.hal --"halui.feed-override.counts". Thus, at the output, I got the speed that I set on the slider multiplied by the % indicated on the switch. I used a tip from Aciera for a quick move. gmoccapy.jog.turtle-jog in the postgui file.

I also got the problem. When I select the axis "halui.axis.N.select" on the remote control, the value "halui.axis.selected" changes also as required. But when the axis selection switch is turned off, the "halui.axis.selected" setting is always the last, that is, in my case, it is the value "0". This means that the axis numbered 0, that is, the X axis can still be controlled by the physical buttons "halui.axis.selected.minus" and "halui.axis.selected.plus". How can I reset the value of "halui.axis.selected" to "NULL" or something so that the control is disabled?

Thx for help.

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

Moderators: newbynobiHansU
Time to create page: 0.124 seconds
Powered by Kunena Forum