Physical Feed override knob

More
06 Apr 2019 17:01 - 06 Apr 2019 17:02 #130402 by PCW
Replied by PCW on topic Physical Feed override knob
Since you have two sources of feed override, It seems you would either have to have a button of some kind select between the two or if you wanted to get fancy, make a change detector on both (GUI and potentiometer) sources and select the source that changed last...
Last edit: 06 Apr 2019 17:02 by PCW.

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

More
06 Apr 2019 17:43 #130404 by andypugh

Oke, getting there. that changed some thing. In halshow its shows:
Gmoccapy. feed-override.direct-value
Both responding to the potentiometer. But not the slider in gmoccapy Gui.


You also need to set the enable pin:

linuxcnc.org/docs/html/gui/gmoccapy.html...cities_and_overrides

setp gmoccapy.analog-enable 1
The following user(s) said Thank You: Erikcnc

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

More
06 Apr 2019 18:21 #130408 by Mike_Eitel
All that is easy solvable. Use a potentiometer with pull switch. Potentiometer have the advantage to stay on same position also after sw restart/reset. I use them for spindle speed, fast feed- and normal feedoverwrite. Easy in gmoccappy.
The following user(s) said Thank You: Erikcnc

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

More
07 Apr 2019 11:31 - 07 Apr 2019 11:32 #130435 by Erikcnc
Replied by Erikcnc on topic Physical Feed override knob

Oke, getting there. that changed some thing. In halshow its shows:
Gmoccapy. feed-override.direct-value
Both responding to the potentiometer. But not the slider in gmoccapy Gui.


You also need to set the enable pin:

linuxcnc.org/docs/html/gui/gmoccapy.html...cities_and_overrides

setp gmoccapy.analog-enable 1



works!

i got now in my postgui_call_list

setp gmoccapy.analog-enable 1
net feed-override-direct gmoccapy.feed-override.direct-value <= hm2_7i76e.0.7i76.0.0.analogin0

its super sensitive now. from 0 untill 1.42v is 200% override. the 4k7 potentiometer goes untill 24v.

now i have to find out how to scale it.
Last edit: 07 Apr 2019 11:32 by Erikcnc.

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

More
07 Apr 2019 12:55 - 07 Apr 2019 12:56 #130437 by OT-CNC
Replied by OT-CNC on topic Physical Feed override knob
Just to clarify this, a pot will not match the setting on the screen once you move the slider in the gui. Pots work fine in a controller that don't have mouse or touch screen control over those settings.
Last edit: 07 Apr 2019 12:56 by OT-CNC.

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

More
07 Apr 2019 13:45 #130439 by andypugh

now i have to find out how to scale it.


The override wants a float value between 0 and 1.0 so you will need to process the value in HAL.
Use the "scale" component if you want a linear response or possibly "lincurve" if you want to get fancy
#If you already have any scale components loaded elsewhere in HAL then you need to increase the
#count there, skip this next line, and use the relevant scale.N index number
loadrt scale count=1 
addf scale.0    servo-thread
# 1.0 / 24V = 0.0147
setp scale.0.gain 0.0147
net feed-override-raw  hm2_7i76e.0.7i76.0.0.analogin0 => scale.0.in
net feed-override-scaled scale.0.out => gmoccapy.feed-override.direct-value
setp gmoccapy.analog-enable 1

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

More
07 Apr 2019 15:42 - 07 Apr 2019 15:59 #130445 by PCW
Replied by PCW on topic Physical Feed override knob
If you dont need an offset, you should be able to scale the output by setting
hm2_7i76e.0.7i76.0.0.analogin0-scalemax to say 2x36.3/24 =~3

This will end up being 200% (2.0) =feed override max
Last edit: 07 Apr 2019 15:59 by PCW.

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

More
07 Apr 2019 18:30 #130449 by Mike_Eitel
Hi OT-CNC
I can see in gmoccapy all trhre values I set via pots in realtime.
Mike

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

More
08 Apr 2019 10:58 #130494 by Erikcnc
Replied by Erikcnc on topic Physical Feed override knob
It works flawless!

So this is my full code i got.
loadrt scale count=1 
addf scale.0    servo-thread
setp scale.0.gain 0.0417
net feed-override-raw  hm2_7i76e.0.7i76.0.0.analogin0 => scale.0.in
net feed-override-scaled scale.0.out => gmoccapy.feed-override.direct-value
setp gmoccapy.analog-enable 1

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

More
08 Apr 2019 11:42 #130496 by andypugh
Glad it is working, though PCW's way is probably easier and neater.

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

Time to create page: 0.466 seconds
Powered by Kunena Forum