On 09/20/2016 08:12 AM, Florian Rist wrote: > Hi John, > thanks for you message. > >> You can control with the python interface. >> http://linuxcnc.org/docs/2.7/html/config/python-interface.html > > That refers to the LinuxCNC Python interface, but that does not give me > access to HAL, right? I tried to implement my sensor following thing > using MDI, so I send sommands like: > > c.mdi("G0 A{:f}".format(newpos)) > > This does work in some way, but i require either to wait until each > command is finished before the next commanded position is approached or > to about the running command. This make it to slow and does not give > smooth motions.
My guess is you won't get smoother motion by bypassing the G-code interpreter and going directly to HAL, but you can try. Like the `linuxcnc` python module JT linked you to, there's also a hal module: http://linuxcnc.org/docs/2.7/html/hal/halmodule.html I think you'll get the smoothest results by getting rid of python (which is not realtime) and writing a realtime component instead. This realtime component will read your sensor and put the value on a hal pin. Then link that hal pin directly to joint.N.position-command or whatever is appropriate. -- Sebastian Kuzminsky ------------------------------------------------------------------------------ _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
