Read numbered parameter from a component (python or C)

More
2 years 11 months ago #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 to join the conversation.

More
2 years 11 months ago #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

Please Log in to join the conversation.

More
2 years 11 months ago #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

Please Log in to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum