Actual position and Commanded position differ, using cia402 [SOLVED]

More
20 May 2025 09:17 #328790 by low-blip
Oh thanks! you're right that halcompile is having some problem, userkins.c is unchanged after I run
sudo halcompile --install userkins.comp
. There's nothing in the terminal that hints at it not working.

Compiling realtime userkins.c
Linking userkins.so
cp userkins.so /usr/lib/linuxcnc/modules/


I've attached the userkins.comp file here
Attachments:

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

More
20 May 2025 11:38 #328799 by Aciera
I think you are being confused by an old version of 'userkins.c'. Note that
sudo halcompile --install userkins.comp

will not create a 'userkins.c' file at all, it will directly create a 'userkins.so' and copy that to the appropriate folder.

linuxcnc.org/docs/html/man/man1/halcompile.1.html

If things are working after
'sudo halcompile --install userkins.comp'
then you can delete the 'userkins.c' file.
The following user(s) said Thank You: low-blip

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

  • andypugh
  • andypugh's Avatar
  • Away
  • Moderator
  • Moderator
More
20 May 2025 11:41 #328800 by andypugh
I don't know why there is a 22.2222 factor on your rotary axes, it feels like that constant factor could be in the INI scaling.

In fact your userkins appears to basically be a trivial kinematics? Why not use trivkins?

Maybe you are running a run-in-place system, so LinuxCNC is running from linuxcnc-dev but halcompile is placing the compiled kins in the root structure?
(But that wouldn't explain why edirting the C and recompiling works...)
The following user(s) said Thank You: low-blip

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

More
20 May 2025 15:51 #328815 by low-blip
I am so confused. the setup does still works after I deleted userkins.c, so the problem must have come from the old userkins.so. According to our git history, userkins.comp never changed, and we did run halcompile when we set up the project, so I don't see why userkins.so changed. Not important, maybe someone accidentally copied an older version from somewhere.

As for the other issues with userkins, I don't know, this is how I received the configuration. I'm slowly trying to figure things out.
 

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

More
20 May 2025 16:00 #328816 by low-blip
I've learned C for a semester in university, didn't get it at all. It was so not nice to me.

I do program Arduinoes these days, because the other colleagues don't want to, but isn't that C++? Any way I hate it too :)

When I need C I use Rust instead, it's a pain too but at least I can usually figure out where I made a mistake. Which is usually forgetting the ';'

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

Time to create page: 0.069 seconds
Powered by Kunena Forum