Index: emc/nml_intf/emc_nml.hh
===================================================================
RCS file: /cvs/emc2/src/emc/nml_intf/emc_nml.hh,v
retrieving revision 1.41
diff -U3 -r1.41 emc_nml.hh
--- emc/nml_intf/emc_nml.hh	30 Jan 2009 21:26:55 -0000	1.41
+++ emc/nml_intf/emc_nml.hh	9 Apr 2009 11:15:52 -0000
@@ -986,6 +986,7 @@
     int spindle_override_enabled;
     int adaptive_feed_enabled;
     int feed_hold_enabled;
+    double delayLeft;           // delay time left of G4, M66..
 };
 
 // emc_MOTION is aggregate of all EMC motion-related status classes
Index: emc/task/emctaskmain.cc
===================================================================
RCS file: /cvs/emc2/src/emc/task/emctaskmain.cc,v
retrieving revision 1.133
diff -U3 -r1.133 emctaskmain.cc
--- emc/task/emctaskmain.cc	3 Feb 2009 22:11:32 -0000	1.133
+++ emc/task/emctaskmain.cc	9 Apr 2009 11:15:57 -0000
@@ -2401,8 +2401,10 @@
     case EMC_TASK_EXEC_WAITING_FOR_DELAY:
 	STEPPING_CHECK();
 	// check if delay has passed
+	emcStatus->motion.traj.delayLeft = taskExecDelayTimeout - etime();
 	if (etime() >= taskExecDelayTimeout) {
 	    emcStatus->task.execState = EMC_TASK_EXEC_DONE;
+	    emcStatus->motion.traj.delayLeft = 0;
 	    if (emcStatus->task.input_timeout != 0)
 		emcStatus->task.input_timeout = 1; // timeout occured
 	    emcTaskEager = 1;
@@ -2416,6 +2418,7 @@
 			emcStatus->task.input_timeout = 0; // clear timeout flag
 			emcAuxInputWaitIndex = -1;
 			emcStatus->task.execState = EMC_TASK_EXEC_DONE;
+			emcStatus->motion.traj.delayLeft = 0;
 		    }
 		    break;
 
@@ -2430,6 +2433,7 @@
 			emcStatus->task.input_timeout = 0; // clear timeout flag
 			emcAuxInputWaitIndex = -1;
 			emcStatus->task.execState = EMC_TASK_EXEC_DONE;
+			emcStatus->motion.traj.delayLeft = 0;
 		    }
 		    break;
 
@@ -2443,6 +2447,7 @@
 		    emcStatus->task.input_timeout = 0; // clear timeout flag
 		    emcAuxInputWaitIndex = -1;
 		    emcStatus->task.execState = EMC_TASK_EXEC_DONE;
+		    emcStatus->motion.traj.delayLeft = 0;
 		    break;
 		
 		default:
Index: emc/usr_intf/axis/extensions/emcmodule.cc
===================================================================
RCS file: /cvs/emc2/src/emc/usr_intf/axis/extensions/emcmodule.cc,v
retrieving revision 1.41
diff -U3 -r1.41 emcmodule.cc
--- emc/usr_intf/axis/extensions/emcmodule.cc	25 Feb 2009 23:48:39 -0000	1.41
+++ emc/usr_intf/axis/extensions/emcmodule.cc	9 Apr 2009 11:15:59 -0000
@@ -370,6 +370,7 @@
     {"motion_type", T_INT, O(motion.traj.motion_type), READONLY},
     {"distance_to_go", T_DOUBLE, O(motion.traj.distance_to_go), READONLY},
     {"current_vel", T_DOUBLE, O(motion.traj.current_vel), READONLY},
+    {"delay_left", T_DOUBLE, O(motion.traj.delayLeft), READONLY},
 
 // io
 // EMC_TOOL_STAT io.tool
