'module' object has no attribute 'get_value'

  • elisa
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
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
Replied by andypugh on topic 'module' object has no attribute 'get_value'
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
Replied by cmorley on topic 'module' object has no attribute 'get_value'
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.

  • elisa
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
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.

  • elisa
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
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
Replied by andypugh on topic 'module' object has no attribute 'get_value'
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.

  • elisa
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 6 months ago #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
5 years 6 months ago #205610 by andypugh
Replied by andypugh on topic 'module' object has no attribute 'get_value'

elisa wrote: 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.063 seconds
Powered by Kunena Forum