- Posts: 12160
- Thank you received: 0
Cannot Addf a custom component. (fails with function not found)
2 years 3 months ago #304846
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
Code:
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.
Please Log in to join the conversation.
2 years 3 months ago #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
Please Log in to join the conversation.
2 years 3 months ago #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
Code:
halcmd: loadrt pendantjog names=mypendant
Note: Using POSIX realtime
halcmd:
halcmd: show funct
Exported Functions:
Owner CodeAddr Arg FP Users Name
Please Log in to join the conversation.
- Cant do this anymore bye all
- Offline
- Platinum Member
-
Less
More
- Posts: 1199
- Thank you received: 0
2 years 3 months ago #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 to join the conversation.
2 years 3 months ago #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?
Code:
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 to join the conversation.
2 years 3 months ago #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 to join the conversation.
- Cant do this anymore bye all
- Offline
- Platinum Member
-
Less
More
- Posts: 1199
- Thank you received: 0
2 years 3 months ago #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 to join the conversation.
2 years 3 months ago #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 to join the conversation.
Time to create page: 0.206 seconds
