Read numbered parameter from a component (python or C)

  • Aciera
  • Aciera's Avatar Topic Author
  • Online
  • Administrator
  • Administrator
More
04 Nov 2023 10:13 #284517 by Aciera
I'm trying to expose the current work offset values (eg numbered parameters (5221, 5222, 5223)) to hal pins.
Is there a way to read numbered parameters form a python- or C- component?

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

  • Aciera
  • Aciera's Avatar Topic Author
  • Online
  • Administrator
  • Administrator
More
04 Nov 2023 10:48 #284519 by Aciera
Ok, got it:

import linuxcnc
s = linuxcnc.stat() # create a connection to the status channel
s.poll() # get current values
current_offsets = s.g5x_offset
The following user(s) said Thank You: tommylight

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

More
04 Nov 2023 14:29 - 04 Nov 2023 15:53 #284527 by TheRoslyak
here is the required piece of code github.com/TheRoslyak/OpcUaHalServer
Or you can stop worrying about it at all and just install the utility, the required task is already implemented there
Upd. Sorry, I was wrong. These parameters are not present in Hal. As I understand it, interaction with them occurs only through Python. At least I haven’t found any sources on how best to receive them via C
Last edit: 04 Nov 2023 15:53 by TheRoslyak.

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

Time to create page: 0.069 seconds
Powered by Kunena Forum