Re: [Emc-users] How to home a joint when position depends on other joint?

2013-12-14 Thread Marius Alksnys
I tried simple configuration (without offset component) too. And it 
worked perfectly.


--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] How to home a joint when position depends on other joint?

2013-12-14 Thread andy pugh
On 14 December 2013 08:08, Marius Alksnys marius.alks...@gmail.com wrote:
 I tried simple configuration (without offset component) too. And it
 worked perfectly.

If it goes wrong with the offset component but works without it, then
I suspect that the problem is with the execution order of the motion
controller and the offset component.
If you change the sequence of the addf statements in the HAL then
you can probably make it work.

-- 
atp
If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] How to home a joint when position depends on other joint?

2013-12-14 Thread Marius Alksnys
Thanks, I will try it.
This is something what I was thinking about and even tried to swap pid 
and offset addf lines, but I never found importance of addf order in 
documentation, which would be worth noting there..


On 2013.12.14 13:12, andy pugh wrote:
 On 14 December 2013 08:08, Marius Alksnys marius.alks...@gmail.com wrote:
 I tried simple configuration (without offset component) too. And it
 worked perfectly.
 If it goes wrong with the offset component but works without it, then
 I suspect that the problem is with the execution order of the motion
 controller and the offset component.
 If you change the sequence of the addf statements in the HAL then
 you can probably make it work.




--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] How to home a joint when position depends on other joint?

2013-12-14 Thread Gene Heskett
On Saturday 14 December 2013 11:38:26 Marius Alksnys did opine:

 Thanks, I will try it.
 This is something what I was thinking about and even tried to swap pid
 and offset addf lines, but I never found importance of addf order in
 documentation, which would be worth noting there..

It is important. In both threads.

General rule of thumb in base thread,
addf anything that needs a sample from hdwe (encoder?)
addf in order, the chain of non-fp stuff the sample flows through
addf last (for steppers) the parport.N functions

General rule of thumb for servo thread speed stuff:
addf signal receiver FP stuff (such as an encoder)
addf the module its net output goes to
addf next module the net of the above goes to
addf continue till this function is completed

That way any changes in the signal are propagated thru the processing chain 
in a single servo cycle.  And when the actual control outputs are updated, 
they are working with the most up to date data they can get. 

There are times I expect when you may have another function chain that 
needs to be interleaved with the above, but I haven't run across a case 
where I could test and get a demonstratable advantage. YMMV of course.  
Spindle control servos, based on an encoders velocity, will get very 
unstable if the path is backwards thru the addf's because this severely 
restricts the bandwidth of the control.  Even with what I THINK is all the 
ducks in a row, I found that double the speed of the servo thread from 1 
millisecond to .5 milliseconds was a huge improvement.  Because of non-
linearity in the pwmgen and controller, I have a linear module between the 
PID.out and the PWMGEN.in, additional time delay, but it sure tames the 
PID.error range.  Decent load torque at creep speeds (50 rpms) without 
hunting at 75% speeds (1200 on up) where its very sensitive.

In retrospect, and I'd have to make additional room for it now, I know I 
would have been schmardter to have used the PMDX-106 (or whatever is being 
sold for that now) in place of the cheaper, too darned cheap and slow  
needs modification to raise its control bandwidth if its anywhere in a 
feedback chain, CNC4PC C41 for that translation function.  Dumb, but its 
done.  I won't make that mistake again, it, out of the bag, is simply not 
suitable for use in a servo controlled environment.  You have been 
warned...

 On 2013.12.14 13:12, andy pugh wrote:
  On 14 December 2013 08:08, Marius Alksnys marius.alks...@gmail.com 
wrote:
  I tried simple configuration (without offset component) too. And it
  worked perfectly.
  
  If it goes wrong with the offset component but works without it, then
  I suspect that the problem is with the execution order of the motion
  controller and the offset component.
  If you change the sequence of the addf statements in the HAL then
  you can probably make it work.
 
 
 -- Rapidly troubleshoot problems before they affect your business.
 Most IT organizations don't have a clear picture of how application
 performance affects their revenue. With AppDynamics, you get 100%
 visibility into your Java,.NET,  PHP application. Start your 15-day
 FREE TRIAL of AppDynamics Pro!
 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.cl
 ktrk ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


Cheers, Gene
-- 
There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order.
-Ed Howdershelt (Author)
Genes Web page http://geneslinuxbox.net:6309/gene

Isn't it nice that people who prefer Los Angeles to San Francisco live 
there?
-- Herb Caen
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
 law-abiding citizens.

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] How to home a joint when position depends on other joint?

2013-12-14 Thread Kenneth Lerman

What you want to do is perform a topological sort (man tsort) on the graph.

It should be simple enough to write a tool to do that.

Ken


On 12/14/2013 12:18 PM, Gene Heskett wrote:
 On Saturday 14 December 2013 11:38:26 Marius Alksnys did opine:

 Thanks, I will try it.
 This is something what I was thinking about and even tried to swap pid
 and offset addf lines, but I never found importance of addf order in
 documentation, which would be worth noting there..
 It is important. In both threads.

 General rule of thumb in base thread,
 addf anything that needs a sample from hdwe (encoder?)
 addf in order, the chain of non-fp stuff the sample flows through
 addf last (for steppers) the parport.N functions

 General rule of thumb for servo thread speed stuff:
 addf signal receiver FP stuff (such as an encoder)
 addf the module its net output goes to
 addf next module the net of the above goes to
 addf continue till this function is completed

 That way any changes in the signal are propagated thru the processing chain
 in a single servo cycle.  And when the actual control outputs are updated,
 they are working with the most up to date data they can get.

 There are times I expect when you may have another function chain that
 needs to be interleaved with the above, but I haven't run across a case
 where I could test and get a demonstratable advantage. YMMV of course.
 Spindle control servos, based on an encoders velocity, will get very
 unstable if the path is backwards thru the addf's because this severely
 restricts the bandwidth of the control.  Even with what I THINK is all the
 ducks in a row, I found that double the speed of the servo thread from 1
 millisecond to .5 milliseconds was a huge improvement.  Because of non-
 linearity in the pwmgen and controller, I have a linear module between the
 PID.out and the PWMGEN.in, additional time delay, but it sure tames the
 PID.error range.  Decent load torque at creep speeds (50 rpms) without
 hunting at 75% speeds (1200 on up) where its very sensitive.

 In retrospect, and I'd have to make additional room for it now, I know I
 would have been schmardter to have used the PMDX-106 (or whatever is being
 sold for that now) in place of the cheaper, too darned cheap and slow 
 needs modification to raise its control bandwidth if its anywhere in a
 feedback chain, CNC4PC C41 for that translation function.  Dumb, but its
 done.  I won't make that mistake again, it, out of the bag, is simply not
 suitable for use in a servo controlled environment.  You have been
 warned...

 On 2013.12.14 13:12, andy pugh wrote:
 On 14 December 2013 08:08, Marius Alksnys marius.alks...@gmail.com
 wrote:
 I tried simple configuration (without offset component) too. And it
 worked perfectly.
 If it goes wrong with the offset component but works without it, then
 I suspect that the problem is with the execution order of the motion
 controller and the offset component.
 If you change the sequence of the addf statements in the HAL then
 you can probably make it work.
 
 -- Rapidly troubleshoot problems before they affect your business.
 Most IT organizations don't have a clear picture of how application
 performance affects their revenue. With AppDynamics, you get 100%
 visibility into your Java,.NET,  PHP application. Start your 15-day
 FREE TRIAL of AppDynamics Pro!
 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.cl
 ktrk ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users

 Cheers, Gene

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] How to home a joint when position depends on other joint?

2013-12-13 Thread Marius Alksnys
6 axis articulated robot. Its 5th and 6th joint motion is transferred 
from servo motor to the end by belts. Controlling 1-5 joints is trivial, 
but 6th one has to be offset by 5th position.

This means you have to rotate both 5th and 6th motors equally to move 
only 5th joint.

( BTW, this is the reason why I started to think that there could be 
three different objects / levels in linuxcnc: motor - joint - axis )

There are resolvers on the motors and I use 7i49 card to read them.

I am using genserkins for world mode and an offset component for 
offsetting 6th motor position and feedback signals in relation from 5th 
motor position signal. And it works correctly, except for homing, but I 
can't figure out how it _normally_ works.

My homing uses resolver index. The problem is that I get following 
errors even when MIN_FERROR is 60 degrees. And I see that resolver 
position feedback signal makes a step when homing.

I do see that big steps happen in resolver feedback signals, when they 
approach index. But the same is with normal joints.

Any ideas how to solve this?

I know I could do this in kins, but I would like to be able to use 
standard genserkins.



Some lines from my config (joint / motor components and signals are 
numbered from 0):

.hal file:
---
loadrt offset names=offset-j56

addf offset-j56.update-feedback servo-thread
addf offset-j56.update-output servo-thread

net mot.4.pos-cmd joint.4.motor-pos-cmd = pid.4.command offset-j56.offset

net mot.4.index-enable pid.4.index-enable
net mot.4.index-enable joint.4.index-enable = 
[HM2](BRD)resolver.04.index-enable

net mot.5.pos-cmd offset-j56.out = pid.5.command
net mot.5.pos-fb = offset-j56.fb-in pid.5.feedback 
[HM2](BRD)resolver.05.position
net jnt.5.pos-cmd joint.5.motor-pos-cmd = offset-j56.in
net jnt.5.pos-fb offset-j56.fb-out joint.5.motor-pos-fb

net mot.5.index-enable pid.5.index-enable
net mot.5.index-enable joint.5.index-enable = 
[HM2](BRD)resolver.05.index-enable


--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] How to home a joint when position depends on other joint?

2013-12-13 Thread Viesturs Lācis
2013/12/13 Marius Alksnys marius.alks...@gmail.com

 6 axis articulated robot. Its 5th and 6th joint motion is transferred
 from servo motor to the end by belts. Controlling 1-5 joints is trivial,
 but 6th one has to be offset by 5th position.

 This means you have to rotate both 5th and 6th motors equally to move
 only 5th joint.


I understand that moving motor 6, when motor 5 is standing still, will move
only joint 6. Is that correct?
Have you looked at Home_sequence variable in INI file? Home joint 5 to a
known position and then home joint 6.

Viesturs
--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] How to home a joint when position depends on other joint?

2013-12-13 Thread Sebastian Kuzminsky
On 12/13/13 07:42 , Marius Alksnys wrote:
 6 axis articulated robot. Its 5th and 6th joint motion is transferred
 from servo motor to the end by belts. Controlling 1-5 joints is trivial,
 but 6th one has to be offset by 5th position.

 This means you have to rotate both 5th and 6th motors equally to move
 only 5th joint.

 ( BTW, this is the reason why I started to think that there could be
 three different objects / levels in linuxcnc: motor - joint - axis )

Currently motor and joint are nearly the same.  A joint is just a 
motor with a home offset applied to it.

This is the robot i'm playing with:

http://highlab.com/~seb/linuxcnc/scorbot-er-3/1024131507a.jpg

It's got a differential drive on the wrist.  The wrist has two motors 
and two degrees of freedom (pitch and roll).  There's a good picture on 
page 2-1 of the manual here:

http://highlab.com/~seb/linuxcnc/scorbot-er-3/ER3-Manual.pdf

Each of the two wrist motors causes hand motion in both pitch and roll. 
  By running the wrist motors in a coordinated way you can effect just 
pitch, or just roll, or any combination.  This coordination between the 
two wrist motors will be handled by kinematics.

Below kinematics, at the joint level, the two wrist joints home 
independently (though maybe simultaneously).

I just got the control box hooked up to LinuxCNC (non-realtime via 
RS-232, boo), kinematics comes next...  :-)


-- 
Sebastian Kuzminsky

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] How to home a joint when position depends on other joint?

2013-12-13 Thread Gene Heskett
On Friday 13 December 2013 13:50:44 Marius Alksnys did opine:

 6 axis articulated robot. Its 5th and 6th joint motion is transferred
 from servo motor to the end by belts. Controlling 1-5 joints is trivial,
 but 6th one has to be offset by 5th position.
 
 This means you have to rotate both 5th and 6th motors equally to move
 only 5th joint.
 
 ( BTW, this is the reason why I started to think that there could be
 three different objects / levels in linuxcnc: motor - joint - axis )
 
 There are resolvers on the motors and I use 7i49 card to read them.
 
 I am using genserkins for world mode and an offset component for
 offsetting 6th motor position and feedback signals in relation from 5th
 motor position signal. And it works correctly, except for homing, but I
 can't figure out how it _normally_ works.
 
 My homing uses resolver index. The problem is that I get following
 errors even when MIN_FERROR is 60 degrees. And I see that resolver
 position feedback signal makes a step when homing.

Yikes.  I know little to zip about resolvers, only that if its lying to 
you, I would call it a resolver problem and would be all over the maker 
asking for a solution from them until it was proven that it was indeed my 
setup generating the error.  I'd move one of them that is doing this to a 
stepper just laying on the table, and log what it says for at least a turn 
going both ways when the stepper is driven in full step mode, one step at a 
time, where it generally will rest at very close to 1.8 degrees per step.  
Probably closer than .05 degrees per step from ideal.  If there is a repeat 
error cycle every 4 steps, thats the motor itself, so use the average of 
the last 4 steps which should remove that error, but anything else has to 
be a funkity resolver.  IMO of course.  Over 200 steps, a full revolution 
of the motor, it has to be 1.8 degrees per step for most steppers.
 
 I do see that big steps happen in resolver feedback signals, when they
 approach index. But the same is with normal joints.
 
 Any ideas how to solve this?

See above as a I have got the tools way to isolate resolver error to the 
resolver.
 
 I know I could do this in kins, but I would like to be able to use
 standard genserkins.
 
 
 
 Some lines from my config (joint / motor components and signals are
 numbered from 0):
 
 .hal file:
 ---
 loadrt offset names=offset-j56
 
 addf offset-j56.update-feedback servo-thread
 addf offset-j56.update-output servo-thread
 
 net mot.4.pos-cmd joint.4.motor-pos-cmd = pid.4.command
 offset-j56.offset
 
 net mot.4.index-enable pid.4.index-enable
 net mot.4.index-enable joint.4.index-enable =
 [HM2](BRD)resolver.04.index-enable
 
 net mot.5.pos-cmd offset-j56.out = pid.5.command
 net mot.5.pos-fb = offset-j56.fb-in pid.5.feedback
 [HM2](BRD)resolver.05.position
 net jnt.5.pos-cmd joint.5.motor-pos-cmd = offset-j56.in
 net jnt.5.pos-fb offset-j56.fb-out joint.5.motor-pos-fb
 
 net mot.5.index-enable pid.5.index-enable
 net mot.5.index-enable joint.5.index-enable =
 [HM2](BRD)resolver.05.index-enable
 

Cheers, Gene
-- 
There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order.
-Ed Howdershelt (Author)
Genes Web page http://geneslinuxbox.net:6309/gene

* Knghtbrd notes he has mashed potatoes for brains tonight
Valkyrie yum, can I have some?
Knghtbrd um ...
* Knghtbrd hides from Valkyrie
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
 law-abiding citizens.

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] How to home a joint when position depends on other joint?

2013-12-13 Thread andy pugh
On 13 December 2013 19:14, Gene Heskett ghesk...@wdtv.com wrote:

 My homing uses resolver index. The problem is that I get following
 errors even when MIN_FERROR is 60 degrees. And I see that resolver
 position feedback signal makes a step when homing.

 Yikes.  I know little to zip about resolvers, only that if its lying to
 you, I would call it a resolver problem and would be all over the maker
 asking for a solution from them until it was proven that it was indeed my
 setup generating the error.

If there is a problem there then it is a problem of my creation, as I
wrote the resolver driver for the 7i49.

Resolvers don't have an index, but I have pretended that they do
because LinuxCNC is used to seeing index behaviour with encoders.

The thing is that LinuxCNC should be used to seeing an enormous step
at encoder index during homing, and should know how to ignore it.
I use resolvers, homing to index, on my own machine, and there are no
issues with f-error during homing.

Are you allowing LinuxCNC to control the resolver.N.index-enable pins,
or are you doing something clever in HAL?

-- 
atp
If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] How to home a joint when position depends on other joint?

2013-12-13 Thread Gene Heskett
On Friday 13 December 2013 18:17:43 andy pugh did opine:

 On 13 December 2013 19:14, Gene Heskett ghesk...@wdtv.com wrote:
  My homing uses resolver index. The problem is that I get following
  errors even when MIN_FERROR is 60 degrees. And I see that resolver
  position feedback signal makes a step when homing.
  
  Yikes.  I know little to zip about resolvers, only that if its lying
  to you, I would call it a resolver problem and would be all over the
  maker asking for a solution from them until it was proven that it was
  indeed my setup generating the error.
 
 If there is a problem there then it is a problem of my creation, as I
 wrote the resolver driver for the 7i49.
 
I'll take that 30 lashes with a wet noodle then Andy.  If you made a 
mistake, I'd have to paint it on the wall.

 Resolvers don't have an index, but I have pretended that they do
 because LinuxCNC is used to seeing index behaviour with encoders.
 
 The thing is that LinuxCNC should be used to seeing an enormous step
 at encoder index during homing, and should know how to ignore it.
 I use resolvers, homing to index, on my own machine, and there are no
 issues with f-error during homing.
 
 Are you allowing LinuxCNC to control the resolver.N.index-enable pins,
 or are you doing something clever in HAL?


Cheers, Gene
-- 
There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order.
-Ed Howdershelt (Author)
Genes Web page http://geneslinuxbox.net:6309/gene

The soul would have no rainbow had the eyes no tears.
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
 law-abiding citizens.

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users