On Thursday 28 January 2016 09:45:24 Dewey Garrett wrote: > > How to make one LinuxCNC config suitable in both cases: real and > > sim? > > One can perform all kinds of programming logic using a haltcl file. > Ref: http://linuxcnc.org/docs/2.7/html/hal/haltcl.html > > Example ini file excerpt: > ... > [HAL] > HALFILE = one.hal > HALFILE = two.tcl > HALFILE = three.hal > ... > [OPTIONS] > SIM = 1 > ... > > two.tcl excerpt: > # ... > if {[info exists ::OPTIONS] && $::OPTIONS(SIM) == 1} { > loadrt sim_parport names=p > } else { > loadrt parport names=p > } > # ... > addf p.read base-thread > # ... > addf p.write base-thread > # ...
Thats beautiful Dewey. But it still involves reloading LCNC, either after editing the .ini, or reloading LCNC with a different config. I'd love to be able to do that from the gui. But I believe the current hal cannot undo a linkage once set, so even if its selected by the gui, its a one shot deal until the next time LCNC is restarted. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Genes Web page <http://geneslinuxbox.net:6309/gene> ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users