[SOLVED] Command to Move in Joint mode

More
6 years 8 months ago #158382 by Aciera
dgarrett: thanks for all your work!

I have two questions:
1. Switching kinematics works for me as MDI Commands. However using them in gcode trips a message "M429: identity kins M429: Wrong motion.switchkins-type or missing hal net to analog-out-0x STOP"
My ini file contains the line "HALCMD = :kinstype-select <=motion.analog-out-03 => motion.switchkins-type" What am I missing here?
2. Would it be possible to expand this approach to three kinematics, say for a tool coordinate mode?

Please Log in to join the conversation.

More
6 years 8 months ago #158397 by dgarrett

However using them in gcode trips a message

thanks for report,
fixed at today's commit 2216a4ba8 (force-pushed)

Would it be possible to expand this approach to three
kinematics, say for a tool coordinate mode?

in the dgarr/s_kins branch, switchable kinematics modules
must provide two functions:
Code:
kinematicsSwitchable(); //indicates kins can be switched kinematicsSwitch(int switchkins_type); //accepts integer for kins type

A switchable kinematics module must handle this integer type
in both its kinematicsForward() and kinematicsInverse()
routines.

genser-switchkins.c supports 2 types (0 and 1),excerpt:
Code:
int kinematicsSwitch(int new_kins_type) { switchkins_type = new_kins_type; switch (switchkins_type) { case 0: rtapi_print_msg(RTAPI_MSG_INFO, "kinematicsSwitch:genserkins\n"); *switchdata->kinstype_is_0 = 1; *switchdata->kinstype_is_1 = 0; break; case 1: rtapi_print_msg(RTAPI_MSG_INFO, "kinematicsSwitch:Trivkins\n"); *switchdata->kinstype_is_0 = 0; *switchdata->kinstype_is_1 = 1; break; ... int kinematicsForward(const double *joints, ... switch (switchkins_type) { case 0: return genserKinematicsForward(joints, pos, fflags, iflags);break; default: return trivKinematicsForward(joints, pos, fflags, iflags); ... int kinematicsInverse(const EmcPose * pos, ... switch (switchkins_type) { case 0: return genserKinematicsInverse(pos, joints, iflags, fflags);break; default: return trivKinematicsInverse(pos, joints, iflags, fflags);

(the *switchdata->kinstype_is_* vars are used as convenience hal pins to
alter a (pyvcp) display)

Refs:
github.com/LinuxCNC/linuxcnc/blob/dgarr/...ser-switchkins.c#L74
github.com/LinuxCNC/linuxcnc/blob/dgarr/...er-switchkins.c#L119
github.com/LinuxCNC/linuxcnc/blob/dgarr/...er-switchkins.c#L150

I have no ideas about tool coordinates but if the required
information can be made available on hal pins, it can
be read by your custom kinematics module.

Please Log in to join the conversation.

More
6 years 8 months ago #158440 by Aciera
Thank you for the prompt reply!
[strike]
I built the new version but I'm still unable to run the gcode.[/strike]

Disregard! I'm a noob and have copied the old remap.ngc files back to the new build.

Thanks

Please Log in to join the conversation.

More
6 years 7 months ago #160760 by bkt
Replied by bkt on topic Command to Move in Joint mode
Vary thanks for these option dgarret

Thanks

Please Log in to join the conversation.

Time to create page: 0.044 seconds
Powered by Kunena Forum