Read varible of hal componet for Python 3
- TheRoslyak
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 238
- Thank you received: 37
19 Feb 2021 12:57 - 19 Feb 2021 12:59 #199414
by TheRoslyak
Read varible of hal componet for Python 3 was created by TheRoslyak
Hi everyone
How I can read varible of hal componet
Now I use thread for
os.popen("halcmd getp axis.x.pos-cmd").read()
Perhaps there is an easier way?
Only Python 3!!!
How I can read varible of hal componet
Now I use thread for
os.popen("halcmd getp axis.x.pos-cmd").read()
Perhaps there is an easier way?
Only Python 3!!!
Last edit: 19 Feb 2021 12:59 by TheRoslyak.
Please Log in or Create an account to join the conversation.
19 Feb 2021 15:02 #199444
by cmorley
Replied by cmorley on topic Read varible of hal componet for Python 3
After compiling to use python 3 ,use the python HAL module.
Please Log in or Create an account to join the conversation.
- TheRoslyak
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 238
- Thank you received: 37
19 Feb 2021 15:14 #199446
by TheRoslyak
Replied by TheRoslyak on topic Read varible of hal componet for Python 3
Can you give Hello world for this.(To read values already created variables.)
I found only examples to create hal-compotent.
I found only examples to create hal-compotent.
Please Log in or Create an account to join the conversation.
19 Feb 2021 22:22 #199482
by phillc54
Replied by phillc54 on topic Read varible of hal componet for Python 3
Please Log in or Create an account to join the conversation.
- TheRoslyak
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 238
- Thank you received: 37
20 Feb 2021 09:07 - 20 Feb 2021 09:21 #199503
by TheRoslyak
Replied by TheRoslyak on topic Read varible of hal componet for Python 3
On python3 don't work. Or may be I'm stupid?)
UPD library HAL for python3 It's different (AI engine bla bla bla)
UPD library HAL for python3 It's different (AI engine bla bla bla)
Last edit: 20 Feb 2021 09:21 by TheRoslyak.
The following user(s) said Thank You: elisa
Please Log in or Create an account to join the conversation.
20 Feb 2021 10:00 #199508
by phillc54
Replied by phillc54 on topic Read varible of hal componet for Python 3
Was LinuxCNC built with python3?
Please Log in or Create an account to join the conversation.
08 Apr 2021 14:46 #205328
by elisa
Replied by elisa on topic Read varible of hal componet for Python 3
Hi!
Did you find a solution?
I would like to do the same thing but I am trouble with hal.get_value()...
Did you find a solution?
I would like to do the same thing but I am trouble with hal.get_value()...
Please Log in or Create an account to join the conversation.
Time to create page: 0.075 seconds