Problem in using state() command
17 Sep 2017 15:42 - 17 Sep 2017 15:51 #99061
by developer
Problem in using state() command was created by developer
Hi
I'm working on a new GUI for linuxcnc and I'v put following code into python file :But it prints two '1' (as state) which means linuxcnc in STATE_ESTOP and it's state cannot be changed to STATE_ESTOP_RESET. So it showsdose not work correctly.
Anyone can help me?
I'm working on a new GUI for linuxcnc and I'v put following code into python file :
self._c = linuxcnc.command()
self._s = linuxcnc.stat()
self._e = linuxcnc.error_channel()
self._s.poll()
print self._s.task_state
if self._s.task_state == linuxcnc.STATE_ESTOP:
self._c.state(linuxcnc.STATE_ESTOP_RESET)
self._c.wait_complete()
self._s.poll()
print self._s.task_state
else:
self._c.state(linuxcnc.STATE_ESTOP)
self._c.wait_complete()
self._s.poll()
print self._s.task_state
self._c.state(linuxcnc.STATE_ESTOP_RESET)
Anyone can help me?
Last edit: 17 Sep 2017 15:51 by developer.
Please Log in or Create an account to join the conversation.
Time to create page: 0.059 seconds