Is this the way we should approach sequences of motions for toolchanging and the like? Comments, please.
HAL-BASED MOTION CONTROL ======================== Often, it's desirable to command a sequence of motions outside of g-code. For instance, a number of movements may be required during a tool change. The modifications proposed below allow for this kind of control, and make 'halstreamer' an example component capable of exercising this control. (It is anticipated that special-purpose HAL components, rather than 'halstreamer', would command the tool change motion in actual systems. It is up to an integrator to write an appropriate component) Motions in the external-position mode are performed in "exact stop" mode (suitable for tool-change motions but probably not for machining), and respect the machine's velocity and acceleration limits. It is hoped that the implementation can re-use the so-called "free planner" which is used in jogging. NEW PINS ON THE MOTION CONTROLLER ================================= motion.external-position-command BIT IN When TRUE, the machine's position is controlled by the external-position-<AXIS> pins. On the transition from TRUE to FALSE, the machine returns at "traverse" speed to the position it was in before this pin was asserted. motion.external-position-<AXIS> FLOAT IN (<AXIS> is one of X, Y, Z, A, B or C) Drive with the requested position in machine coordinates motion.position-<AXIS> FLOAT OUT Driven with the current commanded position of the axis motion.external-position-velocity FLOAT IN Drive with the requested velocity. motion.external-position-control BIT I/O When the external position is reached, motion sets this pin TRUE. CHANGES TO HALSTREAMER ====================== If the first letter of the streamer configuration string (cfg=) is '+', then the new pin is created on a 'streamer' instance. Otherwise, the 'streamer' outputs one sample per invocation, as it does now. streamer.<N>.next-sample BIT I/O When this pin is TRUE, streamer outputs the next sample and sets this pin FALSE COMMANDING MOVEMENTS WITH HALSTREAMER ===================================== The following illustrate how halstreamer can make a series of coordinated movements, drawing a 2-unit square at 1 unit above the machine origin at 5 units per minute. To begin the sequence, drive the signal 'external-control' TRUE (for instance, with a 'halcmd setp'). # Additional HAL configuration loadrt streamer depth=4 cfg=+bffff net external-command motion.external-position-command streamer.0.pin.0 net external-x motion.external-position-x streamer.0.pin.1 net external-y motion.external-position-y streamer.0.pin.2 net external-z motion.external-position-z streamer.0.pin.3 net external-a motion.external-position-a motion.position-a net external-b motion.external-position-b motion.position-b net external-c motion.external-position-c motion.position-c net external-vel motion.external-position-velocity streamer.0.pin.4 net external-control motion.external-position-control streamer.0.next-sample # Sampler input file # X Y Z vel (unit/sec) 1 -1.0 -1.0 1.1 10000.0 1 -1.0 1.0 1.0 0.08333 1 1.0 1.0 1.0 0.08333 1 1.0 -1.0 1.0 0.08333 1 -1.0 -1.0 1.0 0.08333 1 -1.0 -1.0 1.1 10000.0 0 0.0 0.0 0.0 0.0 OPEN QUESTIONS ============== Q. Should feed override, adaptive feed, or feed-hold apply to these motions? ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers