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

More
3 years 7 months ago #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:
Code:
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?

Please Log in to join the conversation.

More
3 years 6 months ago #268848 by andypugh
If you are looking in emcmodule.py then that was written for Axis, but is actually available to any Python code.
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....

Please Log in to join the conversation.

More
3 years 6 months ago #268863 by zz912
Which command can I use to increase the jonit limit?
Code:
>>> import linuxcnc

where can i find the linuxcnc file for python?

I am using RIP LCNC branche 2.9

Please Log in to join the conversation.

More
More
3 years 6 months ago #268882 by zz912
There is only:
Code:
set_max_limit(int, float) set max position limit for a given axis
But I wanted for a given joint.

Please Log in to join the conversation.

More
3 years 6 months ago #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.

Please Log in to join the conversation.

More
3 years 6 months ago #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 to join the conversation.

More
3 years 6 months ago #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 to join the conversation.

More
3 years 6 months ago #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 to join the conversation.

Time to create page: 0.093 seconds
Powered by Kunena Forum