Hallo, I am still looking for a solution. It seems to be impossible to get the number of joints within hal_glib.
I tried self.stat.axes witch does return [TRAJ]AXES value being 4 for an XYZY gantry, but will be 6 for a XYZC machine. Then I tried self.stat.axis[i]["axisType" as for a non used joint I expected it to be 0, for linear to be 1 and for angular =2, but again with a machine XYZC you will get also values 1 for the not used A and B axis. self.stat.axis_mask /[returns integer)/ - mask of axis available as defined by [TRAJ] COORDINATES in the ini file. Returns the sum of the axes X=1, Y=2, Z=4, A=8, B=16, C=32, U=64, V=128, W=256. but 2 Y joints will only be one axis. The only way to get the correct amount of joints I see is to get the raw value from the ini file as "XYZY" or "XYZC" and count the length, this would be a very, very bad way to work around the supposed bug. IMHO self.stat.axis[i]["axisType"] should return 0 for unused joints! The best would be to add a new value to python interface like "num_used_joints" returning an integer, but I do not even know where to begin to get the value. So please help!! Norbert Am 05.03.2015 um 21:58 schrieb Sebastian Kuzminsky: > On 3/2/15 11:33 AM, Niemand Sonst wrote: >> I am working on gmoccapy to make it able to handle also gantry kins. As >> you know there are more joints than axis on a gantry. >> I was surprised to see, that hal_glip.py and also hal_actions.py do >> return a not_all_homed signal, even if all joints are homed! >> >> As far as I see, it is caused because both do check: >> >> if count == axis_count: >> >> but as on a gantry count will be 4 and axis_count will be 3, it will >> return False in case all joints are homed. > Seems like the correct fix is: if count == joint_count > > I dont know if the joint count is available to you at that place in the > code. > > ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers