- Configuring LinuxCNC
- Basic Configuration
- Actual position and Commanded position differ, using cia402
Actual position and Commanded position differ, using cia402
- low-blip
- Away
- New Member
-
- Posts: 9
- Thank you received: 1
while in userkins.comp or either of the kinematicsInverse functions, the /80 was not there. I tried compiling again, nothing changed. I tried deleting the /80 from userkins.c, everything is now working. I just have no idea why..int kinematicsForward ...
...
pos->tran.x = j[0]/80; // X coordinate
pos->tran.y = j[1]/80; // Y coordinate
pos->tran.z = j[2]/80; // Z coordinate
Please Log in or Create an account to join the conversation.
- langdons
- Away
- Platinum Member
-
- Posts: 379
- Thank you received: 36
Often with programming, huge problems are caused by like 3 wrong characters.
Perhaps it was some temporary fix that was not removed as it should have been?
C is a good language, better than Python IMO.
(Python always complains about not converting tabs to spaces, which I despise)
Please Log in or Create an account to join the conversation.
- low-blip
- Away
- New Member
-
- Posts: 9
- Thank you received: 1
I remember Python giving me so much grief over the tabs and spaces in my first year of learning to program! At least these days IDEs take care of that problem.
C just went completely over my head when I tried to learn it. I can mostly read it but I cannot write anything in C, it's pretty frustrating
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
- Posts: 4362
- Thank you received: 1943
Impossible to say without actually seeing your userkins.comp file.
Please Log in or Create an account to join the conversation.
- low-blip
- Away
- New Member
-
- Posts: 9
- Thank you received: 1
sudo halcompile --install userkins.comp
Compiling realtime userkins.c
Linking userkins.so
cp userkins.so /usr/lib/linuxcnc/modules/
I've attached the userkins.comp file here
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
- Posts: 4362
- Thank you received: 1943
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.
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
- Posts: 23328
- Thank you received: 4950
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...)
Please Log in or Create an account to join the conversation.
- langdons
- Away
- Platinum Member
-
- Posts: 379
- Thank you received: 36
It's a nice, simple language.
Try out Arduino, it'll teach you to be a C master.
You'll start to end sentences with a ";" after while!
Please Log in or Create an account to join the conversation.
- low-blip
- Away
- New Member
-
- Posts: 9
- Thank you received: 1
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.
- low-blip
- Away
- New Member
-
- Posts: 9
- Thank you received: 1
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.
- Configuring LinuxCNC
- Basic Configuration
- Actual position and Commanded position differ, using cia402