perhaps someone who is better at searching the archives than me could find it :)
so yes to weights and the way to keep the hotwire tight
Yeah, I remember that too. he setup a special "end-suspended table for it
[00:00:54] <JymmmEMC> http://www.hotwiredirect.com/files/videos/TaperedDemo_High.wmv
I'd expect a bow to significantly limit the maximum work area
that is one serious foam cutter
kind of like a coping saw
I have cut 5'long tapered wings using a template to cut around ... one end of the wire was screwed to the wall (infinity point) and the other end was hand held to trace around a template on the end of the foam blocks.. a couple of clip leads to put juice on the cutting part of the wire
When belts are used, like in a laser, is the head physically attached to the belt itself?
nm I was thinking of something else
depends, check this out : http://www.oemdynamics.com/#
I have been wanting to build a machine with one of these linear harmonic drives for a while now.
I can't afford anythin with the words "linear" and/or" hamronic" in it's title.
But, I can raid their dumpsters as they are just up the street from me!
it is actually quite simple. They say they have a patent pending on the technology, but I don't think that it is patentable.
I don't even know where they are.
same page you linked to at bottom
or Santa Clara?
3200 Patrick Henry Drive
Santa Clara , CA 95054
[00:13:26] <JymmmEMC> http://maps.google.com/?q=3200+Patrick+Henry+Drive+,Santa+Clara+,+CA+95054+&ie=UTF8&t=h&z=16&iwloc=A
I have looked at all of animatics pattents, both active an pending, the only technology they have a claim to is the integration of the motor in to the slide.
fantastic gear reduction with very little backlash.
tomp is now known as tomp3
I have a drill chuck with the only markings being 180 J6 -- how hard is it to verify that the J6 means Jacobs taper 6?
If it looks like a duck, and it qwuaks like a duck, it's gotta be a horse!
interestingly, J6 is smaller than J3
sound like wire gauges... the larger the number, the smaller the diameter
it would sound like that if J6 wasn't the only exception
otherwise, J0-J5 increase in size
japan 6 ? dunno if thats a spec but jacobs likes to say jacobs buz peeple would buy jacobs ( not j's )
everyone uses jacobs taper for their drill chucks
oh,i thought albrects did not, and shank mounts did not
may be of help http://www.newmantools.com/tech/taper.htm
tomp is now known as tomp3
is it like this ?
TAPER# DIAMETER DIAMETER LENGTH
6 .67600 .62409 1.00000
the albrechts I have all have JT arbors
they are probably various ages, but not real new
or, jacquard taper maybe
heck I think they may even say the JT taper number on them
the above spec is true then if if the j means jacobs
a chart for the jacquard if needed http://www.wildagroup.com/jc22.asp
only about <20ft left of wall to build.
skunkworks, hey... hi, how tall did you build the walls?
they are 10ft
:} excellent height.... no fighting with the bridgeport
actually 10ft + the curb (between 3-6 inches)
tall enough but not too big to heat
how is the h-bridge?
getting close... I am working on software to test it with.... any tricks you used? resistive loads? shorted tests?
I always use servo. Stalled for most tests.
never shorted the output. (was too afraid)
yea... good chance of a bang! from something
I have a 500w 24v brushed motor to test with.... should be good up to about 20amps
I will use the current limited bench supply until I can verify my current limit logic is 100%
I was running 20a thru a 4.something amp 90v dc motor.
actully - the shaft got warm first. :)
the nice thing with big motors is they have some thermal capacity.... the big thing is to keep current spikes below the magnet demagnetization level (which nobody really tells you what it is)
but should be at leats 8 to 10x rated running current
bbiab... dog requesting service
Pretty sure my chuck is a Jacob's taper 6, could be wrong
but I guess tomp's not here to argue with about it
I'm thinking a keyless chuck may not be the best match for a lathe though
* LawrenceG back from dog duty
my son started walking the dog. second time, the neighbor is out walking the dog and yells at my son because he "always" walks his dogs at that time and they don't behave around other dogs
tapping heads rock
* jmkasunich just tapped 108 holes in 20 mins
manual tapping head?
procunier or however you spell it
in the drill press
it was actually only taking me 4 seconds to tap two holes
I have one of the collet tapping heads
the rest of the time was changing parts (54 parts)
that has a quill
cast parts, so the chips break nicely, and thru-holes, so they just spray out the bottom
I started at 500 RPM and just kept going up
by the time I finished I was tapping at 1100 and retracting at 2200
I was going to say, 4 seconds is not much time
1100 RPM is 0.9" per second at 1/4-20
the part thickness is about 7/16, I had my depth stop set to make sure the taper of the tap went all the way thru - probalby about 0.9"
so 1 second down, 1/2 second up, move over to the next hole, repeat
Last time I had a lot of holes to tap in aluminum, I chucked a tap in the hand drill and went to town. 10-32 into 1/8"
nice - but it doesn't reverse as fast as a tapping head
I wouldn't do it again
stripped a few?
not very many
I've just had a lot of cups of coffee since then
a guy I knew tapped 3/8-16 into cast iron (the side of a milling machine) using a milwaukee drill
I've done 3/8-16 into a cast iron lathe faceplate on the drill press (no tapping head, and only about 100 RPM)
last time I tried that, I had to order a tap remover from McMaster
Then again, don't buy taps from Lowes, they should pay you
detroit just put in a new bike path with "no bikes" signs at one end
[02:51:54] <Valen> http://www.youtube.com/watch?v=bj4lj6YSwzg
top gear's space shuttle was better
I thought they routinely went higher than that
that thing isn't routine
big rockets are fairly routine
that weight may not be
the guy videotaping it did an excellent job
has anyone ever taken a jacobs taper chuck off? Should I buy the official wedges?
do you have any unofficial wedges?
they are called screwdrivers
I've removed a couple - IIRC, one wasn't bad at all, the other was a mother
I think the 2nd one had been put on with red locktite
we wound up cutting the arbor off, turning the chuck around, and boring it out
of course it works when you don't want it to work
when there was about 0.005 of arbor left, we started peeling it out of the inside of the hole
open the jaws all the way and look for a hole in the back - you can usually just drive it out with a pin
if there is a hole
or, I made a wedge out of CRS and it has lasted for several removals so far
yes if there is one...
if you have a press, steady pressure on a pin will work better than a hammer
bummer, no hole
I suppose the $7 for the wedges probably is not a bad investment
I guess the nameless chuck I have is actually an Albrecht, at least it's a real model number
ok, that's funny, now that I googled that, I see the Albrecht name engraved on the side
two screwdriver method worked fine, don't think it was ever really seated
whoah, it must not have been on right - check for damage
I don't think it was ever used
ah, good in your case then!
I'll look at the surface though
are you putting it on a new arbor?
I like to clean both parts with alcohol to make sure there's no oil
that's an idea
also, look for any lint or grit
do you do anything special to seat the taper?
just clean carefully, and then whack it with a hammer a few times
i used logarithms for the very first time for a real problem today
it was bizarre
did you use a slide rule?
now you're special
what was the problem, don't tell me control theory
i mean i am kind of a math neophyte, so i didn't think there were many places to use them in the real world
no, somebody asked how many fills they could get on their paintball hpa tank from a 3000 psi scuba tank
i only work on totally irrelevant and pointless questions.
I just learned not to look at my saved orders on McMaster Carr's web site
deletes the current order
ouch, I figured you meant that you didn't like to see the totals.
yeah, I'm loving that little feature right now
so hows things peoples
oh yeah, and top gears space shuttle didnt actually work
it crashed ;->
(and then they faked the explosion, bastards)
space shuttle worked pretty well the way I look at things
I figured it was going to blow up on the launch pad
much like the real shuttle
real shuttle waited for a respectable altitude
i guess i was more decrying the widely reported ramshackle design process around the shuttle
nothing wrong with turbopumps
on something that size anyway
they seem to have had some problems with them though
rebuilding them every flight
they do that with the whole shuttle
they replace the entire wiring loom
its not so much "reused" as "refurbished"
the pumps were not designed to be wear items.
they were designed to last the life of the engine
pretty sure the wiring wasn't either
that's what i'm criticizing
hmmm i think you need to critisize the managment without pulling the enginers into it
they turned out a work of art,
given the moving goalposts they were handed
considering that we did it before and it worked great on bigger, badder spacecraft
the whole thing is stupid
i'm not so sure i can grant full amnisty to the engineers
rockets are the way to go
it wasn't originally meant to have wings and half the other problems it was lumped with, but the air force said they needed to be able to launch , catch a russian satellite then fly halfway across the country on the way back down and to do it all in one orbit
but in order to sell it they said it would do all that, and do it once a month
but they wanted the shuttle
yeah, they wanted something that could do everything
not a truck
a series of tubes
and now they are screwing themselves over with ares and the return to the moon thing
reusing existing difficult to use stuff
poor space program =(
give armadillo $4bn and they would build your moon base included in the price
maybe proving it was a bad idea was worth the cost
give Xcore the same and you get a mars base as well
and you have only spent what has already been spent on the moon project that barley has any hardware and just got chopped from 6 passengers to 4
let me google that for you is a brilliant site
I've never had a reason to use it though
i think there is also the less polite version
justfuckinggoogleit or something close to that
I think lmgtfy is pretty rude
which is why I regret never using it :)
i used jfgit
i got in trouble from the mailing list admin ;->
i have to go in to college and try to convince someone to strike the grades from two classes from my record
hopefully that goes well
Poinca348 is now known as Poincare
dammit i wanna go play with my EMC box and get the encoders running but i have to fix a damn software bug
how do i close a program that's frozen ? (won't close)
ps -ef|grep progname
kill -p [pid of prog]
oops kill -9 [pid of prog]
or killall -9 programname
sudo reboot; programname
(dont do that one)
sudo kill -9 Valen
ahh cmon its only a little worse than telling somebody about alt+F4 as a shortcut to open some kind of easter egg
i'm tyring to kiil vbox...neither of those working
kill -9 should do it
how do i get the pid ?
"neither of those working" <- pretty useless report
if you run top you can see if something is chewing CPU easily and the first column is the pid
q to quit top
thanks..top did it
but yeah the more generic one is archivists
things can hang without using CPU
and its best to do a kill PID before a kill -9 PID incase the program can be made to gracefully terminate
first for me to use kill and top...kill i knew a little about..never heard of top
top is the bomb
on an EMC machine you might be interested in iotop as well to give you an idea of anything doing disk access
Might wind up making a power controller for this mill conversion
to use those 40A 90V motors
anybody used an OSMC board?
hi, is there a guide to making a model in vismach or do I have to make do with the comments in vismach.py?
I think thats all the docs there are at the moment
I thought so cos I'd been looking every, thanks anyway
see the various models like hbm...
yeah, I trying to figure it out from the existing models at the moment
a minimum of the components that you need to get a working file would be quite nice
well you have those as it works :)
time I did one to match my machine
hmm, is it enough to just copy the py file into the usr/bin folder or do I have to do more to let hal know where it is?
are you trying to run live rather than sim?
I don't quite understand
in halrun I'm trying to use the loadusr command
I think at the moment I'm failing at creating a simple python-script
SWPadnos, I filed a feature request yesterday on the max_acceleration and I had a thought that might work, define it as a equation,scaling the acceleration down as the acceleration length increases from said # to said #
it's not simple
if it was I would do it
me too :)
I made it sound simple though : )
we discussed the problem somewhat last night, and there are issues with blending (for example, accel must be the same for both the blended segments)
also, the trajectory planner requires that it be able to stop by the end of the current segment, since it doesn't know that there's another one coming. if accel were to be reduced for some reason during a move, that constraint might be violated
multi/many-segment lookahead might help
but there's a more generic use case for variable accel, and that's for machines where accel limits (and vel limits) might be dependent on the current pose
which causes other problems :)
yeah. like I said, it's not simple
I will read the log from last night
we might have been on the devel channel, I'm not sure
thats a nasty one to do
I wonder if it'd be possible to genericise it as a force/inertia type thing with the bits its attached to having force limits on it
the HAL way would be to make the accel/vel limits input pins to the motion controller, and let some external HAL component decide when and how to change them
although that'd require EMC knowing alot more about your machine than a bunch of axes
it's not independent per joint - you could have one joint that depends on the position of another for its limits
as an example, consider a robot that spins, but has an arm that can be extended
passing the buck gotcha ;-> still probably the only really generic way to do it anything else winds up super complicated to handle all possible use cases
the rotational inertia is higher when the arm is extended, so the rotational axis can't accelerate as fast
or split it up into top middle bottom of the move ,scale down and up
thats what i was thinking, if EMC knew the mass/inertia of each component in the system, it can work out the forces in the "parent" components put on it by the children and limit them to what the parent can handle
that's one way to do it
though tool changes and work changes would change the inertia
some joints move the work, others move the tool
a simpler example is lifting a box with a 2 jointed arm, if you lift close to the base the force is pretty low, if you lift at the max extend of the arm you have lots of force
thats what i was saying about it putting alot of complexity into EMC
that's why we'd stick it into a separate component ;)
loop limit indicates acceleration loss and peak torque at a joint
similar to the kinematics modules (or part of them), you'd choose the accel model you want
Gut feel is that each "type" of machine would need a seperate module
yeah, like kinematics ...
didn't know it had that lol havent got that far
heh. you can run simple machines like all the other controls, or hexapods, SCARA robots, PUMA robots, and other 4 or 5 axis machines
or more, those are just the ones I remember at the moment
yeah saw the hexapods running on emc
I went "cool" and kept going lol
gotta get mill working first
I'm wondering if an OSMC board can be uprated in terms of voltage to run those 90 volt servos
mine has cut metal this morning
hasn't yours been cutting metal for years?
and shown me I need better curve generation
in terms of hard or software?
you roll your own G-Code dont you?
changing parameters to my escape wheel, straightened a curve :((
change it less ;->
I need to get the curve generating maths right
is it the implementation in Gcode or the maths behind it thats the problem?
might be able to help with that
if you want it o course ;->
Im wondering if I should just cheat and use apt
whats apt in terms of cutting metal?
i'm guessing you dont mean the package manager?
collected together here http://sourceforge.net/projects/aptos
you need to press keys other than enter man ;->
heh i normally use shift to come out of that, been burnt a few times with it doing some unintended action for most of the other keys
alex_joni: aj12 seems to work great. (installed on one - booted on a bunch)
i was about ready for ctl + alt backspace
I have wound up rebooting computers that havent responded to the keyboard
with the power button
as I did last night
only to realise that the keyboard (wireless) had lost synch
luvely bug that was found in axis last night
yup open the file open dialog and click the small box for hidden files (not the text)
is it bad?
skunkworks: seems there's a small problem with it
sounds more like a bug in ubuntu/gnome rather than EMC
oh its sorted and presume updates "real soon now" TM
can you check: sudo apt-get update (from a terminal) ?
skunkworks: it probably will give you a "duplicated entry error"
valen just dont do it :)
skunkworks: if you get it check if you have both emc2 in the regular /etc/apt/sources.list and in /etc/apt/sources.list.d/emc2.list
tried it in other similar dialogs?
freezes the kb here
look at last nights log in here
I was fixing one in some software i wrote ages ago
turns out it was MD5summing a paticular reccord rather than the record the person was working on
mildly wrong :)
that was all fine until somebody deleted that particular record :-<
caused the program to crash in 3 states
alex_joni: will do
So quick (i hope) question, where can I learn techniques to write fast c++ code, and implement that into python?
if I understand your question, the docs for extending python with c/c++ are here: http://docs.python.org/extending/
take a look at cython its meant to make doing that kind of thing easier i understand
Great, thanks cradek. However I'm also trying to understand how to write code in c++ that is fast...I mean optimize some calculations.
thats harder to give generic advice?
sounds like you should think of that as an entirely separate question: how to write fast C++ in general
what are you doing that python isnt fast enough for?
and have you tried psyco on it
I wrote a geometric constraints solver using python, psyco didn't make it any faster.
writing a fast program is pretty much the same in any language: watch your algorithmic complexity, and if all else fails, profile
if your algorithm is O(n!) you don't have a language-specific problem :-)
psyco should speedup pure algorithmic code dramatically
So the slow parts of the code is the actual math.
thats really what its best at
* archivist seen different versions of fast
so maybe I can ask a more simple question, will c++ calculate "sqrt(x^2+y^2)" any faster than python?
possibly but I wouldn't bank on it being by much
Jon_geo01005: use 'hypot'
can you pastebin or something the code in question?
it feels to me like you probably have a looping/function calling issue if your "optimisation" is over something that small
You will have to forgive me. I have never been taught how to optimize code.
maybe your algorithm can be improved
I'm sure it can.
how much too slow is it? 2x? 100x? 1000x?
its not really something that can be taught
you might get 2x by switching languages, doubt 10x
its experience and some tricks
it's not magic
you can show somebody how to find slow bits, not how to make them better
nah good techniques can and ar taught
in part, that's why there are CS degrees
I spose, It just seems like something that is really "creative" to me
I spose there are different levels
I moved some code from php and one hour to C in a minute
archivist: haha php
interpreted to compiled is worth a lot
horses for courses ;->
true, but thats not really "optimisation" though is it
python is the interpreted slowness as well
its pretty good in that regard
not as good as C but not "dog slow" ;->
depends on the job I could use function pointers in C but only a kluge in php
I had it processing text files at 40Mb/sec (disk rate limited) on a 2.4Ghz processor
pulling about 60% CPU
stuck psyco on it and dropped that to ~20% or so
I once made a machine controller in qbasic. ;)
what pasetbin is best, sorry never used it.
[14:03:19] <cradek> http://pastebin.ca
I saw a guy at my highschool make a program in qbasic that actually directly accessed the frame buffer to draw circles and then to smoothly pan them across the screen
To optimize, find your loops, then do ad much pre calculation as you can outside of the loop. Also find things that are calculated more than once inside the loop. Do the calculation once and store the result in a variable and use the variable.
minimise function calls within the loop section as well
crice: true for small speedups, but none of those change the algorithmic complexity
and buffer variables from foo.stuff into local variables
basicly work reduction, especially any repeated work
if its a tight loop the function calls can be a killer
They do if you simplify.
so I profiled the code and this section takes the most time: http://pastebin.com/d49ce6a47
I see the algorithmic stupidity in #mysql everyday
(pastebin.ca is just a blank page for me)
that should all be pretty fast
Jon_geo01005: we need to know how and why calc() is called
in a loop that gets called 1000 times, every instruction that you can remove from the loop saves 1000 instruction. And yes, subroutines are killers because they hide the code. It is good to put a timestamp printf before and after the loop. Then you can see what your changes are doing.
you are using a lot of dotted access
that will be better compiled
calc is a member of a line class. it calculated the values needed to constrain lines at an angle, vertical, horizontal and so forth. So that code is run about 1500 times to solve one set of constraints.
on the subject of eliminating function calls to increase performance (as a micro-optimization): http://emergent.unpy.net/files/sandbox/smalldifference.py
[14:08:57] <skunkworks> http://www.electronicsam.com/images/KandT/xyz.txt
those 1500 calls take 50ms of the 93ms for the code.
microoptimizations I'd apply to calc: load self.p1.x and so forth into locals instead of repeatedly writing it out in full
is dotted access bad?
it is slower
use hypot(y,x) instead of sqrt(x**2+y**2)
you need to trade that off against the cost of doing the task
ok, I have also found a way to eliminate the atan2 call.
I'd try unwrapping this function call if its that critical
stick it in the main loop code
before any of these microoptimizations, make sure you really REALLY need to call it all 1500 times
as to the dotted access in that case its 50/50 as to if it'll be a net win, you aren't re-using anything in it that i could see so it could be more costly
all of the things suggested, together, won't give you the 10x speedup you want.
yes, the stuff I'm suggesting will probably be a modest speedup
So what I'm really doing is running a non-linear optimization routine to solve a set of non-linear equations.
Yes, you can sometimes get speedups you caching the result of a calc, then if the parameters match a previous calc call, just return the previous numbers.
unwrapping it is probably the fastest thing to try
the optimization code it's self is about as good as it gets.
easiest thing to try rather
take the code out of the function and stick it into the outer loop
Hmm, so going to c++ with these kind of calculations is not going to have lots of imporovement?
You can sometimes use the calc to pre compute a table of results and store them in an array. Then just lookup the answer in the array. A lot depends on understanding what the code is doing.
c++ will improve it, but if you need to stick it into an existing python program your not going to get a large benifit
jumping to an external module can be quite expensive
I reckons try the stuff suggested here first it'll probably make quite a bit of difference
do you have the outer loop that this is in?
any reason why psyco didn't make this any faster?
at a guess, most of the problem you will be having is getting into and out of the function
I am not to well versed in Python, but isn't there a way to pre-interpert the code to byte code to speed it up?
thats done automatically when you run it
that's the point of trying to do it in c++ - pre-interpreting (ie, compiling)
a few more micro-optimizations:
in a loop that tight most of these arent micro ;->
it's possible to precompile python-code
1) self.p1.x-self.p2.x (and y) are calculated more than once
so is it only with things like string handling that moving to c++ improves performance 50x to 100x?
once to do mag, again when scaling
do that once, put it in a temp
that's usually what happens when you install python libraries
For most languages, converting from byte-code execution to compiled execution will give you a 20 to 200 times improvment. But you lose a lot ease of development.
2) make mag 1/(what it is now), and multiply by mag when scaling
python execution time doesn't change for byte compiling
crice: not necessarily
python internally byte compiles everything
there's not a huge speedup there, but I think a multiply is 3 clocks and a divide is 39
or something close to that
crice: there are a few good languages out there that gives you both
if he caches mag it'll give a boost as well
by using byte-compiled files, which happens implicitly for everything you 'import', you trim a tiny bit of startup time but don't alter run time
Vq^: yes, that is true, that is why I said most.
crice: sorry, missed that little word :)
np, you were correct
is ** or ^ faster?
in some languages there is a difference
Valen: ** and ^ perform different functions
Valen: if we're talking python then they don't do the same thing
* Valen has found a hole
in his knowings
Valen: ^ is bitwise xor in Python
that would have been confusing
looks like x*x is faster than x**2: python -mtimeit '2.**2' vs python -mtimeit '2.*2.'
I thaught it might be
i rember in Visual Basic ^ was way slower than *
sure. the POW function likely does a log, multiply, exp sequence
so you get rid of log and exp if you just multiply
That is another thing. I am not sure about python, but normally, if you can do it in integer math, it will be much faster than float math.
you have an unhandled case in there too Jon_geo01005:
that's less true these days
the floating point units in modern x86 CPUs are almost the same speed as the integer units
theres more of them too ;->
the main caveat being that the values are larger, and you do need explicit load/unload operations to make the numbers available to the FPU
(larger meaning more bits)
Yep, I am over the hill.. :)
in Haskell ** seems to be faster than ^
^ is for integer exponents and ** for floating point types
I still do 8-bit microcontroller work, so I have to deal with that stuff now
but not on a PC any more :)
[14:29:56] <Valen> http://pastebin.com/m7fa8b54e
was what i got
I am running python on a 200mhz PDA
and i had to roll my own binary search algorithm for a 10Mb text file
rather proud of that ;->, no psyco and i'm getting 10 lookups per second on it
doing an average of 16 jumps within the file
(not enough memory to stick it into ram, and no compatible databases)
arm i believe
Hmm, well I made all those changes and it doesn't seem to help my overall performance.
ew 10 per sec, is that in syrup
Is it just the fact that the function is getting called 1500 times, not really the time to perform the calculations that is slowing it down?
do you have 1500 elements that need that processing done?
would c++ improve that?
profiling is the only true answer
its in python archivist its not meant to run on 200mhz ARMs
no idea without seeing the caller
Did you try the mtimeit before and after the loop that calls calc?
you need to see how long it is taking you to do the calculation and how long its taking to call the function outside it
What numbers did you see?
like i said, its pretty easy to just unwrap it and put it into your main code to try
I think cradek mentioned that this code snippet, in isolation, is not enough information to make good recommendations on how to decrease execution time
a few times, yes
thats my lookup code http://pastebin.com/d634c90c5
its not for "external consumption" so its still pretty messy
IMO everyone is asking/answering the wrong question (how to speed up calc())
unwrapping the "ParseInfoLine" function took execution from 7hz to 12 ;->
the amount of math being performed is tiny, so it's quite obviously not the actual calculations that are the problem (there are only about 20 operations in that function, so even if each one takes 100 clocks, that's 2000 clocks, which should mean you can run the function a million times a second on a 2 GHz CPU)
yeah thats basically the consensus, the problem lies elsewhere
So it is quite likely that the problem is in the rest of the program.
paste the calling procedure
it could be the function calls themselves
Valen: is it a large program?
its a barcode scanner
does an offline stocktake
jeplers "smalldifference" program shows that each function call/loop takes slightly less than 1ms or slightly less than 2 ms (I'm assuming that's for the entire 1000 passes though)
Valen, ooo can I steal your code
that bit or all of it lol?
SWPadnos: right, or around 1us per call
[14:40:47] <Jon_geo01005> http://pastebin.com/m184dfb47
1 or 2, depending
This is the class that calls that functions/
Valen, Im just getting some bits to try a stock/location database for archives
Valen: what does it do? is there pattern-recognition involved for example?
in the setParameters function
Vq^: It takes in the barcode, then looks it up in a 10mb text file, and returns the info about the product
Jon_geo01005, try replacing the calc() call on line 57 with a call to a do-nothing function - just calculate a square root or something like jepler did
tomp is now known as tpmp3
archivist, if you at all can a database is the way to go lol, There is a verification function about the same length to make sure that thing works
I suspect you'll find that the iteration over self.lines is the culprit (though I'm not a python expert, so I could get corrected very soon :) )
hmm, that is difficult because the number of times the function gets called depends on the values set in the function.
valen databases is my thing :)
Valen: doesn't sound all that complicated, could be interesting to port it to a language that is easier to compile to native code
in the code you pasted, calc gets called exactly once for each item in self.lines
it was the first real "computing" problem i've needed to solve
I've done all sorts of XMLRPC database and such like things
never anything you would find in a computer science text book
looks like the 5i20 sample config works (both init and done led's went off) and axis started. http://imagebin.ca/img/z0vrLSPy.jpg
archivist did you want the interface more than the back end?
valen slow response from me is Im in #mysql answering questions as well
Jon_geo01005: you seem to be doing alot of repetition in that setParameters function oo
hey heres a question for ya
got a mysql multi master replication thats been running in a split brain mode for ~6 months
now i need to merge
currently planning on dumping to files then load data infile, ignore duplicates
I avoid multi master because the application needs to know
and crossing my fingers
fwiw my machine does 1500 calls to o.calc() in 20ms, and with microoptimizations it takes 12ms. http://emergent.unpy.net/files/sandbox/jg.py
Its mainly a read only work, and its mainly done to reduce the latency for a large group of users in an office
the split was between the office system and the colo system that the interstate people use
you could run some sql to see where problems are
(so for those who are counting, that's 8us per calc_microopt() call, or 1/8 the hypothetical maximum speed SWPadnos suggested)⎋
I was in the process of loading the 2 into seperate databases then for the "dynamic" tables doing an insert into select that checks but i figured the load data infile would be easiest
steves_logging is now known as steve_stallings
(oh on rereading I see I misinterpreted swp; it's 800x the theoretical minimum)
hrm I spose i could look to see at what point the replication stopped by seeing when the duplicates end, then look for duplicates after that date
SWPadnos: I ran this code http://pastebin.com/m15068b24,
and it took 15 ms.
so it is quite likely that all of these function calls are accounting for a large portion of the time.
Valen maatkit has some utilities for replication test/fix
Jon_geo01005: did you try the version i posted?
archivist, looks interesting
Valen: with your code, my total time for the solution went from 94ms to 78ms
(no guarantee that that code still does what yours did btw ;->)
so what happens here is that this function is called once for each line in a sketch, if I had a function that performed the calculations for the whole sketch in one function call that would reduce the total time a great deal?
could quite possibly
but your thinking backwards a little
I have lots of functions that are called for each entity in a sketch ;)
do you have any of the form (for each entity (do something to all the other entities))?
you want to get rid of functions not add more lol
do something for each one is linear time O(n), but what I described is square O(n^2)
Valen: are functioncalls that expensive?
take stuff out of functions and stick it close to the data generation source
they are if you call them 1500 times
and if its more like function a calls b calls c and then stuff actually gets done
well so the error in each constraint is a function (mathematically) of the values of the entities in that constraint.
then you have added alot of gumf thats using CPu at the expense of making it easier to read
so for a point on point constraint p1.x-p2.x^2+p1.y-p2.y^2 is the error function. This is independent of other constraints. So I don't think there are many things that can be done for all the entities.
because their error is based on only a subset of the entities.
what do you mean by constraint?
doesn't feel right to me to compromise readability in python-code. readability is usually the reason i choose python
if you are limited by performace add comments and white space
i would switch language instead
Valen, this code is part of a geometric constraints solver. It solves for the position of lines, arc, and points that satisfy the constraints of the 2d, or 3d sketch.
pretend i dont know what a "geometric constraints solver" does
with inline optimisation in the compiler you can still get nice readable code without the drawbacks
HeeksCAD is in desparate need of one :)
its still garbage in garbage out
Valen, have you ever used a real 3d parametric CAD package?
played for 20 minutes with solidworks?
I suspect that you would get mich faster execution from a well-crafted c++ program. I don't know how much added complexity that would entail in the housekeeping functions you use elsewhere (like maintaining lists of objects, I/O, etc)
did you use the sketches?
for cad then c/c++
SWPadno: I have started coded it in C++, but I just want to do it right.
SWPadnos: you probably would but if you just write the code in python well it'll work ok
it depends on whether there might be 2500 or 15000 objects later on
ok i think you need to do your work starting at extractparameters
SWPadnos: there are MMPOG's written both client and server in it, so it should be able to handle a bit of number crunching
graphics objects are the textbook case for inheritance, and since there is no interpretation involved in choosing what function to call for a given object (even virtual functions are selected from a table), the direct speedup in code execution should be noticeable
this is of course independent of algorithmic speedup, which would apply for both python and c++ (and is usually the best place to look)
Valen: In most commercial CAD packages there is a sketcher that allows you to make lines are arcs and so forth. You can then put constraints on these lines.
he is looping over each object with dotted notation about 8 times by the look of things
and most of those are just wrapping and copying stuff around to go into that calculator
So say that you want an arc to be tangent to a line in the sketch. The sketch tool uses a numerical solver to solve for the position of the line and the arc that satisfy all of the constraints.
im with SWPadnos on that one, choosing a better or improving the algorithm should be the first step
Well the method I'm using to solve the problem is by definition a bit inefficient. But it allows for lots of freedom in using the sketches.
give me a few minutes i'll have a look at it
I imagine that lots of time in my code is being spent on bad programming methods.
So I'm just asking now if somebody has a good resource(book, online, etc.) that I could turn to that will teach me how to code this well in c++
you should add some comments about the place too if your having problems
Jon_geo01005: are you working on a cad system?
I use Unigraphic NX here, but I'm trying to develop this solver for OpenCascade projects like HeeksCad and FreeCad.
and they are written in C++?
Jon_geo01005, there is a solver in another package I saw the other day
Vq^:C++ and python.
archivist: What package was that?
heh /me checked logs the one you pointed me at :)
You may call me crazy, but I think it has some limitations.
it probably has
* archivist wants gear mates like solidworks
The way his solver works it artificially removes some degrees of freedom from the sketch.
Jon_geo01005: in your code where does p1.x come from?
in the calc function you are using it as self.p1.x but i cant see where you are setting that
p1 is an instance of the point object. Here are the entity class definitions : http://pastebin.com/m5347f45e
archivist: All the 3d constraints, can be expressed as combinations of 2d constraints. I think even the gear mate.
Jon_geo01005, probably as thats just a rotation about an axis
bah dinner is almost ready i dont have time to finish it
Jon_geo01005 what you need to do is to get rid of all the loops you are doing manipulating your points data
Valen: thanks, I'll plan on doing that in the c++ version.
up in extractParameters you have all the information you need
just copy the calc function into there and change the variables it uses to directly access them one at a time
I'll wager you hit 40ms with it
so you should have only one loop (and another for the circles)
and have that loop directly spit out totalerror
actually mod algorithms to cut loop qty would be best, cut and remove ops as errors get near 0
Jon_geo01005: knowing your own code it should only take a few minutes to try it
Valen:I think that the changes you note may change the operation of the program, But I'll use the ideas you mention where I can.
WooHoo ebay is down!!! http://ebay.com/
the program is the same
or it should be, your just not copying data around
steve_stallings is now known as steves_logging
JymmmEMC up for me just slow
werks for me ebay.co.uk
No, that SPECIFIC link is down, just thought it was funny.
Oh damn, they fixed it.
[16:13:40] <JymmmEMC> http://www.insidebayarea.com/ci_12245969?source=most_emailed
on old days... i made a card with decoder on it connect to 8255 ...PARALEL with memmory & Processor Z80
is it possible in pc today with DDR2...
old days using 8255 ... what is it on today? South-bridges? what kind of type ic is this
kinda hard these days as layout is critical as speed
robot bulders banaza book had a circuit that I think used the 8255 interfaced to an isa slot. Always wanted to build one.
that's a heck of a lot easier than interfacing to a PCI slot
I wouldn't even start trying to make an I/O card that sits in a DDR/DDR2/DDR3 socket
but that is an interesting idea :)
that would literally be memory mapped i/o? ;)
not a lot of latency in a ddr slot
is fpga speedy enough?
well, speedy enough for what?
and which FPGA?
dont know... that the new ic i never been touch? came in my mind?
spartans have been around for a decade or more
(though there are new versions regularly)
any suggestion? perhaps?
it would be cheaper to buy a mesa card :) http://imagebin.ca/img/z0vrLSPy.jpg
... mesa, ill go check
Just tried to update to 2.3 and now axis won't start
$200 and up for a PCI FPGA
jensor, using your own config, or one of the samples?
I followed the instructions on updating to 2.3 in the wiki
that doesn't answer my question
did you also follow the instructions/advice here? http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?UPDATING#Changes_between_2_2_x_and_2_3_x
I am using my own config
go to a terminal, run emc, put the output on http://pastebin.ca
what hardware are you using?
I have posted my results on http://pastebin.com/d8a178c
mesa good, mesa using spartan...in the picture... :)
run on PCI? Atom?
and where is the harddrive?
A4ndy_ yes. you can just see a corner of the hardrive in the lower right of the picutre.
oh, its not connected already ..i see, very prety
the red sata cable is visable also
jensor, look at line 509 in your pastebin, and then look at section 1.7 of the UPDATING wiki page
how much it cost for this mesa?
what you see is $200
the mesa card, what type is it
[17:26:22] <SWPadnos> http://wwwmesanet.com/prices.html
ill go check other mesa
the 5i21 is a little more expensive, but has a faster chip with twice as many gates
if that interests you
($229 instead of $199)
SWPadnos I know I can fix that. I assumed that the update would automatically chage my config files. I'll chage that and see if that does the trick
nope. configs are never ever changed automatically (at least not by us :) )
heh - no - the update will not change your configs. That gets scary.
that way lies madness
we should make some sort of conversion tool, but it would only be able to do simple things
The developers have more important things to do :)
oh well bed time for me
catchyas all later
LawrenceG: any smoke?
mesa great, could made stuff easier... has open source driver?
(could connect to emc linux... mean yes right)
mesa is integrated into EMC
they work well togther
SWPadnos, I fixed the pin name change and that seems to have resolved the axis start up problem.
i found this: http://sourceforge.net/projects/rt-com/
linux now is complete
,,, next GUI to go
base on prety linux today, it is not impossible... rather then vista / longhorn? 20GB bad;
thanxs every one, ill go surf now.
2.3 changed axis acceleration and deceleration when jogging drastically. Should that happen?
do you have accel limits set in your ini file?
I'll have a look at that
for each joint, not just in the TRAJ section
as far as I know, the motion planner used for jogging will only use limits set per axis in the ini file. I know there have been some discussions about jogging recently, but I'm not sure if they're relevant
(I think they were related to the hostmot2 driver)
Yes they are set and worked fine in 2.3. When I try to home an axis it begins very slowly and gradually gains speed over a 10 sec period or so, then when it hits a limit it begins decelerating at the same rate it accelerated at
consequently it over runs the lim it
This is on a bridgeport mill
homing and jogging aren't the same thing. are there two problems?
joggin g actr s same as homin g
ok. can you pastebin your ini file please?
before and after, if you still have the 2.2.x version aroung
I haven't changed it between versions
I'll see if I have an earlier version
ok, the ini didn't change, only some tweaks to the HAL file?
no need, if there are no changes, that's all I need to know
Only change was the pin name change in a hal file
[TRAJ] DEFAULT_ACCELERATION = .0167
That never gave a problem in 2.2.8
like I have now
from the 2.3.0 changelog: * honor [TRAJ]'s ACCELERATION settings when jogging/homing
how does one deterine what the default accel should be?
you should always read the changelog. we also send that information along with the release notification.
jensor: I think the right thing for a trivkins machine is to just comment out those ACCEL and VEL settings in the TRAJ section
I did read the log and this is all I saw
n 2.3, you must home all axes before issuing MDI commands or running part programs. This setting can be reverted to the 2.2 behavior by the inifile setting [TRAJ]NO_FORCE_HOMING = 1. For users of the mini GUI, this setting may be required.
I read this in the kn owledge base
ok, you just missed it - the thing I pasted is from the changelog
anyway, that's your problem, .0167 in/sec2 is a crazy acceleration.
anyway you mention a trivkins machine - What is a trivkens machine?
one where the axes correspond 1:1 to the joints
like a regular mill where there are three orthogonal joints that move as X,Y,Z
I commented out the default acc and vel in the [TRAJ] sectioon. Works fine now!
do I remember correctly that you are using an STG card?
must be someone else I'm thinking of.
By the way if you jlook at the the ini file I posted, see if you can determine why I can't get it to open axis with another ngc file
[18:28:55] <jensor> http://pastebin.com/d743e1c30
It works with another ngc file now
not sure - the [DISPLAY] OPEN_FILE version should work.
it didn't in 2.2.8
SWPadnos: that is incorrect
oh, that's an environment variable
jensor, one thing to keep in mind - Linux is case sensitive
I kn ow - I've been burned before
[DISPLAY]OPEN_FILE works for me in TRUNK. But when I specified a slightly incorrect path (ncfiles instead of nc_files), it didn't give any indication of problem -- it just didn't load a file at all
he said it's working now
it's magic then
no its not working - it comes up and says no file
I thought it was working when it didn't bomb ot like before 2.3
The path is correct in the ini file
oh, sorry, I misread
In 2.2.8 it wold bomb out and the log would indicate it couldn't find the file. Now it comes up and says "no file"
OPEN_FILE = /users/jepler/emc2-src/nc_files/flowsnake.ngc
^^ this is what I tried
and it did work
if you "ls -l " followed by that exact string (use cut & paste) does it show the file or say it is not found?
jepler, My fault- File wasn't where I thought it was - works fine now
Where do I find a description of the new buttons on the axis display in 2.3
I searched the knowledge base
now I'll look at the docs
I think there's a button for pan/tilt
2 buttons to right of abort
heh, I've been using it so long, I don't remember.
ah, the optional stop
oh, optional stop and block delete?
and block delete
and optional stop
and block delete!
optional block delete?
and ermmmmm optional erm STOP
what's an optional stop?
what does it sound like?
a stop that is optional :D
and ruthless efficiency
so you request emc to optionally stop your job, and if it feels like it, it will?
you program a M1 in the g-code, if optional stop is on it stops at the M1, if not it will just pass over it
less mandatory than emergency stop
alex: oh, kinda of like a breakpoint
not sure about the M1, but the docs should have the exact Mxx number
yes M1 (it's on the icon)
same goes for block delete
for lines with / before them
'a convenient place to stop'
docs call it an optional pause
but different from a manual tool change?
i guess that will always stop
Does skip lines with / , mean that you can prefix a line of gcode with a / and if that function is toggled "on" it will skip that line?
that clarifys it
flip it while the AXIS preview is loaded and you will see the behavior
I am confused now it wants me to home when I bring it up. I thought it stored that info in the var file from the last homing
thats one of the changes......you did read about the changes
jensor: you pasted information about the relevant change earlier
if I do the [TRAJ] NO_FORCE_HOMING=1 will it revert to the previous way of reading the var info on startup?
It looks like the info indicates that it does
home position is not saved in the var file, but coordinate system offsets are. homing puts all the coordinate systems in their proper place on your machine at once.
when EMC starts, it doesn't know the position of the machine: that's what homing establishes
Oh, I thought that it stored that info
how can it see you move the table while off
well it can save joint positions which should be approximately right upon restart. these do not go into the var file though, they go into the position file.
and it was up to the user to realize whether he needs to home again
but archivist is certainly correct about moving the machine.
it will almost always move "a little bit" by itself when turned off.
I've wondered about that
anything with steppers WILL move a bit
also, anything with servos WILL move a bit :-)
steppers will probably often move most of a step
microstep drives certainly will
only thing that can possibly know where it is at switch on ....has absolute encoders
But a small movement while off isn't a big deal unless one is going to approach limits
that might be true for your particular setup, but in general is not true.
I understand that
I love how I can turn on my lathe, home it, and then have it cut correct diameters with all the mounted tools... it is running to exactly the same encoder count as last time
I wish I could tool change with accuracy so I could
some quick change tool posts are better than others
hmm.. does using a position file "rehome" the machine ?
round shaft mounted tools in morse 2 collets here
that might be useful for some machines without switches though
although G28 ? then home should do it too
not sure how it should work ideally.
seems bad for it to start up "homed" when it really isn't
although I suspect someone with that setup can set up so home isn't required
I notice on the machie menu a un-home option is available. But I could not find any pins that provide at function in the HAL configuration
provide that functtion i meant to say
true, I don't think halui knows how to unhome
Gee, just when I thought I could set up a remote home all switch.
halui can home one joint at a time. it does not know how to home all, and it does not know how to unhome.
currently know how :-)
why can't I connect the home signal to all the necessary pins?
I bet you could
then home all
it won't start them all at *exactly* the same time, like a real "home all" would
but that only matters for uncommon setups.
Do you mean it would only do it sequentually
no, it would do them at approximately the same time.
try it and let us know!
ok thats what i want. However , I would have to unhome z first to guarentee it is 1st to home before the others
I need to update my laptop emc version built sim mode from source. How do I properly remove a tar compiled version before compiling 2.3?
skinnypup_: that's a pita..
but you should export DESTDIR from your shell to a temp location
if you don't use a package manager, you should use --enable-run-in-place
then do the make install again
we don't supply "make uninstall" because it's needless duplication of what package management systems like deb do
you'll see then what files get installed where
but as jepler said, run in place is probably best
if you do insist on installing it yourself, there is a utility (makeinstall ? or something like that) that builds a simple deb from the make install results
if you 'make install DESTDIR=/tmp/emc2-install-root', then /tmp/emc2-install-root contains all the same files installed
checkinstall it's called
[21:07:15] <alex_joni> http://www.falkotimme.com/howtos/checkinstall/
Thanks guys, lappy is just for sim-mode when i'm not in garrage mode
skinnypup_: you do know there are sim packages.. right?
[21:09:07] <alex_joni> http://www.linuxcnc.org/hardy/dists/hardy/emc2.3-sim/
had no clue, intended to build from tarball
[21:09:25] <alex_joni> http://www.linuxcnc.org/hardy/emc2-install-sim.sh
alex_joni, Thanks man !
skinnypup_: sure thing ;)
[21:45:58] <dmess> http://www.toshibamachine.ca/Tools_BTD-200QH.shtml
archivist u here?
have had some DX tonite!
3226445.28 miles on 32.166GHz
a fair distance then
* archivist does not believe the .28 bit
hahh ok its further away now ;-)
btw its the first time a ham station has copied 32GHz from a deep space satellite
I wonders what you were getting it from/to
I bet it moved more than .28 during the period you were getting signals
its the Kepler space craft
its moving at 1.2418566Km per second currently
ish plus or minus a bit
wth is at 32GHz?
it sure aint phone