SYNOPSIS
loadrt userkins [count=N|names=name1[,name2…]]
DESCRIPTION
The userkins.comp file is a template for creating kinematics that can be user-built using halcompile.
The unmodified userkins component can be used as a kinematics file for a machine with identity kinematics for an xyz machine employing 3 joints (motors).
USAGE
Copy the userkins.comp file to a user-owned directory (mydir).
Note: The userkins.comp file can be downloaded from:
github.com/LinuxCNC/linuxcnc/raw/2.8/src/hal/components/userkins.comp
where 2.8 is the branch name (use master for the master branch).
For a RIP (run-in-place) build, the file is located in the git tree as:
src/hal/components/userkins.comp.
Edit the functions userkins_forward() and userkins_inverse() as required, and list the geometry the maths needs in the userkins_params table.
Build and install the component using halcompile:
$ cd mydir
$ [sudo] halcompile --install userkins.comp
# Note:
# sudo is required when using a deb install
# sudo is *not* required for run-in-place builds
# $ man halcompile for more info
Specify userkins in an ini file as:
[KINS]
KINEMATICS=userkins
JOINTS=3
# the number of JOINTS must agree with the
# number of joints used in your modified userkins.comp
A module built with halcompile takes the shared code from the kins_single_core module, which the HAL file loads ahead of it:
loadrt kins_single_core loadrt [KINS]KINEMATICS
The userkins built in tree has that code linked in and needs no kins_single_core.
Note: the manpage for userkins is not updated by halcompile --install
To use a different component name, rename the file (example mykins.comp) and
change all instances of userkins to mykins.
NOTES
-
The kinematics are written as functions of a parameter block, see kins_module.h: the geometry is declared once in the userkins_params table, one HAL pin is made per entry, and the maths reads p→geometry[] where it would have read a pin. The classic entry points (kinematicsForward() and the rest) are supplied by kins_single.c, in kins_single_core, so nothing here touches HAL and the same maths can be evaluated outside realtime.
-
The fpin pin is included to satisfy the requirements of the halcompile utility but it is not accessible to kinematics functions.
FUNCTIONS
- userkins.N.fdemo
PINS
- userkins.N.fpin sint out (default: 0)
-
pin to demonstrate use of a conventional (non-kinematics) function fdemo
AUTHOR
Dewey Garrett
LICENSE
GPL