в исходниках даже комент оставлен:
Код: Выделить всё
/* optional move to tool change position. This
* is a mess because we really want a configurable chain
* of events to happen when a tool change is called for.
* Since they'll probably involve motion, we can't just
* do it in HAL. This is basic support for making one
* move to a particular coordinate before the tool change
* is called. */
========================================
если уж кому то сильно_надо ,то в emccannon.cc можно задать любую цепочку
действий :
Код: Выделить всё
void CHANGE_TOOL(int slot)
{
EMC_TRAJ_LINEAR_MOVE linearMoveMsgX;
EMC_TRAJ_LINEAR_MOVE linearMoveMsgZ;
linearMoveMsgX.feed_mode = canon.feed_mode;
linearMoveMsgZ.feed_mode = canon.feed_mode;
EMC_TOOL_LOAD load_tool_msg;
flush_segments();
/* optional move to tool change position. This
* is a mess because we really want a configurable chain
* of events to happen when a tool change is called for.
* Since they'll probably involve motion, we can't just
* do it in HAL. This is basic support for making one
* move to a particular coordinate before the tool change
* is called. */
if (have_tool_change_position) {
double vel, acc, x, y, z, a, b, c, u, v, w;
x = FROM_EXT_LEN(tool_change_position.tran.x);
y = FROM_EXT_LEN(tool_change_position.tran.y);
z = FROM_EXT_LEN(tool_change_position.tran.z);
a = canon.endPoint.a;
b = canon.endPoint.b;
c = canon.endPoint.c;
u = canon.endPoint.u;
v = canon.endPoint.v;
w = canon.endPoint.w;
if (have_tool_change_position > 3) {
a = FROM_EXT_ANG(tool_change_position.a);
b = FROM_EXT_ANG(tool_change_position.b);
c = FROM_EXT_ANG(tool_change_position.c);
}
if (have_tool_change_position > 6) {
u = FROM_EXT_LEN(tool_change_position.u);
v = FROM_EXT_LEN(tool_change_position.v);
w = FROM_EXT_LEN(tool_change_position.w);
}
VelData veldata = getStraightVelocity(x, y, z, a, b, c, u, v, w);
AccelData accdata = getStraightAcceleration(x, y, z, a, b, c, u, v, w);
vel = veldata.vel;
acc = accdata.acc;
linearMoveMsgZ.end = to_ext_pose(x, y, z, a, b, c, u, v, w);
linearMoveMsgX.end = to_ext_pose(x, y, canon.endPoint.z, a, b, c, u, v, w);
linearMoveMsgX.vel = linearMoveMsgX.ini_maxvel = toExtVel(vel);
linearMoveMsgX.acc = toExtAcc(acc);
linearMoveMsgX.type = EMC_MOTION_TYPE_TOOLCHANGE;
linearMoveMsgX.feed_mode = 0;
linearMoveMsgX.indexrotary = -1;
linearMoveMsgZ.vel = linearMoveMsgZ.ini_maxvel = toExtVel(vel);
linearMoveMsgZ.acc = toExtAcc(acc);
linearMoveMsgZ.type = EMC_MOTION_TYPE_TOOLCHANGE;
linearMoveMsgZ.feed_mode = 0;
linearMoveMsgZ.indexrotary = -1;
int old_feed_mode = canon.feed_mode;
if(canon.feed_mode)
STOP_SPEED_FEED_SYNCH();
if(vel && acc)
interp_list.append(linearMoveMsgX);
interp_list.append(linearMoveMsgZ);
if(old_feed_mode)
START_SPEED_FEED_SYNCH(canon.spindle_num, canon.linearFeedRate, 1);
canonUpdateEndPoint(x, y, z, a, b, c, u, v, w);
}
/* regardless of optional moves above, we'll always send a load tool
message */
interp_list.append(load_tool_msg);
}
с такими изменениями и строкой в INI
движения такие
https://www.youtube.com/watch?v=Ln2wVEKUbIA