Read varible of hal componet for Python 3

More
19 Feb 2021 12:57 - 19 Feb 2021 12:59 #199414 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!!!
Last edit: 19 Feb 2021 12:59 by TheRoslyak.

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

More
19 Feb 2021 15:02 #199444 by cmorley
After compiling to use python 3 ,use the python HAL module.

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

More
19 Feb 2021 15:14 #199446 by TheRoslyak
Can you give Hello world for this.(To read values already created variables.)
I found only examples to create hal-compotent.

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

More
19 Feb 2021 22:22 #199482 by phillc54

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

More
20 Feb 2021 09:07 - 20 Feb 2021 09:21 #199503 by TheRoslyak
On python3 don't work. Or may be I'm stupid?)

UPD library HAL for python3 It's different (AI engine bla bla bla)
Attachments:
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.

More
20 Feb 2021 10:00 #199508 by phillc54
Was LinuxCNC built with python3?

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

More
08 Apr 2021 14:46 #205328 by elisa
Hi!

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
Powered by Kunena Forum