Re: [Emc-users] reading hal pin from python script

2009-08-27 Thread Chris Morley
> > Python doesn't have a direct interface to halcmd. Use > commands.getoutput to execute halcmd and retrieve the output. > > >>> import commands > >>> float(commands.getoutput("halcmd getp motion.spindle-speed-out")) > 1000.0 > > Jeff > Maybe we could add this to the advanced section of th

Re: [Emc-users] reading hal pin from python script

2009-08-27 Thread Jeff Epler
Python doesn't have a direct interface to halcmd. Use commands.getoutput to execute halcmd and retrieve the output. >>> import commands >>> float(commands.getoutput("halcmd getp motion.spindle-speed-out")) 1000.0 Jeff -

[Emc-users] reading hal pin from python script

2009-08-27 Thread Haberler Michael
how would I go about coding the equivalent of halcmd getp in a Python script? I'm writing a user-defined Mxxx code script in Python. It's started by halui.mdi-command and should access a value from a Pyvcp widget. thanks in advance, -Michael --