Ok, I have a first cut working: http://git.mah.priv.at/gitweb/emc2-dev.git/shortlog/refs/heads/state-save-restore-preview (relative to today's master).
This defines three new M-codes: M70 - store current state (and mark saved state as valid) M71 - restore current state and invalidate saved state. A subsequent M71 fails. M72 - restore current state and do NOT invalidate state. All three are applicable at the top level, MDI, or within O-word subroutines. M70 always succeeds. M71 and M72 succeed if a previous M70 was executed AT THAT LEVEL. M70 and M72 are idempotent operations. 'state' as used here currently subsumes the interpreter's active M-codes, active G-codes, and settings (feed and speed). Test-driving this branch: ------------------------- Just pull and build. Any config should do - turn on debugging to see details. You can play with M7x in MDI mode just fine - see the values in the 'Active G-codes' window changing when using M71/M72. This window isnt contiuously updated in Auto mode/running a program (methinks). nc_files/ has a few examples: toplevel.ngc - show how M70/M71 work nestedcall.ngc g20sub.ngc these show a toplevelfile operating in metric, relative mode and slow feed it calls a subroutine which switches to imperial absolute mode and a faster feed exiting this sub implies switching back to metric, and a different feed which is done correctly Any feedback welcome. -Michael -- state introspection through #5xxx read-only parameters is not yet implemented but no surprises expected here. ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
