Physical Feed override knob

More
7 years 6 months ago #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...

Please Log in to join the conversation.

More
7 years 6 months ago #130404 by andypugh

Erikcnc wrote: 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

Code:
setp gmoccapy.analog-enable 1

Please Log in to join the conversation.

More
7 years 6 months ago #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.

Please Log in to join the conversation.

More
7 years 6 months ago #130435 by Erikcnc
Replied by Erikcnc on topic Physical Feed override knob

andypugh wrote:

Erikcnc wrote: 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

Code:
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.

Please Log in to join the conversation.

More
7 years 6 months ago #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.

Please Log in to join the conversation.

More
7 years 6 months ago #130439 by andypugh

Erikcnc wrote: 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
Code:
#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 to join the conversation.

More
7 years 6 months ago #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

Please Log in to join the conversation.

More
7 years 6 months ago #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 to join the conversation.

More
7 years 6 months ago #130494 by Erikcnc
Replied by Erikcnc on topic Physical Feed override knob
It works flawless!

So this is my full code i got.
Code:
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 to join the conversation.

More
7 years 6 months ago #130496 by andypugh
Glad it is working, though PCW's way is probably easier and neater.

Please Log in to join the conversation.

Time to create page: 0.275 seconds
Powered by Kunena Forum