Why can't Python get the position of the axis
27 Aug 2021 05:01 #218859
by yi2580
Why can't Python get the position of the axis was created 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 or Create an account to join the conversation.
27 Aug 2021 07:29 #218866
by phillc54
Replied by phillc54 on topic Why can't Python get the position of the axis
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.
27 Aug 2021 08:00 #218871
by yi2580
Replied by yi2580 on topic Why can't Python get the position of the axis
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.
27 Aug 2021 08:05 #218873
by phillc54
Replied by phillc54 on topic Why can't Python get the position of the axis
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
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