another stupid question - how do you run hal commands when axis is running?
halcmd <command>, from a terminal
samco@samco-desktop:~/emc2-pluto/bin$ halcmd show
RTAPI: ERROR: version mismatch 531 vs 530
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
do you have run-in-place and installed versions of EMC?
then run ". scripts/emc-environment" from the run-in-place version you're using before using halcmd
it's a path problem, I'll bet
that worked :)
can I actually get into a command line then - so I don't have to keep typing halcmd?
k "keeps going" if you make a mistake, f means "use a file for input"
no file means use the terminal
and it even has completion, up-arrow command recall, and wildcards
like show *scale*
I see that the auto tune is setup on the pid.. I was just going to see what it did. Althoug I don't seem to be able to make it work yet
halcmd: setp pid.0.tune-mode true
halcmd: setp pid.0.tune-start true
you also need to set tune-effort, I think
6 float RW 0.5 pid.0.tune-effort
set already it looks like
I don't know much about it either ...
I know jepler was having problems with it at the fest on JonE's mill
When I set tune-mode to true the servo becomes unstalled
I had pretty good luck reading man at_pid
but setting the tune-start to true seems to do nothing.
Ok - I will look
if it's "done", I think you need to set it false then true to start a new tuning cycle
did you see "If no oscillation occurs, or the oscillation is too small, slowly increase tune-effort."
ah - man at_pid doesn't seem to exist
man -M dics/man at_pid
from the emc dir
or man man ;)
it exists for me...
do it in your shell with . emc-environment
the manpage or the autotune?
sorry - man page.
It doesn't seem to do anything
as I increase the effort - then it just starts spinning no matter what I do.
it did work for me... maybe it has broken since then
strange - jepler reported something like that (axis moved on way forever)
when I tried it (quite a while ago) the motor buzzed for about a half second, then it gave me (totally unusable) values
did you try to increase the effort?
I wonder what happens if you put in a negative effort value?
did it change the numbers?
yes it sets the PID values
I think I did have to increase the effort a bit before it would buzz
same thing - any thing below -.7 and it just start turning
maybe it's broken
is this something a bug report should be done for? I am not sure I am doing it right.
although I still think you're probably doing something different from what I did - I don't think it has changed at all
how are you running it?
I think I was using a full running emc with everything hooked up
I am just taking the lathe_pluto config and activating the tuning
a little extra allowed following error let it do the oscillation without erroring
with axis running
oh ok, I think that's what I did
Oh - I have following error set very high ;)
I just get into halcmd - set pid tuning mode to true and then the pid tuning start to true
ok I think that's what I did
I think I had to increase effort a few times though
the second I increase the effort above .7 - the thing spins whether I have the tune start set to true or false
and feedback is correctly connected to the PID?
I assume so - I have tuned it manually
it appears that cvs.linuxcnc.org is down (or detached)
if you set up P only, can you get it to oscillate?
using the Ziegler-Nichols method
I wonder if it's a +0 / -0 thing
I raise p until it oscillates - then get the period of oscolation - then calculate the i and d
it looks for crossings of the starting line, if it thinks it's on the + side at first, and it goes further +, it would never see a cross
SWPadnos: cvs is back
yah - I can mess with it but I don't know what it is doing ;)
btw keeping the mdi history is really really nice also
* skunkworks is just jogging the motor back and forth - back and forth
Next time I see petev on I will ask him
wow. concert tickets for Joan Jett, Foghat, and Blue Oyster Cult are $36.75 (one concert, all 3 bands)
whoah, where is it?
about 1.2 miles from me - at the state fair
that sounds really fun
[02:12:23] <SWPadnos> http://cvexpo.org/default.aspx
Willie Nelson will be there too
(not that I care much about country music)
cool - that includes fair admission too, normally $8 or so per day
ack - $10 this year
well, for the extra $26.75, I may just have to go see the concert :)
heck I'd like to see willie nelson too
cradek: it's a bit far for you
heh. he's enough of an icon that it could be a good show
well, you don't have to drive - no lathe to carry ;)
hmm I sure haven't heard of the rest
only $194 for airfare from Lincoln to Burlington (!)
oh yah - so a 440->110 volt 1kva transformer hooked to 110 - gives me 44 volts rectified. and lots of torque on these little servos.
* skunkworks was looking a micromills again today.
The one steve stallings had at the show was a cool little machine. only 299 from harbor freight,
I'm surprised, it seemed quite decent
note that the 440->110 transformer is still a 9A supply at 110->27.5 VAC
it would be interesting to try to make the best (pcb) engraving machine possible
a 40-50krpm (air?) spindle maybe
yeah and then give it to me for my birthday or christmas or some such excuse
routing isolations at 50ipm :)
you'd need some serious acceleration to do that
yeah - smallish motors, chosen for low inertiua (high accel) would be the best
[02:32:07] <skunkworks> http://www.harborfreight.com/cpi/ctaf/displayitem.taf?Itemnumber=47158
this motor goes from 0 to 600 virtual ipm in .5 seconds... granted - they have no load. :)
that is actually 3600rpm
spindle speeds look funny - you would think the bottom end rpm would be different between the high and low range
only 4 inches of travel one direction also - which is a but on the small side. but a nice size table
I'm surprised it can't reach all of its table in Y - seems silly
that is why one of these is also tempting http://www.use-enco.com/CGI/INSRIT?PMAKA=201-2536&PMPXNO=953096&PARTPG=INLMK3
that is a nice sized table. The shorter travel keeps you from milling off the clamps. ;-)
(speaking of the harbor freight unit)
"the backlash on those can be measured with a car odometer"
ah - it would have to be hit with a ball screw hammer
emc definatly need this formula http://en.wikipedia.org/wiki/PID_controller#Ziegler-Nichols_method
not this one PID:Gain=0.6GU, Reset=2/PU, Derivative=PU/8
Time for bed - night
Just this once .. here's the log: http://www.linuxcnc.org/irc/irc.freenode.net:6667/emcdevel/2007-06-21.txt
I thought I had just replied to an email a few days ago on the list.
I go to the link that they show in the email - enter our mail server IP address and is says not listed
I did the same thing
maybe it's already off the blacklist
and hasn't made it back to sourceforge yet?
(tried to send this email this morning)
it is on the pid autotune.
nope - can't reply either. I will talk to our email service :)
jepler: had a dream about you last night.. The best I can tell is you where re-shingling a building - and thowing the old shingles at me.. I wonder what that means.
skunkworks: how was my aim?
I could consult "Zolar's Book of Dreams" for the answer
it has everything
I just got the pluto hooked up to a small servo to play with. Cool little board btw - nice work jepler. I hacked the lathe_pluto config as a starting point and did a quick ziegler-nichols tuning session (increase P until oscolates - measure period - calculate P, I and D) That worked great for a newbie like me. I was doing a halcmd show and noticed the auto tune pins. I thought I would give it a try.
the board isn't mine, just the firmware :-P
[14:37:14] <skunkworks> http://www.cnczone.com/forums/showthread.php?t=39304
strange that after deciding to get rid of PDM because nobody would need it, I got e-mail this morning asking how to interface pluto to +-10V analog servo amps
I thought you decided not to get rid of pdm.
the drive and drive is very quiet. pretty cool.
The drive and pluto is very quiet
see jane run
I think jmkasunich_ answered this question on the emc-users list: http://article.gmane.org/gmane.linux.distributions.emc.user/2183
There - yes - our mail service had problems
skunkworks: could you write some short instructions about how you did ZN, and which of the ZN formulas is right for emc?
that would make a great wiki page
I think alex_joni had wrote one up.. I could not find it. I think it is somewhere on linuxcnc.org/something.
not on the wiki for some reason
alex_joni: you around?
If not - yes I can do that.
AH ha http://www.linuxcnc.org/docs/2.1/html/motion/pid_theory/index.html
That is the wrong formula I think - it is the one posted I posted last night. It makes for a very mushy servo
THis seems to work a lot better http://en.wikipedia.org/wiki/PID_controller#Ziegler-Nichols_method
it probably depends on what derivative of position the PID works on (velocity, torque, current, or voltage)
again - above my head. :) the last time I did it I used the formula like the one in the docs. I remember having issues with it just not working very well at all. I searched again this time and happened across the wikepedia entry and used that one. It seemed a lot better. - actually was more in line with what cradek had for setting on his lathe.
heh - as long as you can find one that works for you :)
P=660 I=37714 D=2.88 vs p=660 I=.0275 D= .004375
yeah, I of .02 can't possibly be right
that's what you get when you follow the emc docs?
my P of oscolation was 1100 this last time and period of .035
I think the pid_theory document was taken from wikipedia .. maybe the formula was just typeset improperly or a mistake was made in transcription?
I don't see how you could have a period of 1100 (or am I misreading that?)
or you need P=1100 to get period = 0.035?
that's the lowest P gain that causes sustained oscillation
what cradek said
ok. that sounds like a very high frequency to me
it is. Nothing is hooked to it.
if you wanted a board to turn a PWM signal into +-10V analog, what kind of power do you imagine you'd hook to the board (e.g., regulated +-V, unregulated +-V, line-voltage AC, or low-voltage AC)?
reasonably well regulated +- 12-15V, if you're using a D/A converter
if you want to make the 0-5V PWM signal into +- 10V, you obviously need some op-amps and other signal conditioning
yeah obviously you ultimately want well-regulated voltages on the board, but I'm asking what kind of supply will be available in the cabinet..
if you want to use PWM+dir (harder, I think there are discontinuities around 0), you still need signal conditioning
I think I understand how to use op-amps to turn up/down PWM into an analog signal, that's not what my question's about
there's +- 12 from a PC power supply, if you don't mind tapping into the motherboard connector
seems like our pid is parallel/non-interacting form, which is not like "standard form" (wikipedia)
I wonder which those ZN formulae assume
cradek: I was wondering that also.. But I have not found any info on it yet. Parallel vs series (serial) whatever
SWPadnos: hum, single-rail DC? that's far from ideal..
the 24V supply would need a DC:DC converter to get the -12
(or some isolation - you of course don't want to just use 12V as ground on the board)
if you have +-10V servo amps there must be a negative rail in there somewhere
servo controllers (and drives) can generate their own negative rails
there are single chip isolated DC:DC converters for not too much $$
cradek: you should try to do it manaully with your lathe - see what numbers you come up with. (Ziegler-Nichols method and the wikipedia formula)
I think I'll make my board require well-regulated +-12-15 since that's easiest
cradek: it looks to me the block diagram on the wiki is the same as the emc pid block diagram .. So maybe that formula is correct.
skunkworks: I think the emc pid is "parallel/non-interacting" but I suspect ZN is for "standard form"
[17:27:46] <skunkworks> http://arri.uta.edu/acs/jyotirmay/EE4343/Labs_Projects/pidcontrollers.pdf
I have not come across the formula that is on the wiki yet.. (which seems to work for me)
page 34 is interesting
Z-N controls well, but tracks reference changes poorly ...
"It is usually recommended that Ziegler-Nichols be used for parameter tuning if 2<KpKu<20"
0.035 * 1100 = 38.5, so Z-N wouldn't be appropriate for the unconnected motor
I saw that :)
mmm good lunch
someone re-wrote the ZN algorithm after we incorporated an older version into our docs: http://en.wikipedia.org/w/index.php?title=PID_controller&diff=84989250&oldid=83987940
The thing is - so far.. I can only find that formula on the wiki. All the other ones are similar to the one in the emc dock.
this is interesting: If the valve saturates, you will not be able to get Ku. In this case use another method to get Kq ("q" stands for quarter). Adjust the P-only gain until you have quarter-cycle damping. This is a measurement for a second-order, underdamped system. On the response plot look at the first two humps ( the first hump is where the %OS is measured). Kq is the value of Kp that makes the height of the second hump 1/4 the height of t
[18:14:23] <jepler> http://www.calpoly.edu/~fowen/me422/ZieglerNichols.html
this page gives this formula: PID: K = 0.6 Ku; R = 2/Pu; T=Pu/8
I think that would be right for "standard form" pid
our old docs and old wikipedia have the middle term as Pc/2 instead
hm, that's not the same at all
there are at least 3 formulas that I have found.
Pc/2 ~ time, where I think we want dimension 1/time
it would be nice to find their original paper
so you think the difference between R=2/Pu and R=2 Kp/Pc is the difference between the series and parallel PID methods?
I can see your point about Pc/2 == time, but I == 1/time
I saw somewhere that ZN did their work with a hydraulic system, and those tended to be series
[18:22:18] <skunkworks> http://arri.uta.edu/acs/jyotirmay/EE4343/Labs_Projects/pidcontrollers.pdf
what I posted before - has both parallel and series formulas
nothing like the formula on the wikipedia
sorry - page 39
yeah they have I term = .5Tu for parallel and 6/Tu for serial!
* cradek goes back to tuning by gut
* jepler goes to eat his dessert
* skunkworks ummm goes back to working I guess
original paper: http://www2.eie.ucr.ac.cr/~valfaro/docs/Ziegler&Nichols.pdf
(must have been typeset again since 1942)
I wonder why all the graphs are curvy
It is as artsy as scientist get I guess.
maybe they're air pressure graphs and they wanted them to look like balloons
their parameters are apparently "Sensitivity", "Reset Rate", "Pre-Act Time"
Reset Rate = 2/Pu
looks like the little servo will take 11 amps :) poor thing. (that is at 20 volt - what the supply sags to.
stole dads clamp on dc amp meter