custom Gui

More
25 Nov 2014 16:47 #53383 by ww34ww34
custom Gui was created by ww34ww34
I'm trying to write a custom GUI taking example from gmoccapy gui..

But when i try to catch all error with this code
__init__(self):
...
gobject.timeout_add(100, self._periodic)

def _periodic(self):
        self.stat.poll()
        error = self.error_channel.poll()
        if error:
               kind, text = error
               print "catched %s,%s" (kind, text) 

I can't catch this error:
Emit interp-run
USRMOT: ERROR: invalid command
move on line 32 would exceed joint 2's positive limit

that was printed only on console without
"catched %s,%s" word

i found this code
reportError(_("%s move on line %d would exceed joint %d's positive limit"),
			move_type, id, joint_num);
in
/src/emc/motion/command.c

so i suppose with polling error i can cath it. But until now i try everything and nothing worked for me.

Anyone know why?
Thanks

regards

Please Log in or Create an account to join the conversation.

More
25 Nov 2014 21:27 #53394 by ww34ww34
Replied by ww34ww34 on topic custom Gui
Problem solved bu myself.

periodic need
return True

at end to work.

Please Log in or Create an account to join the conversation.

More
26 Nov 2014 01:41 #53412 by newbynobi
Replied by newbynobi on topic custom Gui
if you do not return True, it will work only once, so only one cycle, but you have to poll continiously.

So you did right!

Norbert
The following user(s) said Thank You: ww34ww34

Please Log in or Create an account to join the conversation.

Time to create page: 0.099 seconds
Powered by Kunena Forum