Halui Component

More
02 Jul 2019 19:02 #138426 by stegrg
Replied by stegrg on topic Halui Component
phillc54,

I finally got around to trying your code by pasting it into a .axisrc file. When I run Hal Configuration within LinuxCNC, I don't see the step-activated pin anywhere in the tree. Should I be able to see it somewhere?

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

More
02 Jul 2019 21:32 #138441 by Grotius
Replied by Grotius on topic Halui Component
Hi,

It was Python code :
comp.newpin('step-activated', hal.HAL_BIT, hal.HAL_IO)
    comp.ready()

You would see this new pin by the name : step-activated

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

More
02 Jul 2019 23:04 #138454 by phillc54
Replied by phillc54 on topic Halui Component
Yes, it should appear as axisui.step-activated

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

More
03 Jul 2019 16:32 #138542 by stegrg
Replied by stegrg on topic Halui Component
Sorry to further bother you guys with this but I'm still having issues getting the code to work. I created an .axisrc file with the sample code copied into it. I saved the file in my home/username folder location. Here is a screenshot:


After running Hal Configuration in LinuxCNC, I can't see the step-activated pin in Axisui. Am I missing a step?
Attachments:

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

More
03 Jul 2019 16:40 #138544 by andypugh
Replied by andypugh on topic Halui Component
Do you see any error messages if you start LinuxCNC from the command line (command "linuxcnc" )

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

More
03 Jul 2019 17:00 #138548 by stegrg
Replied by stegrg on topic Halui Component
No, it starts up without any issues.

Attachments:

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

More
03 Jul 2019 17:54 #138552 by andypugh
Replied by andypugh on topic Halui Component
How about if you put a deliberate error in the .axisrc file?
(Just to be sure that it is actually running)

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

More
03 Jul 2019 23:49 - 04 Jul 2019 00:50 #138577 by phillc54
Replied by phillc54 on topic Halui Component
I'm guessing you are using LinuxCNC 2.7, if so then the user_hal_pins() function is not available.
If that is the case then I think you can use the function user_live_update() but will need to create a new component like:
Create a new component with this in .axisrc in lieu of the user_hal_pins() function:
h = hal.component("stepstatus")
h.newpin('step_activated', hal.HAL_BIT, hal.HAL_OUT)
h.ready()
This should give you a pin named stepstatus.step-activated

Edit: Only took two edits to get it right, I don't use 2.7 enough...
Last edit: 04 Jul 2019 00:50 by phillc54.

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

More
04 Jul 2019 00:32 #138579 by tommylight
Replied by tommylight on topic Halui Component
He is using 2.7.14. I do recalled you or someone mentioning that the .axisrc workaround works on 2.8 or 2.9.
The following user(s) said Thank You: phillc54

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

More
04 Jul 2019 13:01 #138622 by stegrg
Replied by stegrg on topic Halui Component
Everybody,

Thank you very much for the assistance! I finally have it working. I had to make some small modifications to the .axisrc file after stitching it together with the latest suggestions. I have attached it below for future reference if any else may run into the same issue.



I'm going to try and hijack the LinuxCNC Run button so that I can use it to reset the step_activated bit once activated.
Attachments:

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

Time to create page: 1.885 seconds
Powered by Kunena Forum