Read numbered parameter from a component (python or C)
- Aciera
- Topic Author
- Online
- Administrator
Less
More
- Posts: 4001
- Thank you received: 1728
04 Nov 2023 10:13 #284517
by Aciera
Read numbered parameter from a component (python or C) was created 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?
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
- Topic Author
- Online
- Administrator
Less
More
- Posts: 4001
- Thank you received: 1728
04 Nov 2023 10:48 #284519
by Aciera
Replied by Aciera on topic Read numbered parameter from a component (python or C)
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
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.
- TheRoslyak
- Offline
- Elite Member
Less
More
- Posts: 238
- Thank you received: 37
04 Nov 2023 14:29 - 04 Nov 2023 15:53 #284527
by TheRoslyak
Replied by TheRoslyak on topic Read numbered parameter from a component (python or C)
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
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