On 6 October 2016 at 01:45, Sebastian Kuzminsky <s...@highlab.com> wrote:
> In python it's in linuxcnc.stat.settings[2]. Maybe not the most > intuitive name for it... Indeed not. This works as a userspace component. #!/usr/bin/python import hal, time import linuxcnc h = hal.component("status") h.newpin("spindle-preset", hal.HAL_FLOAT, hal.HAL_OUT) h.ready() s = linuxcnc.stat() try: while 1: time.sleep(1) s.poll() h['spindle-preset'] = s.settings[2] except KeyboardInterrupt: raise SystemExit -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1916 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users