Why can't Python get the position of the axis

More
27 Aug 2021 05:01 #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?
Attachments:

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

More
27 Aug 2021 07:29 #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:
self.status.poll()
 

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

More
27 Aug 2021 08:00 #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 or Create an account to join the conversation.

More
27 Aug 2021 08:05 #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 or Create an account to join the conversation.

Time to create page: 0.101 seconds
Powered by Kunena Forum