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 06:57 - 19 Feb 2021 06: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 06:59 by TheRoslyak.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7368
- Thank you received: 2181
19 Feb 2021 09: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 09: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.
- phillc54
-
- Offline
- Platinum Member
-
Less
More
- Posts: 5711
- Thank you received: 2100
19 Feb 2021 16: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 03:07 - 20 Feb 2021 03: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 03:21 by TheRoslyak.
The following user(s) said Thank You: elisa
Please Log in or Create an account to join the conversation.
- phillc54
-
- Offline
- Platinum Member
-
Less
More
- Posts: 5711
- Thank you received: 2100
20 Feb 2021 04: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.
- elisa
- Offline
- Senior Member
-
Less
More
- Posts: 58
- Thank you received: 5
08 Apr 2021 09: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.317 seconds