regards,
Michael
Index: motion/control.c
===================================================================
RCS file: /cvs/emc2/src/emc/motion/control.c,v
retrieving revision 1.153
diff -U3 -r1.153 control.c
--- motion/control.c 31 Jan 2009 18:12:55 -0000 1.153
+++ motion/control.c 3 Jun 2009 08:08:17 -0000
@@ -1798,22 +1798,27 @@
*(emcmot_hal_data->program_line) = emcmotStatus->id;
*(emcmot_hal_data->distance_to_go) = emcmotStatus->distance_to_go;
- if(GET_MOTION_COORD_FLAG()) {
- *(emcmot_hal_data->current_vel) = emcmotStatus->current_vel;
- } else if(GET_MOTION_TELEOP_FLAG()) {
- PmCartesian t = emcmotDebug->teleop_data.currentVel.tran;
- emcmotStatus->current_vel = (*emcmot_hal_data->current_vel) = sqrt(t.x * t.x + t.y * t.y + t.z * t.z);
- } else {
- int i;
- double v2 = 0.0;
- for(i=0; i<num_joints; i++)
- if(GET_JOINT_ACTIVE_FLAG(&(joints[i])) && joints[i].free_tp_active)
- v2 += joints[i].vel_cmd * joints[i].vel_cmd;
- if(v2 > 0.0)
- emcmotStatus->current_vel = (*emcmot_hal_data->current_vel) = sqrt(v2);
- else
- emcmotStatus->current_vel = (*emcmot_hal_data->current_vel) = 0.0;
- }
+ if (emcmotStatus->motion_state != EMCMOT_MOTION_DISABLED) {
+ if(GET_MOTION_COORD_FLAG()) {
+ *(emcmot_hal_data->current_vel) = emcmotStatus->current_vel;
+ } else if(GET_MOTION_TELEOP_FLAG()) {
+ PmCartesian t = emcmotDebug->teleop_data.currentVel.tran;
+ emcmotStatus->current_vel = (*emcmot_hal_data->current_vel) = sqrt(t.x * t.x + t.y * t.y + t.z * t.z);
+ } else {
+ int i;
+ double v2 = 0.0;
+ for(i=0; i<num_joints; i++)
+ if(GET_JOINT_ACTIVE_FLAG(&(joints[i])) && joints[i].free_tp_active)
+ v2 += joints[i].vel_cmd * joints[i].vel_cmd;
+ if(v2 > 0.0)
+ emcmotStatus->current_vel = (*emcmot_hal_data->current_vel) = sqrt(v2);
+ else
+ emcmotStatus->current_vel = (*emcmot_hal_data->current_vel) = 0.0;
+ }
+ } else {
+ emcmotStatus->current_vel = (*emcmot_hal_data->current_vel) = 0.0;
+ }
+
/* These params can be used to examine any internal variable. */
/* Change the following lines to assign the variable you want to observe
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers