Python Interface set_max_limit(int, float) - for joint ???

  • zz912
  • zz912's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
30 Mar 2023 05:29 - 30 Mar 2023 05:30 #267887 by zz912
Hello,

I'm getting started with Remap M6 in Python.
I would need a method to increase the joint limit.

Here:
linuxcnc.org/docs/stable/html/config/pyt...command_code_methods
I found method only for axis:
set_max_limit(int, float)set max position limit for a given axis

1) Is there a method for max_limit_joint and I just can't find it?
2) Is this a bug that forgot to create a method for the joint when moving from LCNC 2.7 to LCNC 2.8?
3) Is there some other reason why this method doesn't exist?
Last edit: 30 Mar 2023 05:30 by zz912.

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

More
11 Apr 2023 22:38 #268848 by andypugh
If you are looking in emcmodule.py then that was written for Axis, but is actually available to any Python code.
andypugh@buster:~$ python
Python 2.7.16 (default, Oct 10 2019, 22:02:15) 
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import linuxcnc

>>> dir(linuxcnc.command)
['__class__', '__delattr__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'abort', 'auto', 'brake', 'debug', 'feedrate', 'flood', 'home', 'jog', 'load_tool_table', 'maxvel', 'mdi', 'mist', 'mode', 'override_limits', 'program_open', 'rapidrate', 'reset_interpreter', 'serial', 'set_adaptive_feed', 'set_analog_output', 'set_block_delete', 'set_digital_output', 'set_feed_hold', 'set_feed_override', 'set_max_limit', 'set_min_limit', 'set_optional_stop', 'set_spindle_override', 'spindle', 'spindleoverride', 'state', 'task_plan_synch', 'teleop_enable', 'tool_offset', 'traj_mode', 'unhome', 'wait_complete']

There it is....
The following user(s) said Thank You: zz912

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

  • zz912
  • zz912's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
12 Apr 2023 04:38 #268863 by zz912
Which command can I use to increase the jonit limit?
>>> import linuxcnc

where can i find the linuxcnc file for python?

I am using RIP LCNC branche 2.9

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

More
12 Apr 2023 09:45 #268879 by andypugh

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

  • zz912
  • zz912's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
12 Apr 2023 10:43 - 12 Apr 2023 10:46 #268882 by zz912
There is only:
set_max_limit(int, float)
set max position limit for a given axis
But I wanted for a given joint.
Last edit: 12 Apr 2023 10:46 by zz912.

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

More
12 Apr 2023 11:12 #268884 by andypugh
I think that is a documentation error:
github.com/LinuxCNC/linuxcnc/blob/master...s/emcmodule.cc#L1351

It is clearly calling the JOINT limit setup message.
The following user(s) said Thank You: zz912

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

  • zz912
  • zz912's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
12 Apr 2023 11:27 #268886 by zz912
So we have second  problem. We dont have set_max_limit(int, float) - for axis.

I needed both.

Should I make an Issue on Github?

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

More
12 Apr 2023 11:57 #268887 by andypugh
I am not clear what the axis max / min limits are used for.
github.com/LinuxCNC/linuxcnc/blob/2.9/sr...ask/taskintf.cc#L574
Is one use that I found with a github search, but this would need a more careful search (as Github only reports the first couple of hits in each file)

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

  • zz912
  • zz912's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
12 Apr 2023 12:27 #268894 by zz912

I am not clear what the axis max / min limits are used for.

I think, that it editing parameter in INI file. I did not test it, because I need change both.

I solved it now by HAL pin:
ini.z.max_limit 
ini.2.max_limit

I want learn use Python in LCNC.  That's why I'm still dealing with it.

 

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

Time to create page: 0.070 seconds
Powered by Kunena Forum