Jogging from Mesa input (Axis version 2.9.2)

More
13 Aug 2024 17:54 - 13 Aug 2024 17:58 #307645 by slowpoke
I spent a fair bit of time getting a simple push-button to Mesa input to cause a jog x increment to occur. Google searches led to numerous threads with others struggling to get this seemingly simple thing to work. According to some of those posts, previous versions of LinuxCNC had a bug related to this and the method to cause a jog appears to have changed as well. So now that I have it working I decided to post what works for me and some of my incorrect assumptions along the way, with the goal of helping others not make the same mistakes I made.. I'm a bit of a newbie to all of this so if anything below appears incorrect please advise and I will correct.

Important things I learned:
1) There are a LOT of pins some with similar names, it helps to get a complete list for perusal:    PCW post=307558 userid=481

2) I assumed that the HAL jog related commands that I was adding to my postgui.hal file would effectively trigger the jog related GUI buttons in axis. My understanding now is that the halui pins are a completely different set of pins/parameters with no connection to the axis GUI buttons. So for example while testing, selecting an increment of say 0.01 in the Axis GUI does not set halui.axis.x.increment to 0.01. If you want an increment of 0.01 you need to explicitly add a line in your hal file to make that happen, for example setp halui.axis.x.increment 0.01.

3) The axisui pins don't exist until after the axis-gui has been loaded so all your hal code that requires pins from GUIs, like axisui pins, need to be in a postgui.hal file.  

4) Before homing the motors are jogged as joints, after homing the motors are moved as axes.

5) Before using the halui jog pins ALL of the axis's need to be homed, not just the axis your trying to jog!

6) halui.axis.x.plus jogs continuously while activated, and halui.axis.x.increment-plus jogs by the previously specified increment (once per)

I have attached the relevant portion of my postgui.hal file as an example that works for me using Mesa input 3 as the trigger for a jog x + 0.1 increment.

 

File Attachment:

File Name: postguiMes...tial.hal
File Size:1 KB


 
Attachments:
Last edit: 13 Aug 2024 17:58 by slowpoke.

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

More
13 Aug 2024 20:57 #307661 by rodw
no increment minus?

I agree this is complicated. Recently I got this hardwired pendant going.

The MPG, axis select and scale selectors are well described in the docs (requires small mods for a mesa MPG) linuxcnc.org/docs/stable/html/examples/mpg.html
Getting high and low speed button jogging working (selected by holding the ~  button down) proved so complicated, I resorted to writing a custom component
 
Attachments:

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

More
13 Aug 2024 22:50 #307675 by slowpoke
Replied by slowpoke on topic Jogging from Mesa input (Axis version 2.9.2)
In this case this was just a proof of concept test. Now that I understand how it works, I will expand. I'm probably not going to use the actual Mesa inputs, I have a SAMD21 on my custom control board that if all goes to plan will emulate the ArduinoConnector project sending button presses to halui and also receive data back from halui. I have this working now for a few points on a little nano board. Next step is to port that nano code to the SAMD21 and then expand for all required points.

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

Time to create page: 0.070 seconds
Powered by Kunena Forum