mozmck, yes, you need to blend even tangent arcs. Imagine two arcs that form an S curve - still tangent, but the accel on one axis has to completely reverse
SWPadnos: yes, but the accel is constantly changing on an arc anyhow isn't it?
blending the paths and transitioning from one segment to the next without stopping are currently both side effects of the same algorithm
it's true that with tangency you could transition without blending the path, if the planner knew how to do that
what SWPadnos says about accel changing direction is true but not important unless you want to limit jerk (which we don't do currently)
I see. (something through the fog I think :) )
in HAL do components pins get updated in the order they are added to the thread?
they are executed in thread order - yes - but you can specify an order when you add them, so if being pedantic the answer to your question is no
I think halcmd show thread will show the resulting order
mozmck, HAL pins read/written by a single function may update in any order, but the order the functions execute is specified by how they're added to the thread
the "within a function" order is irrelevant for pins that are used in the same thread as the function that changes them, but could be important if there are pins that are also used in a faster thread since the faster thread may "see" a partial update
Thanks for the information. We have a muxed input circuit we are playing with and it's not working. 99% sure it's hardware timing issues...
just stick the input bytes on an S32 for debugging
that would eliminate any number -> pin conversion or pin update issues
err, number -> array of pins
hmm, hadn't thought of that. my problem is that the pin numbers are coming in at the wrong places.
signals on physical pins aren't showing up where you expect them?
no, they are in the wrong place in the internal array, most likely because of timing issues between the control lines, optos, and input pins.
so you output some bit pattern on the control port to select the address, then read the data port to get the input data (or similar)?
similar. 4 inputs from the parport, two control lines which switch between 4 banks of physical inputs
actually, 2 banks of 2 banks each if that makes sense.
you might try sticking a phantom write in there - write the control port twice, or write to a different port
EMC: 03jthornton 07v2.4_branch * r0074a4789679 10/docs/src/gcode/ (4 files in 2 dirs): add a bit more to the g76 section and markup fixes
you've got to assume that (1) the parport pins actually update near the end of the 1us output cycle (and of course that the input cycle reads at the beginning ...), and (b) that the output timing is not symmetric - that is that going 0->1 may take a different amount of time than 1->0
so when you output then input immediately, my assumption would be that there's no significant time between those events
oh, the other idea is to only do one read per base thread - you read first, then output the next mux configuration. That way, the electronics have a full base period to settle, since you'll read the next bank several microseconds later
(that's better when you have fewer banks)
1us? My base period isn't that fast!
several microseconds :)
it depends on the hardware though, if there's a latch involved, you don't want to use the multi-period approach
That's why I asked about update order on a thread. if the components get updated in the order that they are added to the thread, then the parport inputs get updated before my code runs which is what I needed to make sure about.
are you using the normal parport driver and then "reinterpreting" the data?
there's no latch, and I did try just what you suggest. change the control lines on one cycle and read the inputs on the next.
by the way, it's not the order they're added, you can specify where to put a function when you "addf" it
addf function thread 1
puts it first
addf function thread -1 makes it last
+2 means second, -2 means second from last ...
I guess "reinterpreting the data" is what I'm doing. I read the same 4 inputs but put them in different places based on the state of the control lines.
output then read on the next cycle is the natural way for things to work, if you use the parport driver and the normal "read / process / write" sequence
My hal file just has addf function thread with no order specified.
in that case it is the order you add them :)
the other way I do it is read the inputs just before I change the outputs in the same cycle. but if those outputs don't actually get changed until the next cycle that could be causing me problems...
although it didn't seem to change things either way.
I'll have to try that again.
parport.read / mozmck.fiddle / parport.write that's all you should need :)
:) thanks for the help and ideas.
you know, a generic demux HAL component could be of value
a couple of selector inputs, several outputs, only the selected output gets changed whenever the function runs
I think jepler actually wrote the first version of this code to do 8 inputs, now Tom wanted to try 16.
ok - I remembered him working on something at Fest last year
the first version worked fine because our circuit was fast
he was also trying to help Steve S with a similar driver issue
this switches some optos and is not as cooperative
the "machine side" should have always-active electronics (optos, whatever), and the thing you switch should only be the (preferably buffered) data
have you been following Slavko Kocjancic's thread about his parport mux hardware?
I think I saw it but haven't read it carefully.
take a look at the schematic - you may have similar hardware :)
I know about the switching stuff :) That would require more changes to our main board that we were trying to avoid if this would work.
he is trying to use the epp protocal though.. other than that,,
he's got the optos between the parport pins and the buffer ICs on the board, which may be causing some timing issues (IMO)
yes, he is using EPP cycles
what is different with that? is he writing his own parport driver for that?
way way faster
yes, he's writing his own driver
ok, time to go for breakfast. bbl
here's the code jepler wrote and I modified http://pastebin.com/r6Zd2edH
don't you need 16 out pins?
I guess you'd need to call it "iquadriplier" too :)
[14:38:37] <mozmck> http://pastebin.com/ApzvHrw1
that's the new one.
mozmck, just for the heck of it, change line 32 to b += (select ? 4 : 0);
and for testing timing, you can change the base thread period - make it 100 us or something
I'll try the parentheses. I have done the timing as you suggest. What I'm seeing is that one set of 2 banks (8 inputs) gets read into out - out and out - out, and the other set of 2 banks gets read into out - out.
back to the other computer to do some more testing...
SWPadnos: when I put my scope leads on the lines controlled by select and select2, and trigger on the fast line (select), select2 periodically inverts in relation to select. But if I trigger on select2, it looks rock solid. any idea why? This is on an old HP 54510B scope...
I'm guessing the signals are not actually inverting in relation to each other, but it's just some oddity with the scope or something.
mozmck, if you trigger on the falling edge (for example) of the select line, there's a 50/50 chance of the select2 line being high or low
but since there's only one time when select2 has a falling edge (it's always at the same time as the select falling edge), you'll always see select in the same state when you trigger from select2
hmm, I think it's triggered on the rising edge but not sure. so my "or something" was probably IO error (ignorant operator) :)
either edge works though, it's the same
I see what you're saying.
the lower frequency signal (select2) is locked to the higher frequency signal (select), so you have a 50/50 shot at seeing it one way vs the other
err, you know :)
yah, and that's what I saw.
still haven't gotten the whole thing to work right yet. it boggles my puny brain.
did you try making the base period really really long, to see if it's a timing problem?
tried again all the stuff you mentioned.
I didn't try that, but I tried reading on one cycle and writing the next.
that gives a period of about 100 us or so
is the hardware combinatoric? (ie, the data lines will show a set of inputs based only on the state of the select pins, no other latch / strobe or other handshake needed?)
it still gives only one base period (which I'll now assume is 50 us) between select write and data read
ok, that makes it easy
have you verified with certainty that the hardware is doing what you expect, aside from timing issues?
I think it is a timing issue in the hardware but I can't find it. We changed the circuit and got the signal squared up really nice - still does the same thing.
no. I need a four channel scope.
or more brains.
well, you have halmeter :)
this is what I imagine for the hardware, correct me if I'm wrong: you have the 8-bit data port split up into a 4-bit section that always gets read, and a 4-bit section that's muxed by the two select outputs, right>
SWPadnos: when 2.4.0 will be released?
um. well I was thinking that it may not be on April 15, but we'll see
right now the wiki page with the schedule still says that
hmm, there are 4 inputs to the parport. on the input hardware there are two banks of 8 inputs, switched by the select2 line, and then those are broken into 2 sets of 4 that are muxed into the parport by the select line.
ok, that's fine
SWPadnos: you will release it?
here's what you do to test the hardware
micges, yes, I signed up to be the 2.4 release manager, but since I don't know what I'm doing yet, and I'm pretty busy with work, I don't know exactly what's going to happen :)
we will help you :)
mozmck, make yourself a hal file that loads the parport driver, sets up a thread (1 ms is fine), and adds the read and write functions to that thread
make two signals if you like, called select and select2, and connect those to the parport output pins for the select lines
read and write functions? you mean my component?
also have the hal file load 4 halmeters connected to the data input lines (halmeter -s pin parport.0.xxx)
no, just the parport driver
hook up physical wires to make different bit patterns on the 4 banks of inputs
you should see the halmeters change when you manually change the select and select2 signals
if that doesn't work, stop working on software and look at the hardware again
micges, I'm counting on it ;)
ok. hadn't thought of that. I haven't been looking at the software too much, because we figured out we had hardware problems for sure. Now those look better though.
you may want to pop up halmeters for all 8 parport inputs, just to make sure that nothing weird is going on on the other pins
timing can't be an issue if you manually change output bits and look at the results in userspace :)
(remember to put "start" in the hal file)
oh, and of course use halrun to load it :)
no messing with emc or anything - just bare HAL "are the wires doing what I think they should?"
got it. I've done a little of that with another component I'm writing.
oh, and while you have select and select2 in some state, mess with the physical connections (all of them, on all "ports") and see what changes and how long it takes
is there a list of packages needed to build the docs?
I kept running make and installing what it said was missing until it quit complaining and went to compiling, but it craters trying to build ../docs/src/Master_HAL.pdf
Here's the error: make: *** [../docs/src/Master_HAL.pdf] Error 1
you might be missing a file for that doc
mozmck also try a make clean
what file might be missing? I'm running from a fresh git download.
I did a make clean and tried again and get the same message.
seems like the first time it did it there was some mention of a ec*1000 file missing...
a file that master_hal.lyx is wanting I guess
you might refresh your checkout to make sure you didn't loose a file during the download
this is on 10.04 with lyx 1.6.5 - if that makes a difference...
let wander down to the beer cave and see what I'm using and if it is not the same then yea it matters
ok, I just figured out groff is missing. I'll see if that helps
surely lyx will work with older lyx files?
mozmck lyx 1.5.3 here
I show 79 items in my emc2-dev/docs/src/hal folder and 56 items in the images folder under that
Hmm, I show the same
so lyx won't handle older versions of it's own files?
I'm not sure but I know I can't use anything else for editing them
the docs folder properties is 1,349 items totalling 42.4 MB
huh. it gives me the same error. no explanation - just "Error 1"
I usually get that when some reference is missing... not much of a clue I know
that must be before a make clean? I have 721 items 15.1 MB
ah, that must be after a successful make
I guess I'll build without docs for now. I was trying to make packages and that builds the docs.
I guess we'll have to get this working soon though if we're going to support ubuntu 10.04
* JT-Dev wanders back out to the shop
is 10.04 out now?
will be in 25 days
no, but I'm working in advance on it
using beta1+ right now
mozmck2: is it possible to change position of (minimize, close ) button of window manager from left to right?
heh, yes - first thing I did!
gconftool-2 --set /apps/metacity/general/button_layout --type string “:minimize,maximize,close,”
I may go back to debian if ubuntu keeps up their current trend. From what I've seen I don't think the gnome3 desktop coming in 10.10 will be a step forward either.
I saw they have few hundred bugs
so maybe gnome3 will be HEAVY bugfix release :)
I don't know. There's a whole new interface called gnome shell, that I'm not sure I'll like at all.
I don't saw 10.10 also
next week I must see if it have driver what I need (usb CCTV)
10.10 is the next release coming later this year.
I have to reboot now, bbl.
mozmck2: save that gconftool incantation
that's something we _absolutely_ must do on the LiveCD
so is disabling desktop effects
[21:21:08] <alex_joni> http://linuxcnc.org/hardy/livecd.errata
yeah, I need to. it messes up the buttons so I also changed the theme to clearlooks (which I like better anyhow)
(from last time..)
ah. I have a number of notes for compiling etc already.
maybe we should start setting up linuxcnc.org/lucid/
yeah. I got emc2 compiled now, but when I try to run latency-test it says: insmod: error inserting '/home/moses/Projects/emc2/rtlib/rtapi.ko': -1 Unknown symbol in module
same for thread.ko
ERROR: Module rtapi does not exist in /proc/modules
is that a normal error?
oh, it's complaining about "no symbol version for xxxxxx" I guess I didn't turn off module versioning when I compiled the kernel.
actually you shouldn't turn it off
but rtai and emc2 modules need to have versions too
[21:31:49] <mozmck2> http://www.pastebin.ca/1856101
hmm, I think we used to have to turn off module versioning...
yes, up to 2.6.20 or so
this looks like an emc2 compile problrm though
I assume rtai tests are ok?
hmm. this is the 2.4 branch, fresh git clone.
I don't know, how do I run them?
seems like I did that once but I forgot.
hmm, runtests? looks like they all fail :)
not emc2 runtests
ok, that's running....
looks like a few latencies around 20000
when compiling I got a number of warnings like this: ‘rtai_lxrt’ is static but used in inline function ‘rt_set_period’ which is not static
mozmck2: from emc2? sounds more like rtai warnings to me
mozmck2: crashing here.. good night
btw, I might have monday off, so I'll look into lucid
if you have some pointers online to the things you've done already, it could save me some trouble
(maybe a wikipage or something)
I'll try and put a wiki page up or something. For rtai I used the debian directory from hardy and modified the files just a little. It worked fine for rtai 3.8, but maybe there are some more changes needed for magma.
mozmck did you ever get the docs to build?
nope. I quit trying and built without them, now still trying to get emc2 to run...
ok, just wondering
JT-Dev, JT-Hardinge: what font packages are needed for the docs?
mozmck I don't know sorry
I enabled debug messages and I get a lot of errors about there not being any letters in 'nullfont'