On 12 June 2018 at 12:17, andy pugh <bodge...@gmail.com> wrote: > As far as I can see so far the resolver module will have to infer the > position read from the position.txt file by being netted to the > joint.N.pos-fb (or pos-cmd) HAL pin. Unless there is a better way?
This turns out to be interesting. It takes a few hundred servo cycles for the joint.0.pos-fb pin to become non-zero, whereupon it takes the resolver feedback value, and then a bit later the value from the position file is added. position.txt = -72.37295348494777159 -326.96276413789018989 0.00000000000000000 0.00000000000000000 0.00000000000000000 0.00000000000000000 0.00000000000000000 0.00000000000000000 0.00000000000000000 Resolver position = -0.08153193 (dithers in the hundreds of nanometers) In dmesg I get: [ 4403.473613] hm2: Current resolver.0.pos-fb = -0x1.4DD68989EB852P-4 cycle 352 ... [ 4403.494611] hm2: Current resolver.0.pos-fb = -0x1.21D177B3C4665P+6 cycle 373 Luckily Python can help: >>> float.fromhex("-0x1.4DD68989EB852P-4") -0.08150342680048198 >>> float.fromhex("-0x1.21D163027A665P+6") -72.45447925445622 A further wrinkle is that the home offsets play in to this, at least when initially homing to set things up. index-homing zeros the position at the resolver zero-angle. But then calls this the home-offset number. I was wondering why I could not make the numbers add up. I think that to make this work I need: HOME_OFFSET = 0 HOME_POS = -2 MAX_LIMIT = -2 Or something similar to make axis absolute zero correspond to resolver zero. As things stand the position jumps by exactly 1.000 every time I press the "Home" button. -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1916 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users