- Configuring LinuxCNC
- Advanced Configuration
- Cannot Addf a custom component. (fails with function not found)
Cannot Addf a custom component. (fails with function not found)
- rodw
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 11145
- Thank you received: 3705
10 Jul 2024 21:16 - 10 Jul 2024 21:17 #304846
by rodw
Cannot Addf a custom component. (fails with function not found) was created by rodw
I don't understand this error.
I wrote the attached custom component to decode a MPG I use.
It compiles fine, loadrt works perfectly and the components pins can be seen in halshow at this point
but when I use addf, it raises an error
It does not matter if I use names= or count= when using loadrt
Any ideas would be really appreciated. I tried decoding this in hal but gave up as its very messy.
I wrote the attached custom component to decode a MPG I use.
It compiles fine, loadrt works perfectly and the components pins can be seen in halshow at this point
but when I use addf, it raises an error
HAL: ERROR: function 'mypendant' not found
twopass: Error in file ./pendant.hal:
addf failed
Shutting down and cleaning up LinuxCNC...
Running HAL shutdown script
It does not matter if I use names= or count= when using loadrt
Any ideas would be really appreciated. I tried decoding this in hal but gave up as its very messy.
Last edit: 10 Jul 2024 21:17 by rodw.
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23225
- Thank you received: 4897
10 Jul 2024 22:29 #304851
by andypugh
Replied by andypugh on topic Cannot Addf a custom component. (fails with function not found)
at the command line
halrun
loadrt pendantjog names=mypendant
show funct
will probably answer the question
halrun
loadrt pendantjog names=mypendant
show funct
will probably answer the question
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
- rodw
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 11145
- Thank you received: 3705
11 Jul 2024 12:56 #304905
by rodw
Replied by rodw on topic Cannot Addf a custom component. (fails with function not found)
Thanks Andy but I am still none the wiser
halcmd: loadrt pendantjog names=mypendant
Note: Using POSIX realtime
halcmd:
halcmd: show funct
Exported Functions:
Owner CodeAddr Arg FP Users Name
Please Log in or Create an account to join the conversation.
- Cant do this anymore bye all
-
- Offline
- Platinum Member
-
Less
More
- Posts: 1200
- Thank you received: 421
11 Jul 2024 12:59 #304906
by Cant do this anymore bye all
Replied by Cant do this anymore bye all on topic Cannot Addf a custom component. (fails with function not found)
I did that a few years ago, based on the work here github.com/KurtJacobson/RF45-CNC/tree/ma...HAL%20Components/MPG does make the whole mpg setup easier.
Please Log in or Create an account to join the conversation.
- rodw
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 11145
- Thank you received: 3705
11 Jul 2024 13:01 #304907
by rodw
Replied by rodw on topic Cannot Addf a custom component. (fails with function not found)
But if I do the same thing with say o2, I get an address. What causes i tto be missing?
debian@debian:~/linuxcnc/configs/my_plasma/components$ halrun
halcmd: loadrt or2
Note: Using POSIX realtime
halcmd: show funct
Exported Functions:
Owner CodeAddr Arg FP Users Name
00004 7fd5e7818189 7fd5e69e0120 NO 0 or2.0
halcmd:
Please Log in or Create an account to join the conversation.
- rodw
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 11145
- Thank you received: 3705
11 Jul 2024 13:08 #304910
by rodw
github.com/KurtJacobson/RF45-CNC/blob/ma...nts/MPG/mpg.comp#L14
Fixed now thanks!
Replied by rodw on topic Cannot Addf a custom component. (fails with function not found)
Well that was interesting. cornholio, your link showed me I was missing this lineI did that a few years ago, based on the work here github.com/KurtJacobson/RF45-CNC/tree/ma...HAL%20Components/MPG does make the whole mpg setup easier.
github.com/KurtJacobson/RF45-CNC/blob/ma...nts/MPG/mpg.comp#L14
Fixed now thanks!
Please Log in or Create an account to join the conversation.
- Cant do this anymore bye all
-
- Offline
- Platinum Member
-
Less
More
- Posts: 1200
- Thank you received: 421
11 Jul 2024 13:12 #304911
by Cant do this anymore bye all
Replied by Cant do this anymore bye all on topic Cannot Addf a custom component. (fails with function not found)
I just compiled an dloaded your comp and was just going to compare kurt's to yours. You beat me to it.
All the best, makes hal alot more manageable.
All the best, makes hal alot more manageable.
Please Log in or Create an account to join the conversation.
- rodw
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 11145
- Thank you received: 3705
11 Jul 2024 13:19 #304912
by rodw
The MPG is fine as I did it in Hal 7-8 years ago for this same device but I wanted to enable the Plus and Minus jog buttons that also have a third button to select between low speed and high speed jogging. That was very difficult to do in hal.
Replied by rodw on topic Cannot Addf a custom component. (fails with function not found)
Yeh, dunno how I missed that,I just compiled an dloaded your comp and was just going to compare kurt's to yours. You beat me to it.
All the best, makes hal alot more manageable.
The MPG is fine as I did it in Hal 7-8 years ago for this same device but I wanted to enable the Plus and Minus jog buttons that also have a third button to select between low speed and high speed jogging. That was very difficult to do in hal.
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Advanced Configuration
- Cannot Addf a custom component. (fails with function not found)
Time to create page: 0.142 seconds