'module' object has no attribute 'get_value'

More
09 Apr 2021 13:23 #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
09 Apr 2021 21:55 #205484 by andypugh
I thought you reported that this was fixed?

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

More
10 Apr 2021 04:57 #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
10 Apr 2021 07:25 #205508 by elisa
There are my python code and the postgui hal.

File Attachment:

File Name: postgui.hal
File Size:0 KB

File Attachment:

File Name: my_arduino_2.py
File Size:1 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?
Attachments:

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

More
10 Apr 2021 08:19 #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
10 Apr 2021 21:51 #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.

More
11 Apr 2021 07:26 #205604 by elisa
I am working with a 5-DOF robotic arm.
In the lab I'm working in, they use the old version because they have had problems installing the new one.

I agree with you, I will stress to my colleagues to update it to the latest version.
However, I'm afraid the .ini file won't work. In fact, I read in the wiki that in case of updating the .ini file must also be updated but there are no details on how to do it. Do you have any suggestions?

Thank you.

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

More
11 Apr 2021 08:19 #205610 by andypugh

I am working with a 5-DOF robotic arm.

The major changes in 2.8x from 2.7x were to better support robots and gantries.

However, I'm afraid the .ini file won't work. In fact, I read in the wiki that in case of updating the .ini file must also be updated but there are no details on how to do it. Do you have any suggestions?

The required changes are documented in section 3 of "Updating Linuxcnc" in the docs.
But, in general, the "update_ini" script should run automatically and make the required changes for you.
The following user(s) said Thank You: elisa

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

Time to create page: 0.159 seconds
Powered by Kunena Forum