I must be doing something wrong
of course. the question is what ;)
Just playing around with pid
pid loops are a bear to tune
I am finding that out ;)
I am trying to do the Ziegler-Nichols method - but I think I have some other issues. Like my output scale doesn't seem to be right
you'll probably find that your output is non-linear
at max dc the servo runs at 1500rpm - which should be 500ipm
that's max DC from your supply?
but I don't seem to get close to that
that is 99% df out of pwmgen
do you have a scope or frequency counter to check speed with?
like 10ipm or so
I have tachometer
ok - that'll do :)
and if you just load realtime, one PID, and freqgen (no emc to complicate things), do you get that speed with a PWM duty cycle of 99%?
(I;m assuming that the motor is not attached to a machine at the moment)
no not attached.. I get 1500 rpm when I have it set up as a spindle running 99%df (out of emc)
can you post your ini file on pastebin?
just in case :)
eww - do you really want to see it? it is messy
it's ok - I'm a programmer
[01:57:33] <skunkworksemc> http://pastebin.ca/243941
[01:58:42] <skunkworksemc> http://pastebin.ca/243943
this is a hacked up etchosketch file
your max_velocity is probably in the wrong units ;)
500 ips is a very fast machine
oops - I was thinking ipm :)
I was just going to ask if that had changed for the ini, along with the named units
it initally was in inches
jmkasunich calculated the setp pwmgen.0.scale 8.3 yesterday
does the output_scale used for anything else - should it be the same (8.3)
ok - I'd have to look at the source to see if it divides or multiplies, but I'll assume that he correctly determined that it multiplies
8.3 * 60 = 500 ipm
hmm - the bigger the number (scale) the less ouput I have - iirc
so I guess that at an input command of 8.3 gives you 100% duty cycle
yes, that makes sense
when command = scale, the output if full on
ah that makes sense. But if I command a 500ipm - I am lucky to get 50
however, the PID max output is set to 1, so you should never get more than 60 ipm anyway
the ohter thing is - the axis velocity shows lets say 500ipm - but then drops to 0 before it finishes the move. If that makes sense
if I command 500ipm
you're looking at vel with halscope?
ah - I was wondering about that
so the pid should also be set to 8.3
wait - on the "vel goes to 0" question, where are you looking at the zero?
or the 500 that turns into a zero
axis has a velocity readout
yes, the velocity should go to 0, since the TP decelerates the motor to a stop
I'm not sure how axis displays that though - it may just be the delta between position updates in the display
yes, the pid max should probably be set to something at least as high as needed to satisfy the TP / AXIS_n max vels
that fixed the velocity issue - thanks
I have another question
I'll dodge if I don't like it ;)
I was doing the Ziegler-Nichols method. I wonder though should the dead band be set to 0? Because when I set it to 0 the thing oscollates at with a p set around 1000 or so.. If I have a dead band of around .0003(little over 1 ecoder line) it oscolates at a p of 4700
DEADBAND should be set to slightly over the distance for 1/2 encoder count
each encoder count is .000208 - So I set it to .0003
right - the 1/2 encoder count comes from wanting it to hunt to the closest encoder edge
no thats right
.0001 is closer ;)
so it is half a count - ok I was confused
remember that the position feedback is only presented in full encoder ticks
so if you want a point exactly in the middle of two ticks, you want the deadband to be set to ignore that error
so a little over 1/2 tick does that
maybe 0.00015 would be good
note that 0.0003 will still work, but you essentially lose resolution that way, because you ignore ~1.5 encoder counts of error in each direction
so the question is - should I have to flick it to get it to oscolate?
try to turn the shave
that's the ideal case
that's what deadband dows for you
the geckos have PID, and eventually the I term dominates, so the drives ping-pong back and forth between two adjacent encoder edges
depending on the tuning, the motors "sing" - you can hear them buzzing
with deadband, any error below the threshold is just ignored - it never gets into the I term, so I never dominates, and the servo will just sit there unless you flick the shaft (or push the table, etc), at which time the feedback allows the system to correct for the error you just injected
I am trying to get it to oscolate for this http://linuxcnc.org/docs/html/motion/pid_theory/index.html
I suspect you should set deadband to 0 for the tuning, but I'm not sure
ah - that was my question :)
though you initially have I=D=0, and only change P, right?
right - keep increasing p until it oscolats
ok. then I won't matter, and very small errors won't have much effect until P is large-ish
so I'd do it with deadband=0
ok - doing it now
now what do you consider oscillation?
when the motor starts going back and forth around the set position
it starts buzzing around 1200
(remembe I have no mass hooked to this other than the rotot
that may be it, but if the period is that small, you'll need a scope to do this method
at 1300 it really buzzes
I used halscope :)
does the pitch of the buzzin change as well as the volume?
well I can test it - I really can't tell
is m in halscope micro?
in the units display, they probably would would be milli
u will be micro
so I am getting 12ms
this is what I was geting before
so a period of 12ms
ok. I don't know enough about motor PID tuning to know if that's reasonable
I think you should test with step functions though
using the TP to accel and decel the motor is easier on the PID loop than a step would be
so p at 1250 - p=750 i=.006 and d=.0015?
that may work, though I seems maybe a little low
or is it D? ;)
yes - that would probably be better - but I am just playing
of course, the numbers will change on the machine as well ;)
well - I've got to run. good luck with it
that was productive. :)
got it working?
getting closer. I think I need to also play with tuning by 'step function' - what ever that is :)
that's where you change the goal by a step (instead of a ramp like you usually get from emc) and watch the response
but then how do you know what to change?
step response probably isn't so important for pid in our application
heh you look at the response and change 'the right thing' to make it 'better'
sounds about right ;)
did you ever get what looked like real oscillation? I bet it might be hard to really get a feel for it with no mass on the motor
right - I had tried it 2 differnt ways and got the same period - so I am confident of that (12ms)
I am tempted to hook it to the z axis of the gantry to add mass.
with mass I think you'll get more like a second, nice slow controlled oscillation
yeah I bet that would be interesting
also - as I lowered the following error - I would get following errors at de-accelleration. probably harder with no friction/mass
at high speeds - > 50ipm
but I really didn't play with it enough yet'
but all and all - pretty cool for junk :)
and inexpensive parts.
yeah, I bet you could move something with it.
we where trying to spin it with a wrench. it would move around .005" before I would chicken out
that is another question - can that be adjusted?
I don't know what you would call it. So say it would only move .001 when I try to spin it
oh you mean when you're in closed loop and you turn the shaft by hand?
is that a funcion of something?
that will come with tuning, a higher P will push harder against you, a higher I will push harder the longer you hold it away from teh target
it is pretty cool - still excited. :)
when it's tuned well you'll be able to turn it within the deadband range and it'll feel like a wall outside that
cool - that is what i was wondering
beware I've only done this once :-)
I have done it less than that
it also sounded cool :)
do you have it wired to emc and you're jogging/MDI etc?
you haven't let the smoke out of any of your H bridge stuff yet?
I acutally used the calibrate menu item to play with the pid
nope. so far so good
wow that's a testament to your design skills
I had help :)
jmk's design of the circuit board probably helped I am sure :_)
yeah he's pretty good at that stuff
I don't have the heatsinks mounted yet - and all the playing I did earlier - the mosfets didn't even get a hint of heat
cool that's a great sign
don't know if you saw this http://www.electronicsam.com/images/KandT/servostart/mess.JPG
I like that cap-top mounting scheme, it'll be neat to have a row of those
I have that same power supply
yes - we have about 20 of those things - from some old drives.
[04:05:13] <skunkworks> http://www.electronicsam.com/images/KandT/servostart/Endoder1.JPG
neat, I still can't believe those things work. it seems so unlikely.
which one - the 5v one or the 0-25volt one?
except mine has the original power switch still
ah - I am suprised it still works - I have had is since I was a kid.. Pretty hard on it/
what did the origina switch look like? do you mean it had a plastic cap? I don't remember
that marking means 400 line?
yes - 400 line
is it a glass or plastic disc?
it is plastic.
maybe at the end of fest we'll all have to road-trip to your place to see your finished conversion :-)
oh - maybe not the next on - but the one after? we are not the fastest bunch :)
ok maybe so...
didn't notice that btw - endoder :)
I can't spell my way out of a papar box
haha I'd never noticed that :-)
If the big servos do direct drive to the 3tpi leasd screws - that gives me a resolution of .000208
with what top speed?
I think so :)
those servos are rated at 1200 rpm. so 400 ipm
more than enough
what's the X (long) travel?
(uh whichever thing you call the longest one)
plus the table rotates
so something like 6 seconds full travel
it originally did 200ipm rapid
could be a little faster I suppose, but you don't do the full travel very often
I bet you can do a normal up/across/down in about a second a lot of times
it will be snappy
yes - It will be fun to see :) and quiet - won't need the huge hydrolic power supply
03jmelson 07HEAD * 10emc2/src/hal/drivers/hal_ppmc.c: put in abs() for extraDAC, fixed rev level test for extraDout
plus full 3 axis machining. It was 2.5 axis - x and z shared the same servo
then you can do helical hole milling
all kinds of cools stuff..
the 60's vintage controller also only did conturing up to 9.9999 inches (radius or linear)
took me a second to figure out who jmelson was - never see the m
so - is the max going to be converted to servos?
maybe someday, but sadly/happily it works really well as it is
if I'm going to bother to do a complex conversion I'd rather do it to a larger mill
do you have the room? it is an adiction you know..
heck I'd be happy to have a larger manual mill
it would be challenging but I think I could find the room. depends on the size.
better would be if a nearby friend had one :-)
Isn't it time for jepler to get a mill? :)
nah, he'd get a little one
he has less room than I do, and also a girlfriend who would give him that look
yah - I know what that is like.
did you see we nominated jepler to do a new classic ladder gui? I think it should be called CLAxis. Jepler wasn't amused.
I'd rather he finish hallelujah
the CL gui seemed 'ok' to me - you can do what you need to in it
actually - so do I. ALthough - I am getting used to the hal setup. Or it is making more sense.
glad you're getting used to it
because you're the support guy now...
riiiight. I do what I can. :)
did you see that all it take to hook into the encoder sensor is a hdd led and turbo sw plug http://www.electronicsam.com/images/KandT/servostart/Endoder1.JPG
haha I didn't notice that
could not fine a plug with 5 conductors. so I used a 3 and a 2
they should have put the index on one end or the other - then i could have used a 4 conductor plug. instead they put it in the middle some where
do you intend to use the indexes?
I think you can home to them using if you're using the encoder module directly
maybe - These disks don't have an index.
The ultimate plan is to get the scales on the acutally machine working. (sort of a linear resolver)
and using a resolver to quaduture converter chip
right I remember you saying that
so it'll be a whole different setup
but mechanical home switches would do just fine - for now :)
I would think I would need hardware counters then
I think they are 1000 line fixed
at least the ones I have seen
you could use the hackery I used on mine to divide the quadrature
yes - good idea. (didn't cross my mind)
that's because it's a terrible idea :-)
so is there issues with the index pulse on hardware cards?
I think some of them are not tested
the encoder module was the first to work right because special hardware was not needed to write or test it
I understand some of the cards, like the STG1, are pretty ... esoteric
I bet elson's cards will be the next to work if they don't already
(he had to work out index stuff for lathe threading)
cool. still can't believe how powerful emc2 is. Very neat.
I think that too, it sure lets you do some neat things with an everyday PC
good evening all.
anything up or down with the mail servers. i haven't seen any emc mail since the 1st.
no they're fine
To: "Enhanced Machine Controller (EMC)" <email@example.com>
Subject: Re: [Emc-users] Asserting two signals from the same pin through HAL
Date: Wed, 8 Nov 2006 11:14:00 -0600
source forge archive isn't updating again. Is that what your taking about?
Roguish: you're set to "no mail" again because of bounces
yes your mail is unreliable somehow
unfortunately I didn't save the bounces this time
can you subscribe from a different email?
can't remember which address it's supposed to go to.
skunkworks: separate problem, but I hadn't noticed that
there are two that look like you - both are set to nomail
since you fixed mine - I have been getting them through my mail client - have not had to look at the archives.
Roguish: I can turn one or both back on for you, but if we get more bounces we'll disable them again
gotta a link so i can check which address is used?
Time for bed - night
One thing I have been wondering about for a while, in my case I have a gantry system where each side has it's own stepper, and I want to automatically sync both sides during the homing
What I did to have emc drive both motors in sync was to hook them both up to the same signal generator and invert the parallel pins
The problem with this is that they are considered the same axis during homing so I can't home them individually, if I could home them individually I could sync em up with homing and eliminate the manual tuning
Dallur: have you thought about using a common shaft for both sides?
the machine is already built
and the size means that the shaft would weigh in at 100kg
the table is 2.1m x 6.5m :P
the shaft would have to be quite massive so that the twist would not cause problems so I decided to have two steppers, it works great, just looking to make it easier
* anonimasu nods
see -> http://dallur.com/typo3temp/pics/0d330740e0.jpg
Anyone have any ideas with how I could make them sync up during homing ?
Dallur: it's not a trivial change, but it has been discussed quite a bit lately
here's a pointer (not sure how good it is):
have another axis defined in the ini (so that you could control it manually and during homing).
that will cause another joint be exported.
during homing you can make them home at once (jepler put in some changes to define shared switches and such)
they will be both commanded off 2 different stepgens during homing
once it's homed execute a small script which unlinks the second joint from the second signal generator, and link it to the first one
just my 2cents..
Thanks Alex, I will try that when I re-assemble (im having the entire base hot galvanized and chrome plating all running surfaces
alex_joni: jepler's shared home switch changes don't give you simultaneous homing
alex_joni: in fact if a switch is shared between two joints those are NOT allowed to home at the same time
say you have X and Y sharing a switch - X is sitting on the home switch and you home Y - Y will move the wrong way forever and crash
that the kind of thing the shared home switch code fixes
hmm maybe I'm wrong - there is a home-all message, but I don't know if it guarantees that they move together
forget I said anything :-)
cradek: with "home all" two axes that have the same homing order (they must not share a switch) will begin homing in the same servo cycle
well how about that
so I wonder what extra logic gantry homing needs
Just this once .. here's the log: http://www.linuxcnc.org/irc/irc.freenode.net:6667/emc/2006-11-09.txt
seems like there's a "wait" that has to happen
it seems like you want to do *each step* of the homing procedure in lock-step .. not just start together.
yeah maybe that's the rule
well still maybe not - imagine one of your switches has a sloppy release (say it's sticky)
you want to keep moving both joints until both switches are released when you back off
this is just a SMOP isn't it
the last move of the homing sequence needs to be one you trust to be the same on both joints
you mean the rapid that would be after synchronization?
no, I mean the last move on to or off of a switch
If you trust the switches to close at the same time, then you want the regular homing sequence, but in the first step you want to move the axes together but stop each one when its switch closes. Then you want to move the axes together until both switches open. Then you want to move both axes together but stop each one when its switch closes.
right, I was just saying there can be several moves that have to be done together before the 'important' move
yes I think that's right
the first and third moves are intended to fix a slight out-of-alignment condition that isn't so bad the machine can't move, and the second has to simply not make things worse
and for the alternate homing sequence (off-the-switch) you just do motions 1 and 2 I think
unfortunately, "home all" doesn't quite work that way
I'm not sure how home-to-index fits in here
trust the index pulse and stop each joint when it hits index?
just the same - after the 'important' move onto/off the switch, you keep going until you get an index
if you have an index pulse then can you start by moving both axes together to an index pulse?
all this assumes four joints, which gives us joints != axes, which is a problem
I'm pretty sure doing it with joints is right, even if it means we have to fix stuff to make joints > axes work
time for me to go .. talk to you tonight.
cradek: looks like a good idea to me
I did mean to use the home_all and send those two joints home together
but I think homing can be extended (maybe by means of additional ini entries) to handle it properly
yeah I was wrong about that, I didn't know they were guaranteed to start together
cradek: what you & jeff talked about
but jepler is right, it has to be more than just starting together
yeah it's really a SMOP
it's a HMOP
to fix it right I mean
I'm not sure I want to go there :(
this new hard drive squeaks
I have some high rpm oil
if one of us had a machine like that, jepler or jmk or I would SMOP it pretty quick
maybe someone could get one to fest
most of the things involved to fix it properly are not related to the gantry
or the gantry is not needed for those
it's true we could simulate it
* alex_joni is talking about joints & axes
ini file should have joints
one should be able to specify the number of axes and of joints
and how they map
both explicitely and implicitely (through kins)
then the current AXIS_* would be JOINT_*
I'm not sure if we could/should model the machine limits in carthesian too
or maybe joint would suffice (as it is now)
Hi all - I recently downloaded the Ubuntu/EMC file and with a little help from the folks on this IRC I was able to get it running. I have put this setup onto a separate hard disk and configured the disk as a secandary master. I am also usin BootMagic because I have a partioned hard disk in the primary master spot. Here is my problem: when the Ubuntu disk is set as the primary master I can boot Linux. I can not however get BootMagic to 'se
your message was too long and was cut off at " BootMagic to 'se"
Herriott: people in here are linux enthusiasts, but we really know our stuff around CNC & the software (at least I hope that)
you can find much better skilled people in #ubuntu
Ooops! I am not really familiar with IRC as you can tell. When I install the HD with Ubuntu alone in my PC it boots fine. When I install it as a secondary master my BootMagic won't boot it.Any thoughts?
Thanks - I'll look around
don't use BootMagic, use grub since it knows how to ... boot stuff
too late .(
I bet an Ubuntu installed to hda won't boot from hdb
not without changing the grub stuff
and probably something else too
maybe fstab if it doesn't use LABEL=
didn't see any that use :)
hmm.. just had smoke coming out of a 200G hdd :/
do you want to look at something?
I found a document on compumotors site - that has some Ziegler-Nichols info on it... And the formula for I and D are quite a bit differnt that what we have.
[19:46:21] <skunkworks> http://www.compumotor.com/whitepages/ServoFundamentals.pdf#search='ZieglerNichols%20method%20servo%20tuning'
It makes more sense
using the formula that is on the linuxcnc site - I got a I of .006 and D of .0015
which seems odd
heh, I had EMS come out of a harddisk once when I reversed the power plug accidently. not fun :(
skunkworks: try the other way and we'll update the docs
(EMS = electromagnetic smoke, the magic smoke that makes electronics work)
well - it seems odd though
Lerneaen_Hydra: yeah, I need to replace it now.. but I ran out of magic smoke
oh. that's not fun
squeezing the smoke back in isn't easy
I would get P=750 I=125000 and D=1.125 Seem odd?
I thought so
I actually think the first numbers are right
first number is the same in both equations
the first set
It works quite well. ( was using them last night)
your oscillation period is small because of no mass
setting FF1 properly really helped reduce my FE
we have FF2 now too, and I think I needed a little of it
what are your pid ff settings (just for refference)
P 80 I 160 D .13 FF1 .025
Z has a lower D .1
I remember the FF1 was very touchy but helpful
It will be neat to hook it to something and run thru the formula again
It would be cool also for you to try the Ziegler-Nichols method to see how far away they are from your settings
yes I plan to try that
skunkworks: I think you want more P initially to cause it to oscillate some more
wonder if you could put a bicycle wheel on your motor or something similar with some inertia
I think the Ziegle-Nichols method is meant to scale
ChrisSmol: you should have said hi chris
delivery of my micro mill pushed back one day :-( oh well, now it is scheduled to arrive on my birthday.
that's a nice present
if you never want to be disappointed with a birthday present, buy it yourself
now i am having buyers remorse about not getting the mini mill instead.
ChrisSmol: never have remorse about what you've done ;)
you had your reasons to chose that..
I want to get a kilomill
and a picomill
if it ain't teramill it's ok
I like millimill
4 bolts and a hub and I can mount it on the z axis of the gantry - so that might be the next experiment
couple of more questions - it has be decided that I should set the dead band to 0 during the first step... Now as I increas the p - should I move the axis (command it an inch or something) each time I change P?
you mean to try to get it to oscillate?
right - sorry
maybe you could just poke/turn the shaft
that is how I was doing it last night :)
just would be a little harder when it is mounted
Just going to have to experiment.
this looks good also http://www.machinedesign.com/ASP/viewSelectedArticle.asp?strArticleId=55300
Jymmm is now known as Jymmmmmm
[21:10:20] <alex_joni> http://www.metacafe.com/watch/251088/human_snowball/
[21:15:37] <Jymmmmmm> http://www.heartattackgrill.com/
[21:40:36] <cradek> http://msnbc.msn.com/id/15641470/
oh, well well well
how often are the senate/congress votes held? once every four years?
oh, that often?
yes. the entire hosue every two years, one third of the senate every two years
jepler or cradek, are you around?
SWPadnos: I'm stopping by for a moment .. what's up?
actually, I emailed you the question
answer at your leisure
(AXIS screenshots / copyright related)
(c) infringements...naughty naughty
* Jymmmmmm blames SWPadnos
I suspect that the person who takes the screenshot has copyright on that image, so I don't think it's an issue
* jepler checks
now back to our regularly scheduled work :)
this is saturday
for me at least
no it's not
it's friday! *cry*
it's Thursday here - don't mess with me
for me at least
I'm just trying to config this linksys WRT54GL router I got
Got linux installed on it
does it have some kind memory to install apps?
to act like a pyton, php server
I'm being stupid... I read 'kind memory' as 'kidney'.