LinuxCNC Python module

  • JT
  • JT's Avatar Topic Author
  • Away
  • Administrator
  • Administrator
More
13 Dec 2023 14:01 - 13 Dec 2023 14:08 #288035 by JT
LinuxCNC Python module was created by JT
The 2.9 docs show a status
axes (returns integer) - number of axes. Derived from [TRAJ]COORDINATES INI value.

When I try and get the axes I get the following error:
s.poll()
s.axes
AttributeError: 'linuxcnc.stat' object has no attribute 'axes'. Did you mean: 'axis'?

I looked in src/emc/task/taskinf.cc and can't find stat->axes anywhere, so was this removed or is the documents wrong?

JT
Last edit: 13 Dec 2023 14:08 by JT. Reason: fix typo

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

  • JT
  • JT's Avatar Topic Author
  • Away
  • Administrator
  • Administrator
More
13 Dec 2023 14:07 #288036 by JT
Replied by JT on topic LinuxCNC Python module
Looking at the original commit for taskinf.cc and I see:
stat->axes = localEmcTrajAxes;

So someone removed it at some point... how frustrating.

JT

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

  • JT
  • JT's Avatar Topic Author
  • Away
  • Administrator
  • Administrator
More
13 Dec 2023 14:13 #288037 by JT
Replied by JT on topic LinuxCNC Python module
Looks like Jeff deleted it with commit
43deeedd065faf31254933ee56af01c314823827

JT

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

More
13 Dec 2023 14:21 - 13 Dec 2023 14:31 #288038 by Aciera
Replied by Aciera on topic LinuxCNC Python module
Try 'axis_mask'

[edit]
This will not only give you how many axes there are but actually which ones (ie XYZABCUVW)

But, yes the reference to 'axes' should be removed from the docs .
Last edit: 13 Dec 2023 14:31 by Aciera.

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

More
13 Dec 2023 14:31 #288040 by tommylight
Replied by tommylight on topic LinuxCNC Python module
First post, shows "axes" and below "axis"
Did you try to stat "axis" ?

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

More
13 Dec 2023 14:33 #288041 by Aciera
Replied by Aciera on topic LinuxCNC Python module
He's referring to these:
 

Of which 'axes' has been removed.
Attachments:
The following user(s) said Thank You: tommylight

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

  • JT
  • JT's Avatar Topic Author
  • Away
  • Administrator
  • Administrator
More
13 Dec 2023 14:39 - 13 Dec 2023 14:40 #288042 by JT
Replied by JT on topic LinuxCNC Python module
I don't see why axes was removed as the [TRAJ] COORDINATES is still a valid and required ini entry.

It feels like axes was removed without any thought...

JT
Last edit: 13 Dec 2023 14:40 by JT.

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

More
13 Dec 2023 14:40 #288043 by tommylight
Replied by tommylight on topic LinuxCNC Python module
Oh i see, thank you.
I was thinking maybe a typo, made that mistake more than once typing on this forum, despite knowing "axis" is a single axis and "axes" is multiple. :)

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

More
13 Dec 2023 14:46 - 13 Dec 2023 15:28 #288044 by Aciera
Replied by Aciera on topic LinuxCNC Python module

I don't see why axes was removed as the [TRAJ] COORDINATES is still a valid and required ini entry.
Maybe because it was felt to be redundant information as 'axis_mask' actually gives you more information about the [TRAJ] COORDINATES entry.
The axis status gave you the number of axes without having to know new math... :(

JT

I have no clue what happened to this post lol...
Last edit: 13 Dec 2023 15:28 by JT.

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

More
13 Dec 2023 14:58 #288047 by Aciera
Replied by Aciera on topic LinuxCNC Python module
I have created a pull request to fix the documentation
github.com/LinuxCNC/linuxcnc/pull/2789

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

Moderators: HansU
Time to create page: 0.376 seconds
Powered by Kunena Forum