Halui Component

More
09 Jun 2019 18:36 #136393 by stegrg
Halui Component was created by stegrg
Hello,

I'm wiring my own Halui Component and need some information from Axis. Is there any way to obtain a Halui signal that toggles true when somebody pushes the "Step" button in axis? I'm referring to something similar to "halui.program.is-running" or "halui.program.is-paused" for those types of functions?

Regards,

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

More
09 Jun 2019 21:39 - 09 Jun 2019 21:49 #136405 by Grotius
Replied by Grotius on topic Halui Component
@Steven,

Good question.

The halui pins : linuxcnc.org/docs/html/man/man1/halui.1.html

Look for the line : halui.program.step bit in
(pin to step the program gcode line by gcode line forward) (backward stepping is provided in reverse run).

so in your hal it could be connected something like this, this is a pure example, not realistic :
net yourstep => halui.program.step => hmi595.inputbutton
Last edit: 09 Jun 2019 21:49 by Grotius.

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

More
09 Jun 2019 22:43 #136414 by BigJohnT
Replied by BigJohnT on topic Halui Component
I'm sure that halui is not in the loop with Axis so it will not know that the Axis step button has been pressed. You would have to hack Axis and bring out a pin for that. There are some axisui pins so it might not be hard to copy one of those.

JT

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

More
09 Jun 2019 23:30 #136422 by Grotius
Replied by Grotius on topic Halui Component
In axis we have : ("T", _("Step program")),
The keyboard button T for step function.

Maybe connect this python script to your hal :

Activate_step_program.py :
from pynput.keyboard import Key, Controller
import time

time.sleep(200)
keyboard = Controller()
keyboard.press('t')
keyboard.release('t')

source : nitratine.net/blog/post/simulate-keypresses-in-python/
The following user(s) said Thank You: nkp

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

More
10 Jun 2019 07:25 #136443 by pl7i92
Replied by pl7i92 on topic Halui Component
acording to the doc
linuxcnc.org/docs/html/man/man1/halui.1.html
you can have
halui.program.step
connected
and with a modchange it might work to get step on t

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

More
11 Jun 2019 09:37 #136576 by stegrg
Replied by stegrg on topic Halui Component
Is it possible to determine if Axis has commanded a step function by pressing the step icon as well as pressing "T" on the keyboard in halui?

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

More
11 Jun 2019 12:57 #136596 by stegrg
Replied by stegrg on topic Halui Component
Is there any way to read an Axis G-code line in halui?

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

More
11 Jun 2019 13:40 - 11 Jun 2019 13:43 #136605 by Grotius
Replied by Grotius on topic Halui Component
The keyboard T button is outside of any halui connection.

I have made a little axis.py source code modification to make a program-step connection to any hal signal.
axis.py is located in c: usr/bin/axis

line 80 axis.py and add after this line :
h = hal.component("axis")
h.newpin("step",hal.HAL_BIT,hal.HAL_IN)

add after line 877 of axis.py add :
if h == 1:
ensure_mode(linuxcnc.MODE_AUTO)
c.auto(linuxcnc.AUTO_STEP)

Output is a hal step connection named : axis.step (you can see this in the section : pins => axis => step.
To set the step parameter true, type in hal : setp axis.step True
To set the step parameter false, ype in hal : setp axis.step False

When i test the step button T, i mention the machine has to be in pause.
So almost the same can can be used to set the machine in pause first. This can automate the process trough hal.

Attachments:
Last edit: 11 Jun 2019 13:43 by Grotius.

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

More
11 Jun 2019 16:38 #136623 by stegrg
Replied by stegrg on topic Halui Component
Grotius,

I appreciate the support. I think I'm looking for the opposite of what you described above. When I step through the g-code in axis, (either using the step icon, or typing "t") I'd like to be able to use that step signal in halui for developing a custom halui component.

Regards,

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

More
12 Jun 2019 15:18 #136745 by andypugh
Replied by andypugh on topic Halui Component
What do you mean by "halui component" ?

halui is one of the user interfaces for LinuxCNC, but one that interacts via HAL pins rather than a GUI.

Are you trying to create an alternative to halui, or are you just writing a HAL component.

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

Time to create page: 0.148 seconds
Powered by Kunena Forum