(Solved?) Feed override encoder reset

More
5 years 1 month ago #220723 by russell
Replied by russell on topic Feed override encoder reset
Yes, I had the same thought this morning t and I've just added the following reset pins
halui.feed-override.reset
halui.rapid-overide.reset
haui.spindle.n.override.reset

Initial testing seems ok, but I'll wait until I've tested it properly at the weekend before raising a pull request

One thing I did notice some strange behaviour but it's the same with the GUI slider - its hard to get the value to go past 112% - I suspect its an artefact of the conversion from int to float.

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

More
5 years 1 month ago #220848 by cmorley
Replied by cmorley on topic Feed override encoder reset
i look forward to the pull request.

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

More
5 years 3 weeks ago #222707 by spumco
I got this working after a bit of fiddling.  I suspect it won't work for other GUI's but it works on Probe Basic.

I don't know how to submit a pull request (assuming that's a request for adding functions/bug-fixes to LCNC?), but one should probably still be submitted so this function is available for all GUI's.  Having a physical override reset button is super-handy.

QtPyVCP creates pin qtpyvcp.feed-override.reset which is visible in halshow.  Triggering that pin will set halui.feed-override.value to 1.  We can test  this in halshow by setting the pin TRUE after twiddling the slider a bit.  Slider will reset to 100% and pin value will change to 1.  Yay!

The trick is that the qtpyvcp pin isn't created until after Probe Basic loads, so we need to connect to the pin in the postgui hal file.

Step 1 - add encoder to main HAL file.  Some of this may have been done in pncconf already.
#---Set override initial state
setp halui.feed-override.direct-value false
setp halui.feed-override.scale .01 (edit for encoder sensitivity, 0.01 = 1% per encoder click)
setp halui.feed-override.count-enable true

#---Connect pins to signals
net fo-count   <= [HMOT](CARD0).7i73.0.1.enc0.count
net fo-count   => halui.feed-override.counts

#--Add encoder pushbutton switch
net fo-reset   <= [HMOT](CARD0).7i73.0.1.input-14

Step 2 - connect reset function to Probe Basic screen action pin in custom_postgui.hal file
net fo-reset   => qtpyvcp.feed-override.reset

Step 3 - ensure INI file calls up the post GUI file
[HAL]
HALUI = halui
HALFILE = yourmachinehere.hal
POSTGUI_HALFILE = custom_postgui.hal
...

NOTE 1 - works for feed, spindle, rapid, and max velocity overrides.
NOTE 2 - Maybe not obvious to beginners, but you'll have to change the input pins above to match your particular setup

Hope this helps.  Feel free to edit the thread title if it fails or is inappropriate.

-Ralph
The following user(s) said Thank You: Unlogic

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

More
5 years 3 weeks ago #222709 by cmorley
I'm glad you got something to work for you - there are many ways to skin a cat!

There really is no reason for a pull request in the way you did this.
Qtpyvcp is not part of linuxcnc so you would need to request them for the change in their GUI.
I assume you use qtpyvcp to set the override directly in code?
If that's true you might as well just do all the override work in qtpyvcp and forget about halui (IMHO)

I had envisioned a pin added to HALUI for resetting the overrides

Chris

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

More
5 years 3 weeks ago #222710 by spumco
I didn't do anything directly in code - although I'm not sure exactly what "directly in code" means.  I wasn't using QT Designer, if that's what you're referring to.

Sounds like I didn't make my point clearly.  My particular method of skinning this cat was only possible because of the qtpyvcp post-gui pins.

In my situation this works fine, and should also work for the OP or anyone else using PB.  But not, as you pointed out, anyone not using PB.

I was, perhaps clumsily, echoing your suggestion that an override reset pin would be a nice addition to 'standard' LCNC functions and not limited to the rather specific PB circumstances.
 

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

More
5 years 3 weeks ago #222711 by Joco
The override reset pins were added to the framework to solve the "problem" encountered here.  While a UI could expose such HAL pins through utilising the qtpyvcp's framework API it is much cleaner to have it as a plug-in that can be enabled by a UI or a user as needed.

If this functionality was added to HALUI in the future then these pins would become redundant.

Equalliy, this plugin does provide a home for any hal pin capabilities that people feel should be exposed at the framework level for anyone to use.

Cheers - James.
 

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

Time to create page: 0.134 seconds
Powered by Kunena Forum