just a follow up here. after much searching on the forum I now have my feedback connecting up to the pid loop. and the machine takes off all over the place. with about 70 mm feedback error
problem is I don't want to actually change my open loop step gen pid loop. I just want to be able to compare commanded position and the encoder position and then adjust the tuning values in my servo drive until it is tuned nicely. anyway I will post on the forum also and see what people think regards Andrew On Sun, May 10, 2020 at 4:47 PM andrew beck <andrewbeck0...@gmail.com> wrote: > just to add on here. I know people are connecting up encoder feedback to > step dir control servo drive systems on here. so it has been done before. > I am just having a little trouble following along. > > regards > > Andrew > > On Sun, May 10, 2020 at 4:46 PM andrew beck <andrewbeck0...@gmail.com> > wrote: > >> hey Gene >> >> I am tuning my chinese servos and can't connect up the tuning software so >> want to show it in Halscope so that I can track the following error and >> then adjust it in the servo drive. This is just a temporary thing. I have >> the feedback from the X axis encoder plugged into the Spindle encoder pins >> on the 7i76 as that is the only high speed encoder counter I currently have >> to use. >> >> I am not sure exactly how to set this thing up. >> >> *Ideally I just want to be able to graph the encoder following error >> between my encoder and the commanded position that is going through the >> step gens. I don't want to touch the PID loop in Linux at the moment as I >> only have the once encoder counter and will have to remove the feedback >> once the tuning is done and connect up the Y axis encoder next to the 7i76 >> spindle encoder pins* >> >> this is my first time using Halscope (actually any sort of scope) and I >> am getting stuck >> >> regards >> >> Andrew >> >> On Sun, May 10, 2020 at 4:02 PM Gene Heskett <ghesk...@shentel.net> >> wrote: >> >>> On Saturday 09 May 2020 23:25:42 andrew beck wrote: >>> >>> > hey guys >>> > >>> > getting a bit stuck here and it is the same issue as this old email so >>> > I thought I would answer it and see what you guys think >>> > >>> > I have a standard Hal and ini file generated from Pncconf for a 5i25 >>> > and 7i76 combo. >>> > >>> > just trying to connect my encoder and graph the following error in >>> > Halscope. >>> > >>> > all I want to do at the moment is use Halscope to allow me to manually >>> > tune my servo drive parameters. (I will not be tuning inside linuxcnc >>> > at the moment that will have to wait until my new mesa cards come >>> > >>> > Can someone please advise what hal and ini stuff needs to be changed >>> > to get my feedback into halscope >>> > >>> > regards >>> > >>> > Andrew >>> > >>> > >>> > >>> > I have just connected my x axis encoder to my spindle >>> >>> For what purpose? >>> >>> > On Thu, Feb 27, 2020 at 7:01 AM Ed W <li...@wildgooses.com> wrote: >>> > > Hi, I've made good progress converting my little OmioCNC X6 from >>> > > Mach3 to LinuxCNC. I think I owe a writeup at some point, but I >>> > > still have a few glitches before I'm ready to do that. >>> > > >>> > > First thing which I'm worrying about is that having run pncconf, it >>> > > generates an output for my open loop steppers which involves a PID >>> > > type setup, eg here is my X axis from the ini >>> >>> PID's are optional for microstepped steppers. I have 2 lathes, one >>> running with and one w/o. Both work well. My 6040 is running well w/o >>> PID's. My GO704 has them. They are needed with servo's as thats what >>> drives the servo's to a null, no error position. PID are useful IF you >>> have feedback from glass scales or separate encoders on the motors, >>> basicly treating the stepper as a servo, and the better motor kits today >>> are moving in that direction. >>> >>> > > >>> > > >>> > > [AXIS_X] >>> > > MAX_VELOCITY = 100.0 >>> > > MAX_ACCELERATION = 750.0 >>> > > MIN_LIMIT = -0.01 >>> > > MAX_LIMIT = 355.0 >>> > > >>> > > [JOINT_0] >>> > > TYPE = LINEAR >>> > > HOME = 0.0 >>> > > FERROR = 1.0 >>> > > MIN_FERROR = 0.01 >>> > > MAX_VELOCITY = 100.0 >>> > > MAX_ACCELERATION = 750.0 >>> > > # The values below should be 25% larger than MAX_VELOCITY and >>> > > MAX_ACCELERATION >>> > > # If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% >>> > > larger. >>> > > STEPGEN_MAXVEL = 125.00 >>> > > STEPGEN_MAXACCEL = 937.50 >>> > > P = 1000.0 >>> > > I = 0.0 >>> > > D = 0.0 >>> > > FF0 = 0.0 >>> > > FF1 = 1.0 >>> > > FF2 = 0.0 >>> > > BIAS = 0.0 >>> > > DEADBAND = 0.0 >>> > > MAX_OUTPUT = 0.0 >>> > > # these are in nanoseconds >>> > > DIRSETUP = 10000 >>> > > DIRHOLD = 10000 >>> > > STEPLEN = 5000 >>> > > STEPSPACE = 5000 >>> > > STEP_SCALE = 320.0 >>> > > MIN_LIMIT = -0.01 >>> > > MAX_LIMIT = 355.0 >>> > > HOME_OFFSET = -5.000000 >>> > > HOME_SEARCH_VEL = -33.333333 >>> > > HOME_LATCH_VEL = 0.500000 >>> > > HOME_FINAL_VEL = 33.333333 >>> > > HOME_USE_INDEX = NO >>> > > HOME_IGNORE_LIMITS = YES >>> > > HOME_SEQUENCE = 1 >>> > > >>> > > >>> > > The corresponding .hal (again by pncconf) is as follows: >>> > > >>> > > >>> > > #******************* >>> > > # AXIS X JOINT 0 >>> > > #******************* >>> > > >>> > > setp pid.x.Pgain [JOINT_0]P >>> > > setp pid.x.Igain [JOINT_0]I >>> > > setp pid.x.Dgain [JOINT_0]D >>> > > setp pid.x.bias [JOINT_0]BIAS >>> > > setp pid.x.FF0 [JOINT_0]FF0 >>> > > setp pid.x.FF1 [JOINT_0]FF1 >>> > > setp pid.x.FF2 [JOINT_0]FF2 >>> > > setp pid.x.deadband [JOINT_0]DEADBAND >>> > > setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT >>> > > setp pid.x.error-previous-target true >>> > > setp pid.x.maxerror .0005 >>> > > >>> > > net x-index-enable <=> pid.x.index-enable >>> > > net x-enable => pid.x.enable >>> > > net x-pos-cmd => pid.x.command >>> > > net x-pos-fb => pid.x.feedback >>> > > net x-output <= pid.x.output >>> > > >>> > > # Step Gen signals/setup >>> > > >>> > > setp hm2_5i25.0.stepgen.00.dirsetup [JOINT_0]DIRSETUP >>> > > setp hm2_5i25.0.stepgen.00.dirhold [JOINT_0]DIRHOLD >>> > > setp hm2_5i25.0.stepgen.00.steplen [JOINT_0]STEPLEN >>> > > setp hm2_5i25.0.stepgen.00.stepspace [JOINT_0]STEPSPACE >>> > > setp hm2_5i25.0.stepgen.00.position-scale [JOINT_0]STEP_SCALE >>> > > setp hm2_5i25.0.stepgen.00.step_type 0 >>> > > setp hm2_5i25.0.stepgen.00.control-type 1 >>> > > setp hm2_5i25.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL >>> > > setp hm2_5i25.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL >>> > > setp hm2_5i25.0.stepgen.00.step.invert_output true >>> > > setp hm2_5i25.0.stepgen.00.direction.invert_output true >>> > > >>> > > # ---closedloop stepper signals--- >>> > > >>> > > net x-pos-cmd <= joint.0.motor-pos-cmd >>> > > net x-vel-cmd <= joint.0.vel-cmd >>> > > net x-output <= hm2_5i25.0.stepgen.00.velocity-cmd >>> > > net x-pos-fb <= hm2_5i25.0.stepgen.00.position-fb >>> > > net x-pos-fb => joint.0.motor-pos-fb >>> > > net x-enable <= joint.0.amp-enable-out >>> > > net x-enable => hm2_5i25.0.stepgen.00.enable >>> > > >>> > > # ---setup home / limit switch signals--- >>> > > >>> > > net min-home-x => joint.0.home-sw-in >>> > > net min-home-x => joint.0.neg-lim-sw-in >>> > > net x-pos-limit => joint.0.pos-lim-sw-in >>> > > >>> > > >>> > > What would someone experienced recommend I do here? This is a simple >>> > > openloop stepper machine, no feedback or position sensors. Just a >>> > > 6i25 to a basic breakout board, going to a chinese 556 stepper >>> > > driver clone and onto some small steppers on a 6040 type of machine? >>> > > >>> > > Is there any disadvantage (or advantage) to leaving all the PID and >>> > > closed loop stuff in here? >>> > > >>> > > >>> > > Thanks >>> > > >>> > > Ed W >>> > > >>> > > >>> > > >>> > > _______________________________________________ >>> > > Emc-users mailing list >>> > > Emc-users@lists.sourceforge.net >>> > > https://lists.sourceforge.net/lists/listinfo/emc-users >>> >>> >>> Cheers, Gene Heskett >>> -- >>> "There are four boxes to be used in defense of liberty: >>> soap, ballot, jury, and ammo. Please use in that order." >>> -Ed Howdershelt (Author) >>> If we desire respect for the law, we must first make the law respectable. >>> - Louis D. Brandeis >>> Genes Web page <http://geneslinuxbox.net:6309/gene> >>> >>> >>> _______________________________________________ >>> Emc-users mailing list >>> Emc-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/emc-users >>> >> _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users