Cannot Addf a custom component. (fails with function not found)

More
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
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.

More
2 years 3 months ago #304851 by andypugh
at the command line

halrun
loadrt pendantjog names=mypendant
show funct

will probably answer the question

Please Log in to join the conversation.

More
2 years 3 months ago #304905 by rodw
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.

More
2 years 3 months ago #304906 by Cant do this anymore bye all
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.

More
2 years 3 months ago #304907 by rodw
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.

More
2 years 3 months ago #304910 by rodw

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.
Well that was interesting. cornholio, your link showed me I was missing this line
github.com/KurtJacobson/RF45-CNC/blob/ma...nts/MPG/mpg.comp#L14
Fixed now thanks!

Please Log in to join the conversation.

More
2 years 3 months ago #304911 by Cant do this anymore bye all
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.

Please Log in to join the conversation.

More
2 years 3 months ago #304912 by rodw

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.
Yeh, dunno how I missed that,
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
Powered by Kunena Forum