Re: [Emc-users] Making progress

2020-05-10 Thread Gene Heskett
On Sunday 10 May 2020 07:31:23 andrew beck wrote:

> ok will do.  I have been playing with it for the past 15 mins already
> and will carry on tomorrow.  But while you are here replying I might
> as well make use of it.
>
> firstly here is the forum build thread i made just so we are all on
> the same boat
>
> my vmc retrofit thread
> entre-retrofit-with-chinese-servo-drives-build-thread-nz?start=10#16724
>9>
>
> I am a bit confused with what the tuning terms are called in my
> manual. I have attached the screen shot I made again so you can see
> what I mean.
>
> I understand what P I and D mean I think.  but the terms in the servo
> drive manual are not that clear.  eg which is P which is I and which
> is D  and then F1 and FF1.

And even an FF2 in the lcnc version of PID. But I should probably bow out 
as I have no servo's in any of my machines, and let the servo experts 
chime in.

Those 6 variables, ISTM, should have a better labeling to define what 
each does, than what they're given historicly.  But thats just me. :(

Starting from scratch, I'd set Pgain to 1 so you have some correction 
gain, FF0 to 1, so the PID is at least 1/1 transparent. zero 
everything else and test.  There are servo tuning procedures in our 
wiki, but each servo driver maker seems free to call them what ever they 
want, in that regard, Peter C. Wallace (at Mesa) may be able to help 
decode the lingo.

> My plan is to start from scratch and set everything to zero.(after
> writing down the original values lol just in case this all goes to
> custard)
>
> so if I follow the tuning tutorial below I think I can set P up as
> high as I can until it starts getting oscillation and then back off
> 25% or so. then adjust FF1 to reduce following error.  and finally I
> and D

For D, its a velocity peaker giving quicker settling time, I to reduce 
long term following error. But I'm an absolute stranger to whats in a 
servo.

> but this is all theory that I have tried to pick up.  I have no
> experience.  just winging it.
>
> and I am currently following the EU surplus tuning tutorial
>
> EU surplus tuning tutorial
> 
>
> also Tommy's excellent tuning tutorial.
>
> servo tuning detailed how to
> ng-detailed-how-to>
>
> the later pages in this tutorial are full of people trying to get a
> step dir config up and running and helped me lots
>
> anyway if you can make sense of this that would help.
>
> My big problem is I don't know what I don't know, so find it hard to
> explain things as I have no starting point haha.
>
> On Sun, May 10, 2020 at 11:10 PM Gene Heskett  
wrote:
> > On Sunday 10 May 2020 06:28:28 andrew beck wrote:
> > > hey gene
> > >
> > > I have been playing with this since the last email.
> > >
> > > I found a forum post here which was really helpful.
> > >
> > > https://forum.linuxcnc.org/10-advanced-configuration/35997-step-di
> > >r-wi th-following-error-setup?start=0
> > >
> > >
> > > basicely I needed to keep my step gen hal connections all working
> > > still but put the encoder feedback in there too.  I pretty much
> > > copied the examples and went on from there.  The Axis DRO now is
> > > referenced by the encoder feedback showing the actual position. 
> > > But my servo tuning is already not that bad and the encoder count
> > > definitely follows the stepgen pretty close.
> > >
> > > I am still not sure how to get the scope to capture the difference
> > > between the commanded velocity and the encoder feedback yet and
> > > allow me to fix it in the drive but I am really close not I think.
> > >
> > > here are my ini  and hal files for you to look at if you want.  I
> > > have commented the HAL file showing the new stuff I put in there
> > >
> > >
> > > I changed the encoder to negative instead of inverting the A and B
> > > channels.  and I got the correct encoder scale all working
> > >
> > > now when I move the axis I can see the encoder following I can't
> > > map the error but as soon as I stop the encoder is within .002 mm
> > > of the requested position.  that is fine.  But I just want to make
> > > sure it is following the path correctly during motion.  which is
> > > probably is not.
> >
> > I'd suggest at this point, to do a temp freeze with what you have,
> > and see if you can get familiar with how the hal-scope works.  What
> > you have is now a signal generator to teach you about the scope.
> >
> > > regards
> > >
> > > Andrew
> > >
> > > On Sun, May 10, 2020 at 9:52 PM Gene Heskett
> > > 
> >
> > wrote:
> > > > On Sunday 10 May 2020 02:18:00 andrew beck wrote:
> > > > > 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
> > > >
> 

Re: [Emc-users] Making progress

2020-05-10 Thread Gene Heskett
On Sunday 10 May 2020 06:28:28 andrew beck wrote:

> hey gene
>
> I have been playing with this since the last email.
>
> I found a forum post here which was really helpful.
>
> https://forum.linuxcnc.org/10-advanced-configuration/35997-step-dir-wi
>th-following-error-setup?start=0
>
>
> basicely I needed to keep my step gen hal connections all working
> still but put the encoder feedback in there too.  I pretty much copied
> the examples and went on from there.  The Axis DRO now is referenced
> by the encoder feedback showing the actual position.  But my servo
> tuning is already not that bad and the encoder count definitely
> follows the stepgen pretty close.
>
> I am still not sure how to get the scope to capture the difference
> between the commanded velocity and the encoder feedback yet and allow
> me to fix it in the drive but I am really close not I think.
>
> here are my ini  and hal files for you to look at if you want.  I have
> commented the HAL file showing the new stuff I put in there
>
>
> I changed the encoder to negative instead of inverting the A and B
> channels.  and I got the correct encoder scale all working
>
> now when I move the axis I can see the encoder following I can't map
> the error but as soon as I stop the encoder is within .002 mm of the
> requested position.  that is fine.  But I just want to make sure it is
> following the path correctly during motion.  which is probably is not.
>
I'd suggest at this point, to do a temp freeze with what you have, and 
see if you can get familiar with how the hal-scope works.  What you have 
is now a signal generator to teach you about the scope.

> regards
>
> Andrew
>
> On Sun, May 10, 2020 at 9:52 PM Gene Heskett  
wrote:
> > On Sunday 10 May 2020 02:18:00 andrew beck wrote:
> > > 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
> >
> > Feedback is backwards, interchange the A and B connections.
> >
> > > 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
> > > 
> > >
> > > 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
> > > > 
> > > >
> > > > 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
> > > >> 
> > > >>
> > > >> 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
> > > >>> > 

Re: [Emc-users] Making progress

2020-05-10 Thread andrew beck
hey gene

I have been playing with this since the last email.

I found a forum post here which was really helpful.

https://forum.linuxcnc.org/10-advanced-configuration/35997-step-dir-with-following-error-setup?start=0


basicely I needed to keep my step gen hal connections all working still but
put the encoder feedback in there too.  I pretty much copied the examples
and went on from there.  The Axis DRO now is referenced by the encoder
feedback showing the actual position.  But my servo tuning is already not
that bad and the encoder count definitely follows the stepgen pretty close.

I am still not sure how to get the scope to capture the difference between
the commanded velocity and the encoder feedback yet and allow me to fix it
in the drive but I am really close not I think.

here are my ini  and hal files for you to look at if you want.  I have
commented the HAL file showing the new stuff I put in there


I changed the encoder to negative instead of inverting the A and B
channels.  and I got the correct encoder scale all working

now when I move the axis I can see the encoder following I can't map the
error but as soon as I stop the encoder is within .002 mm of the requested
position.  that is fine.  But I just want to make sure it is following the
path correctly during motion.  which is probably is not.

regards

Andrew

On Sun, May 10, 2020 at 9:52 PM Gene Heskett  wrote:

> On Sunday 10 May 2020 02:18:00 andrew beck wrote:
>
> > 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
> >
> Feedback is backwards, interchange the A and B connections.
>
> > 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 
> >
> > 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
> > > 
> > >
> > > 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 
> > >>
> > >> 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 
> 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.
> > >>> > >
> > >>> 

Re: [Emc-users] Making progress

2020-05-10 Thread Gene Heskett
On Sunday 10 May 2020 02:18:00 andrew beck wrote:

> 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
>
Feedback is backwards, interchange the A and B connections.

> 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 
>
> 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
> > 
> >
> > 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 
> >>
> >> 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  
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 = 

Re: [Emc-users] Making progress

2020-05-10 Thread andrew beck
hey Gene  7:25pm here

Ok just answering all your questions.

I am going to buy a 7i89 to get 5 more encoder counters as soon as I can
get it shipped.This is a big machine that makes money machining so I
don't really care about saving a little bit of money and sacrificing
performance in this application.  I will just buy another card they are
cheap enough for what you get..

 but for now I just want to tune the chinese servo loop inside the drive.
the feedback to linuxcnc will be mainly to just keep a eye on things
hopefully.

but I will see how it goes.  would love to hear from someone that actually
has this setup working fine.

thanks for the reply and we can chat tomorrow

Regards

Andrew



On Sun, May 10, 2020 at 6:18 PM Gene Heskett  wrote:

> On Sunday 10 May 2020 00:46:14 andrew beck 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 see. Do able then. But whats the other card driving the 7i76?  If its a
> 5i25, then another encoder can be accessed thru a bob on the p2
> connector if the right firmware is loaded. I don't have other cards here
> except for the rpi4 but thats another critter entirely.
>
> 1000 ppr encoders are also going to overrun the opto's in the bobs,
> requiring the opto's be removed and bypassed.  The sainsmart bob makes
> that a bit easier to do than most bobs. But theres no opto on the 7i76
> encoder inputs, or if there is, they've never been a problem speedwise.
> And that set of inputs is being seriously abused here on the GO704 as my
> spindle encoders A/B in high gear is a scale slightly above 7100 ppr and
> the index, still on the spindle can go up to 3000 revs.
>
> > I am not sure exactly how to set this thing up.
>
> Probably the best startup is to make a 1 axis config for both .ini and
> hal, fine tune that one and copy it PID settings and all to what will
> become the final hal.
>
> Then move the one encoder to the next axis in your test .ini and hal.
> Wash, rinse, repeat.
>
> > *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
>
> This then will likely will be a new concept, looking at a signal as it
> changes with time, sometimes very short times.  Thats what a scope does,
> measures voltage vs time and displays it. But when the light comes on
> you'll wonder how you ever got by without it. Some previous experience
> with a triggeered scope would help if you had it. Don't be afraid to ask
> questions I can probably answer as in October of this year, it will be
> 70 years since I picked up my first scope probe if I don't fall over
> first. Yeah, I'm the old fart of this list. This "all software"
> hal-scope isn't that great, too slow, but its good enough to get the job
> done 99% of the time.  And it can look at any signal inside of linuxcnc
> you can't touch with a real scope.  Handier than bottled beer even. ;-)
>
> But right now I'm going back to the rack, its 2:15AM.
>
> Stay well now.
>
> > regards
> >
> > Andrew
> >
> > On Sun, May 10, 2020 at 4:02 PM Gene Heskett 
> 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  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, 

Re: [Emc-users] Making progress

2020-05-10 Thread andrew beck
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 
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 
> 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 
>> 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  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   = 1
>>> > > DIRHOLD= 1
>>> > > STEPLEN= 5000
>>> > > STEPSPACE  = 5000
>>> > > STEP_SCALE = 320.0
>>> > > MIN_LIMIT = -0.01
>>> > > MAX_LIMIT = 355.0
>>> > > HOME_OFFSET = -5.00
>>> > > HOME_SEARCH_VEL = -33.33
>>> > > HOME_LATCH_VEL = 

Re: [Emc-users] Making progress

2020-05-10 Thread Gene Heskett
On Sunday 10 May 2020 00:46:14 andrew beck 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 see. Do able then. But whats the other card driving the 7i76?  If its a 
5i25, then another encoder can be accessed thru a bob on the p2 
connector if the right firmware is loaded. I don't have other cards here 
except for the rpi4 but thats another critter entirely.

1000 ppr encoders are also going to overrun the opto's in the bobs, 
requiring the opto's be removed and bypassed.  The sainsmart bob makes 
that a bit easier to do than most bobs. But theres no opto on the 7i76 
encoder inputs, or if there is, they've never been a problem speedwise. 
And that set of inputs is being seriously abused here on the GO704 as my 
spindle encoders A/B in high gear is a scale slightly above 7100 ppr and 
the index, still on the spindle can go up to 3000 revs.
 
> I am not sure exactly how to set this thing up.

Probably the best startup is to make a 1 axis config for both .ini and 
hal, fine tune that one and copy it PID settings and all to what will 
become the final hal.

Then move the one encoder to the next axis in your test .ini and hal.  
Wash, rinse, repeat.

> *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

This then will likely will be a new concept, looking at a signal as it 
changes with time, sometimes very short times.  Thats what a scope does, 
measures voltage vs time and displays it. But when the light comes on 
you'll wonder how you ever got by without it. Some previous experience 
with a triggeered scope would help if you had it. Don't be afraid to ask 
questions I can probably answer as in October of this year, it will be 
70 years since I picked up my first scope probe if I don't fall over 
first. Yeah, I'm the old fart of this list. This "all software" 
hal-scope isn't that great, too slow, but its good enough to get the job 
done 99% of the time.  And it can look at any signal inside of linuxcnc 
you can't touch with a real scope.  Handier than bottled beer even. ;-)

But right now I'm going back to the rack, its 2:15AM.

Stay well now.

> regards
>
> Andrew
>
> On Sun, May 10, 2020 at 4:02 PM Gene Heskett  
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  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
> > 

Re: [Emc-users] Making progress

2020-05-09 Thread andrew beck
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 
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  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  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   = 1
>> > > DIRHOLD= 1
>> > > STEPLEN= 5000
>> > > STEPSPACE  = 5000
>> > > STEP_SCALE = 320.0
>> > > MIN_LIMIT = -0.01
>> > > MAX_LIMIT = 355.0
>> > > HOME_OFFSET = -5.00
>> > > HOME_SEARCH_VEL = -33.33
>> > > HOME_LATCH_VEL = 0.50
>> > > HOME_FINAL_VEL = 33.33
>> > > 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  

Re: [Emc-users] Making progress

2020-05-09 Thread andrew beck
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  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  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   = 1
> > > DIRHOLD= 1
> > > STEPLEN= 5000
> > > STEPSPACE  = 5000
> > > STEP_SCALE = 320.0
> > > MIN_LIMIT = -0.01
> > > MAX_LIMIT = 355.0
> > > HOME_OFFSET = -5.00
> > > HOME_SEARCH_VEL = -33.33
> > > HOME_LATCH_VEL = 0.50
> > > HOME_FINAL_VEL = 33.33
> > > 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 

Re: [Emc-users] Making progress

2020-05-09 Thread Gene Heskett
On Saturday 09 May 2020 23:59:55 Gene Heskett 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?

I should clarify this, if you have actually mounted it on the spindle so 
its actually reading the spindle, it IS the spindle encoder.  Not the X. 
To LinuxCNC, the x is just a name.

> > On Thu, Feb 27, 2020 at 7:01 AM Ed W  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.

At I might add, far less of a premium price than for full servo setups.

> > > [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   = 1
> > > DIRHOLD= 1
> > > STEPLEN= 5000
> > > STEPSPACE  = 5000
> > > STEP_SCALE = 320.0
> > > MIN_LIMIT = -0.01
> > > MAX_LIMIT = 355.0
> > > HOME_OFFSET = -5.00
> > > HOME_SEARCH_VEL = -33.33
> > > HOME_LATCH_VEL = 0.50
> > > HOME_FINAL_VEL = 33.33
> > > 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  
> > > 

Re: [Emc-users] Making progress

2020-05-09 Thread Gene Heskett
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  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   = 1
> > DIRHOLD= 1
> > STEPLEN= 5000
> > STEPSPACE  = 5000
> > STEP_SCALE = 320.0
> > MIN_LIMIT = -0.01
> > MAX_LIMIT = 355.0
> > HOME_OFFSET = -5.00
> > HOME_SEARCH_VEL = -33.33
> > HOME_LATCH_VEL = 0.50
> > HOME_FINAL_VEL = 33.33
> > 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_type0
> > 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 / 

Re: [Emc-users] Making progress

2020-05-09 Thread andrew beck
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

On Thu, Feb 27, 2020 at 7:01 AM Ed W  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
>
>
> [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   = 1
> DIRHOLD= 1
> STEPLEN= 5000
> STEPSPACE  = 5000
> STEP_SCALE = 320.0
> MIN_LIMIT = -0.01
> MAX_LIMIT = 355.0
> HOME_OFFSET = -5.00
> HOME_SEARCH_VEL = -33.33
> HOME_LATCH_VEL = 0.50
> HOME_FINAL_VEL = 33.33
> 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_type0
> 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
>


chevalier_cnc_mill.hal

Re: [Emc-users] Making progress

2020-02-26 Thread Ed W



On 26/02/2020 19:07, Peter C. Wallace wrote:

On Wed, 26 Feb 2020, Ed W wrote:



   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

..

Ed W



You can use the built in position mode control loop in the driver 
(without PID) but you can get better performance by using PID and 
velocity mode, especially with regard to host servo thread jitter. 
This is why PNCCONF uses thsi control mode even for open loop step 
motor systems.




Thanks everyone who responded.

Can I ask about the need for the STEPGEN_MAXVEL and _MAXACCEL. The man 
pages suggest that if these can (should?) be omitted and would then be 
infinite or something sensible (the manual is unclear)?


Actually, I think I might have that mixed up? I think what is suggested 
is that there is no need to duplicate the MAX_VELOCITY in both the 
AXIS_n and JOIN_n sections?


It's really only a cleanup, but any comments on whether all of these 
values need to be there and duplicated, etc? Which get pulled automatically?


Thanks

Ed W




___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Making progress

2020-02-26 Thread Peter C. Wallace

On Wed, 26 Feb 2020, Ed W wrote:


Date: Wed, 26 Feb 2020 17:58:09 +
From: Ed W 
Reply-To: "Enhanced Machine Controller (EMC)"

To: "Enhanced Machine Controller (EMC)" 
Subject: [Emc-users] Making progress

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



   [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   = 1
   DIRHOLD= 1
   STEPLEN= 5000
   STEPSPACE  = 5000
   STEP_SCALE = 320.0
   MIN_LIMIT = -0.01
   MAX_LIMIT = 355.0
   HOME_OFFSET = -5.00
   HOME_SEARCH_VEL = -33.33
   HOME_LATCH_VEL = 0.50
   HOME_FINAL_VEL = 33.33
   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_type0
   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



You can use the built in position mode control loop in the driver (without PID) 
but you can get better performance by using PID and velocity mode, especially 
with regard to host servo thread jitter. This is why PNCCONF uses thsi control 
mode even for open loop step motor systems.








___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Making progress

2020-02-26 Thread Todd Zuercher
It turns out the most reliable way for Linuxcnc to control a hardware stepgen 
(like is used in a Mesa card (like your 6i25) is to treat it like a sudo servo 
using a PID loop to close a position loop between Linuxcnc and the hardware 
stepgenerator.  Supposedly this helps to cancel out some problems caused by 
variance latency times.  Since this isn't a true servo loop, there is no tuning 
of the PID numbers, they are precisely calculated from known variables, so you 
do not need to mess with the default settings for the PID.

The hardware stepgen is capable of working with pure position commands also 
(without using the PID).  But smarter minds than me figured out a long time ago 
that the other way works slightly better.   So I'd suggest leaving it be.

It also has the advantage of, if you decide to add real position feedback for a 
true closed loop system, every thing you need is already set up in the config.  
All you need to do is replace the stepgen's  position feedback with the real 
postiong feedback, then retune the PID loop. 

Todd Zuercher
P. Graham Dunn Inc.
630 Henry Street 
Dalton, Ohio 44618
Phone:  (330)828-2105ext. 2031

-Original Message-
From: Ed W  
Sent: Wednesday, February 26, 2020 12:58 PM
To: Enhanced Machine Controller (EMC) 
Subject: [Emc-users] Making progress

[EXTERNAL EMAIL] Be sure links are safe.

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


[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   = 1
DIRHOLD= 1
STEPLEN= 5000
STEPSPACE  = 5000
STEP_SCALE = 320.0
MIN_LIMIT = -0.01
MAX_LIMIT = 355.0
HOME_OFFSET = -5.00
HOME_SEARCH_VEL = -33.33
HOME_LATCH_VEL = 0.50
HOME_FINAL_VEL = 33.33
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_type0
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, 

Re: [Emc-users] Making progress

2020-02-26 Thread Sam Sokolik
A PID style setup with steppers recovers better from latency variances.   I
would leave it.

sam

On Wed, Feb 26, 2020 at 12:01 PM Ed W  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
>
>
> [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   = 1
> DIRHOLD= 1
> STEPLEN= 5000
> STEPSPACE  = 5000
> STEP_SCALE = 320.0
> MIN_LIMIT = -0.01
> MAX_LIMIT = 355.0
> HOME_OFFSET = -5.00
> HOME_SEARCH_VEL = -33.33
> HOME_LATCH_VEL = 0.50
> HOME_FINAL_VEL = 33.33
> 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_type0
> 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
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users