'module' object has no attribute 'get_value'

More
5 years 6 months ago #205429 by elisa
Hi to all,

I have a problem wiht the command "hal.get_value", when I run the python script I get this error:

in <module> x= hal.get_value("x-pos-fb")
AttributeError: 'module' object has no attribute 'get_value'

Please write soon!

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

More
5 years 6 months ago #205484 by andypugh
I thought you reported that this was fixed?

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

More
5 years 6 months ago #205504 by cmorley
can you post all the code you used?
There are other commands that need to be called before that works.

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

More
5 years 6 months ago #205508 by elisa
There are my python code and the postgui hal.

File Attachment:

File Name: postgui.hal
File Size:127 B

File Attachment:

File Name: my_arduino_2.py
File Size:1.03 KB


However, I may have figured out what the problem is. The "hal.get_value ()" command works in LinuxCNC version 2.8.1 but not 2.7.14. I guess this command only works in newer versions, doesn't it?

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

More
5 years 6 months ago #205511 by elisa
However, I found the "s.actual_position" command in the documentation which also seems to work in version 2.7.14. If I understand correctly, this command reads the linuxcnc status and I can update the "current joint position" with the s.poll () command.

I will write a post to help everyone who has problems with these things!

Thank you all!

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

More
5 years 6 months ago #205572 by andypugh
Why are you using 2.7.14? 2.8 has been released for more than 6 months.

What kind of machine are you working with? 2.8 is significantly better for non-cartesian machines.

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

Time to create page: 0.079 seconds
Powered by Kunena Forum