[Home]Jog-While-Paused

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Showing revision 4

Jog-while-pause changes to motion

what it is

An enhancement to the motion pause handling to:

the intent is to provide a stopgap solution to the 'pause, jog away, clean swarf, continue' issue to provide the basis for other scenarios

what it doesnt provide:

How to try it out

Pull

 http://git.mah.priv.at/gitweb/emc2-dev.git/shortlog/refs/heads/jog-while-paused-preview1

and build

 cd configs/sim/axis 
 linuxcnc jog-while-pause9.ini

execute, hit pause somewhere

set feed to some realistic value in the glade panel

press 'pause-offset-enable'

change some offset

press 'pause-offset-enable' again

press 'step' to return to pause point

press 'pause' again to continue

Integration notes

I assume here you want to build a jog-while-paused support component, for instance for an MPG. I use 'IPP' to mean the 'inital pause position', which is the pose where the pause request was honored and state changed from running to paused.

Status pins:

Control pins:

Pause, Resume and Step:

HAL flows:

Python notes:

for recording/replaying jog history: to determine the current pause point, use the linuxcnc module and query linuxcnc.stat.position when state is 1 or 2. Some example supporting code can be found in configs/sim/axis/gladevcp-jwp.py .

Changes in behaviour:

The DRO values for velocity, and distance-to-go are set to zero during a pause, and thereafter reflect velocity and DTG of the jog moves. On resume the velocity and DTG values of the initial paused move are restored.

Deficiencies and surprises

Programming notes

The basic approach is to employ an alternate motion queue - on pause, motion control is switched to the alternate queue, and arbitrary moves can be executed. Switchback to the primary motion queue happens on 'resume'; if the current pose doesnt match where execution was paused, a linear move to the pause point is executed. Then primary motion queue execution continues as before.

WRT pause, the externally significant change is that 'paused' isnt just an emcmotStatus flag anymore, but the state of the pause FSM (see enum pause_state in mot_priv.h). Any state other than 'not paused' is nonzero which is compatible with current task assumptions.

The semantics of 'step' are now such that if paused on the inital pause position, a return move to the initial pause position is executed. That seemed the most logical step to me.

While this implementation relies on the current pause behavior, the underlying mechanism could be used to for more advanced backout strategies, like retracting during a threading move.

--

Updated to master on Aug 7,2012; added missing retract.hal file.


LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions | View current revision
Edited August 8, 2012 1:12 am by MichaelHaberler (diff)
Search:
Published under a Creative Commons License