Beginner HallUI question

More
20 Oct 2021 21:56 #223711 by mBender
Hi all,

a bit background: I did set up 2 machines with LinuxCNC both are running great. Awesome software. Now I want to get a bit deeper into LinuxCNC and try to set up an Axis User Interface. Following this example linuxcnc.org/docs/2.4/html/hal_pyvcp_examples.html#r1_3_1

When I used Stepconf, I didn´t know what HalUI was and didn´t check the checkbox. I added it manuall and tried to add it in the INI as well as the hal file as described here linuxcnc.org/docs/2.6/html/gui/halui.html

I am using Axis as my gui.

Now my problem is: I see in the halconfig that halui was loaded, but non of the pins is connected to any of the pins in axis. In fact the pins from the first example halui.jog.0.minus is not existing at all. I used hallui.joint.0.minus but it is not working. If I watch the hallui pins, non of those pins has any reaction if I click on any Axis button.

What am I doing wrong?

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

More
24 Oct 2021 22:38 #224134 by andypugh
Replied by andypugh on topic Beginner HallUI question
halui and axis both allow jogging, but they do not interact with each other.

halui allows you to jig using external hardware buttons. Axis only supports keyboard / mouse jogging.

You can use both at the same time, and many users do, but they do act independently, and don't interact with each other.

So, basically, you wouldn't necessarily expect axis pins to be linked to halui pins. The exception to this would be id you wanted to use the Axis axis-select buttons to control which axis a halui button was jogging.

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

More
25 Oct 2021 00:54 #224160 by mBender
Replied by mBender on topic Beginner HallUI question
Thanks for helping me with this!

Ok, so I am having really trouble understanding that. I thought any GUI which runs ontop of linucCNC is sending it's commands to the HAL. From there the HAL takes over and sends it to the hardware.

For example, if I use Axis as the GUI and look at the Z Jog button. I should be able to find this button somewhere in the HAL Configuration.
If I look in the HAL Configuration I see that there is a section axis and axisui. If I follow those trees to the Z axis and watch all signals I don't see the jog button. So how is LinuxCNC moving the axis if I click on the Z Jog button? I see that the axis is moving, because the machine is moving, but I don't see the signal flow on the computer.

Then I tried to add a Jog button using a custom pycvp and connected this button to the halui. I see that the connection works, but the axis is not moving.

This is my postgui.hal file.

# connect the Z pyVCP buttons
net my-jogzminus halui.axis.z.minus <= pyvcp.z-minus
net my-jogzplus halui.axis.z.plus <= pyvcp.z-plus

What I don't understand: If I click the jog button on my panel, the signal gets in the halui.axis.z.* I see that this works when I watch the signals on the hal configuration. But how does LinuxCNC know that halui.axis.z.minus means that the z axis should move down. Do I need to configurate that??

Also the halui.jog.* section is missing completly.

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

More
25 Oct 2021 03:15 #224171 by cmorley
Replied by cmorley on topic Beginner HallUI question
Both HALUI and AXIS (and anything else) actual tells linuxcnc's motion component to jog by using special messages, unrelated to HAL.

All screens have their own idea of jogging - linuxcnc has no internal record of jogging rate.

My guess is you have not set the jograte pins in HALUI.

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

More
25 Oct 2021 08:38 #224237 by mBender
Replied by mBender on topic Beginner HallUI question
Ok, since I haven't checked the check box of halui when I used the stepconf and added halui manually to my machine, you might be right. I might not have set the jograte pins.

I tried to Google how to do that, but couldn't find anything. So my questions are
1. How to set the jograte pins?
2. Anything else to do to set up halui after I used the stepconf wizard?

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

More
25 Oct 2021 12:18 #224251 by andypugh
Replied by andypugh on topic Beginner HallUI question
For halui jogging of an axis to work you need to set:

( linuxcnc.org/docs/2.8/html/man/man1/halui.1.html )

halui.axis.jog-speed to a suitable speed. A very simple example
setp halui.axis.jog-speed 1
In a common application you would jog with a game controller, with different combinations of back-buttons giving different jog speeds. See a more extensive example here: wiki.linuxcnc.org/cgi-bin/wiki.pl?Simple_Remote_Pendant

(FWIW when I used a joypad I didn't use the OR2 blocks shown there, I had left=slow, right=medium, both=fast by wiring to the sel bits directly.)

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

More
25 Oct 2021 13:28 #224262 by mBender
Replied by mBender on topic Beginner HallUI question
I am sorry, I still can´t get it to work. I have a float from my custom panel connected to halui.axis.jog-speed. Furthermore I set halui.axis.z.select 1 and connected the two buttons to halui.axis.z.plus and minus. I see in the Hal Configuration that all signals are working, but the machine is still not moving. It works fine when I use the jog buttons on the Axis GUI.

Here is the configuration in the postgui.hal

# connect the Z pyVCP buttons
net my-jogzminus halui.axis.z.minus <= pyvcp.z-minus
setp halui.axis.z.select 1
net my-jogzplus halui.axis.z.plus <= pyvcp.z-plus

# connect the pyVCP jog speed slider
net my-jogspeed halui.axis.jog-speed <= pyvcp.jog-speed-f
Attachments:

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

More
25 Oct 2021 14:19 - 25 Oct 2021 14:19 #224268 by andypugh
Replied by andypugh on topic Beginner HallUI question
Is the machine homed?
Before homing you can only jog in joint mode (ie, using the halui.joint.jog... pins)
If Axis is showing joint numbers rather than axis letters during your test then that will be the issue.
(If you want to jog in both modes, then
net my-jogzplus halui.axis.z.plus halui.joint.2.plus <= pyvcp.z-plus
is valid syntax to drive both pins.
Last edit: 25 Oct 2021 14:19 by andypugh.

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

More
25 Oct 2021 16:42 #224281 by mBender
Replied by mBender on topic Beginner HallUI question
My machine is not homed. But it shouldn't be necessary to home the machine, since I can use the axis button to drive the machine Z axis. (I only test the Z axis at the moment )

I tried already what you said with connecting halui.joint.2.plus <= pyvcp.z-plus without the addition of halui.axis.z.plus. It didn't work.

Now, I just tried exactly your suggestion net my-jogzplus halui.axis.z.plus halui.joint.2.plus <= pyvcp.z-plus and I see the pins in Hal Configuration act as they are supposed to be, but the machine does not move.

In the documentation it says halui need to find the nml find specified in the INI. Neither in the INI nor in the config folder I see anything like an NML file. Could that be the issue?

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

More
25 Oct 2021 17:04 #224286 by andypugh
Replied by andypugh on topic Beginner HallUI question

My machine is not homed. But it shouldn't be necessary to home the machine, since I can use the axis button to drive the machine Z axis. (I only test the Z axis at the moment )
 

The Axis GUI swaps from joint to axis automatically. That might be the difference. 

As well as operating the joint / axis jog+ you might also need to set the halui.joint.jog-speed pin too.

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

Time to create page: 0.142 seconds
Powered by Kunena Forum