Halui Component
- stegrg
- Offline
- Senior Member
Less
More
- Posts: 59
- Thank you received: 3
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?
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.
- Grotius
- Offline
- Platinum Member
Less
More
- Posts: 2257
- Thank you received: 2002
02 Jul 2019 21:32 #138441
by Grotius
Replied by Grotius on topic Halui Component
Hi,
It was Python code :
You would see this new pin by the name : step-activated
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.
- phillc54
- Offline
- Platinum Member
Less
More
- Posts: 5714
- Thank you received: 2090
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.
- stegrg
- Offline
- Senior Member
Less
More
- Posts: 59
- Thank you received: 3
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?
After running Hal Configuration in LinuxCNC, I can't see the step-activated pin in Axisui. Am I missing a step?
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4864
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.
- stegrg
- Offline
- Senior Member
Less
More
- Posts: 59
- Thank you received: 3
03 Jul 2019 17:00 #138548
by stegrg
Replied by stegrg on topic Halui Component
Attachments:
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4864
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)
(Just to be sure that it is actually running)
Please Log in or Create an account to join the conversation.
- phillc54
- Offline
- Platinum Member
Less
More
- Posts: 5714
- Thank you received: 2090
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: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...
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()
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.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19529
- Thank you received: 6554
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.
- stegrg
- Offline
- Senior Member
Less
More
- Posts: 59
- Thank you received: 3
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.
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: 0.120 seconds