Scott Hasse wrote: > OK, so this has turned into a more interesting problem than I initially > thought it would be. I've used halmeter to verify that, for instance, > pin pid.x.enable is indeed getting enabled when the machine gets to the on > state. Additionally, the pid.x.output becomes non-zero after the machine is > turned to the on state, so I believe EMC2 for some reason thinks the motor > needs to move. > > With the servo amps disabled, and EMC in the machine on state, move the encoders manually and observe the output of the DAC with a voltmeter. Does it swing back and forth in voltage when you move the motor? If it just stays at a constant voltage (probably small) then use halmeter to monitor the output of the pid component. That should be a pin pid.0.output Does it stay at zero all the time? If so, monitor the inputs to the pid module. And, also, you can check that the ini file parameters for P, especially, are being passed into PID. The sections of code in my hal files look like :
# set PID loop gains setp pid.0.Pgain [AXIS_0]P setp pid.0.Igain [AXIS_0]I setp pid.0.Dgain [AXIS_0]D setp pid.0.bias [AXIS_0]BIAS setp pid.0.FF0 [AXIS_0]FF0 setp pid.0.FF1 [AXIS_0]FF1 setp pid.0.FF2 [AXIS_0]FF2 setp pid.0.deadband [AXIS_0]DEADBAND Oh, and of course, a really major one is to be sure the PID routine is being invoked by the servo thread. addf motion-controller servo-thread # then the PID loops addf pid.0.do-pid-calcs servo-thread addf pid.1.do-pid-calcs servo-thread addf pid.2.do-pid-calcs servo-thread addf pid.3.do-pid-calcs servo-thread # write outputs last Jon ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users