Why can't Python get the position of the axis

More
5 years 2 months ago #218859 by yi2580
Excuse me, why can't I get the position of the axis in other functions using Python script? Why? Is there any good solution?

Please Log in to join the conversation.

More
5 years 2 months ago #218866 by phillc54
I am not 100% sure what your self.status is but if it is linuxcnc.stat() then you need to poll it to get an update:
Code:
self.status.poll()
 

Please Log in to join the conversation.

More
5 years 2 months ago #218871 by yi2580
Hello, thank you very much for your reply, but isn't my while (1) polling him? What do you mean by self. Status. Poll (), can you elaborate?

Please Log in to join the conversation.

More
5 years 2 months ago #218873 by phillc54
You need to poll linuxcnc.stat() periodically to read the state:
linuxcnc.org/docs/devel/html/config/pyth...ding_linuxcnc_status

You may be better of using GStat:
linuxcnc.org/docs/devel/html/gui/GStat.html

Please Log in to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum