#emc | Logs for 2008-07-24

[01:33:42] <jmkasunich> skunkworks: LM211! (or 311)
[01:34:18] <jmkasunich> interesting - that guy that bored a spindle taper in this thread: http://www.practicalmachinist.com/vb/showthread.php?t=122416&highlight=spindle+runout
[01:34:59] <jmkasunich> is probably the guy who I got my collet chucks from: http://www.maritool.com/
[01:52:48] <jmkasunich> skunkworks: hmm, on further reading, its not clear if the LM311 works with inputs down around ground
[02:03:02] <skunkworks> heh - I may have to do some more research ;)
[02:04:53] <skunkworks> jmkasunich: this guy has your attitude about comparators http://www.cnczone.com/forums/showpost.php?p=480057&postcount=11
[02:05:08] <skunkworks> qoute.. The LM339 / LM393 will work because it IS a comparator.
[02:05:10] <skunkworks> ;)
[02:06:29] <jmkasunich> "input common mode voltage includes ground" <-- LM339 datasheet
[02:06:49] <skunkworks> yes - I read that today.. ;)
[02:06:52] <jmkasunich> its not as fast as a 211, but fast enough (damn sure faster than a TL084 opamp)
[02:12:14] <skunkworks> oh - whatever.. you comparator elitist!
[02:12:19] <skunkworks> ;)
[02:12:25] <jmkasunich> ;-P
[02:12:46] <skunkworks> did you see my question about the sense resister?
[02:13:11] <jmkasunich> don't think so?
[02:14:23] <skunkworks> I was wondering how to handle the comparator side of it.. what is the best way to handle the logic side ground of the resistor.
[02:14:38] <jmkasunich> where is your schematic again?
[02:17:09] <skunkworks> I think this is the latest incarnation. http://www.electronicsam.com/images/KandT/servostart/newschem4.png
[02:17:32] <skunkworks> r11
[02:17:47] <jmkasunich> you need two distinct gnd symbols
[02:18:06] <jmkasunich> something like PGND for power ground
[02:18:44] <skunkworks> that is what I was wondering - if I should officially separate the power gnd from the logic grnd
[02:19:29] <jmkasunich> use PGND for the main power supply connection, one of the sense resistor ground leads, and the main bus capacitor (I don't see that on your schematic)
[02:19:51] <skunkworks> it isn't there.. it was just 2 of the pads.
[02:20:02] <jmkasunich> use GND for everything eise - including the ground of the 7812
[02:20:04] <skunkworks> I have not started modifying the schematic yet.
[02:20:24] <skunkworks> * I have not started modifying the pcb layout yet.
[02:20:44] <jmkasunich> actually, since you only have one GND symbol on the power side, you don't really need another symbol
[02:21:10] <jmkasunich> just delete that GND (the one connected to the bottom right resistor terminal)
[02:21:16] <skunkworks> so - the only connection between logic ground and power gnd is going to be the logic side leg of the sense resistor?
[02:21:52] <jmkasunich> PAD4 can be the power ground (add another PAD for the cap ground)
[02:21:52] <skunkworks> ok
[02:21:52] <jmkasunich> exactly
[02:21:52] <skunkworks> ok
[02:21:52] <skunkworks> cool
[02:21:58] <skunkworks> now I need to find some comparators.
[02:22:10] <skunkworks> I bet digikey sells them every day..
[02:31:55] <jmkasunich> "comparators - 3114 items"
[02:32:54] <jmkasunich> wow, $1.15 for 339s (quad)
[02:33:18] <jmkasunich> I'm spoiled - I see work's pricing, we buy in volume
[02:39:37] <jmkasunich> I think a 339 is well under a quarder
[02:39:40] <jmkasunich> quarter
[02:41:46] <jepler> this 339 is only $0.45 qty 1 and goes down to 11 cents qty 5000 .. http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=296-1393-5-ND
[02:43:47] <jepler> speaking of which, what kind of technology does a digital logic analyzer use when you select different I/O standards? does it set a reference voltage and use a (very fast) comparator? or does it use some other approach (analog switches to actual logic of whatever kind?)?
[02:44:13] <jmkasunich> I suspect the former
[02:44:57] <jmkasunich> duh on the 339 - silly /me searched for "comparator", then filtered by manuf for National Semiconductor
[02:45:18] <jmkasunich> TI pricing much better
[02:46:04] <jepler> digikey doesn't let you filter comparators on speed
[02:47:01] <jmkasunich> or sort on price (my pet peeve)
[02:48:34] <jmkasunich> was the logic analyzer question just out of curiosity, or are you thinking of building one?
[02:49:00] <jepler> http://emergent.unpy.net/01216696167
[02:49:29] <jepler> wondering what a proper input stage would be like for this fpga-based one that I bought
[02:51:03] <jmkasunich> I'd definitely use the DAC setting reference for damn fast comparator approach
[02:52:15] <jepler> oh, and that reminds me, I saw something rather odd when I was first messing with the scope
[02:53:01] <jepler> as you can see, I'm scoping a simple binary counter -- it's generated by an avr, and there are actually two low-order bits that I'm not probing there
[02:53:42] <jepler> the first version of the fpga firmware didn't have pull-ups or pull-downs, so most of the inputs (26 of 32) were just floating. most of them would stick at a particular value, some of them would wander around
[02:53:54] <jmkasunich> not good
[02:54:09] <jepler> (later, I added pull-ups in the fpga design and all that stopped)
[02:55:07] <jepler> but before I did that, I saw something weird: in the next channel, the first unused ones, I got edges in a particular pattern: several transitions before the slowest signal would change state, I would get a bunch of rapid transitions on the unused line
[02:55:23] <jepler> much longer than the 2-instruction pipeline on the avr, for instance
[02:55:31] <jepler> it seemed like that floating line was anticipating the future
[02:55:36] <jepler> I wish I'd saved a screenshot of it
[02:55:59] <jmkasunich> "several transitions" ?
[02:56:25] <jmkasunich> meaning several counter LSB counts? or several analyzer samples (at what rate?)
[02:56:30] <jepler> several LSB counts
[02:56:39] <jepler> many many analyzer samples -- probably 20MHz or 50MHz
[02:56:42] <jmkasunich> so many many microsconds
[02:57:15] <jepler> several microseconds at least
[02:57:38] <jmkasunich> that rules out any kind of crosstalk
[02:57:56] <LawrenceG> jepler, I have a manual for a tek p6451 logic probe pod.... it uses an ecl output comparitor with adjustable reference.... its a 3.5mb download if you are interested
[02:58:27] <jepler> LawrenceG: no thanks -- the specifics probably wouldn't do me much good
[02:58:45] <LawrenceG> np
[02:58:51] <jmkasunich> what kind of sample rate would you be aiming for if you built a front end?
[02:59:50] <jmkasunich> and how many channels?
[02:59:52] <jepler> jmkasunich: good question. it would be nice if I could cleanly sample any waveform generated by the pluto, which has 40MHz clock.
[03:00:30] <jepler> maybe something I could build 8 channels at a time?
[03:00:46] <jmkasunich> what is the physical connection to the FPGA board?
[03:01:23] <jmkasunich> looks like 40 pin ribbon cables?
[03:01:28] <jepler> the signals are on a 40-pin female right angle header -- gnd, 5v, 3.3v, then 32 channels, then some fpga configuration related pins
[03:01:35] <jmkasunich> eww
[03:01:49] <jmkasunich> 20 signals and 20 grounds would be a lot nicer
[03:02:15] <jmkasunich> you aren't gonna be able to send fast signals thru that (at least not very far - single digit inches most likely)
[03:03:34] <jmkasunich> looks like TL3116 comparators are $2 each
[03:03:38] <jmkasunich> those are 9nS
[03:04:54] <jepler> presumably I could modify the fpga firmware to put only 16 I/Os on one connector, and make the other pins grounds
[03:05:01] <jmkasunich> TL712 is 25nS, $1.38
[03:05:12] <jmkasunich> how would you make them grounds?
[03:05:19] <jepler> in the fpga pin assignment
[03:05:20] <jmkasunich> (logic low != ground)
[03:06:05] <jepler> so it wouldn't give any improvement? or just not that much improvement?
[03:06:34] <jmkasunich> if the cable length (at speed of light) is more than about 1/10 the rise/fall time of the signals, you will start to get reflections, etc, and have to do things like terminating resistors
[03:07:06] <jmkasunich> (cable becomes a transmission line, with a characteristic impedance, etc)
[03:07:37] <jmkasunich> if you tie alternate pins to real ground (low impedance), then they act as shields between adjacent signals
[03:07:47] <jmkasunich> and give you a well defined impedance
[03:12:46] <jepler> (tangent -- this fpga supports differential signalling, but they haven't arranged the differential pairs together on the headers. bah. I guess it doesn't matter because Vcco is 3.3v but it doesn't support differential signalling except at Vcco<=2.5v)
[03:20:31] <jepler> this is the version 0 input board, partially populated: http://emergent.unpy.net/index.cgi-files/sandbox/img_7489-medium.jpg -- then I hook a jumper wire or clip or whatever's handy from the socket to the signal I want to test
[03:25:37] <jepler> but I've only used it on fairly slow (1MHz?) signals
[03:26:06] <jepler> ooh it's late
[03:26:12] <jepler> I have dishes to do
[03:35:26] <jmkasunich> well darn - the VFD I picked out of the dumpster doesn't work
[03:36:25] <jmkasunich> powers up, you can set the parameters and everything, the display and controls work, when you press start the RUN light turns on and the fans start, but no output
[03:36:33] <jmkasunich> or at least, no motor turn
[03:39:04] <jmkasunich> bummer - no output voltage
[03:57:03] <jepler> you can't win every time
[04:04:15] <jmkasunich> got a different drive to work
[04:04:25] <jmkasunich> tested the 50Krpm 400W spindle
[04:04:53] <jmkasunich> broke the 6mm diameter shank of the carbide burr that was in it :-(
[04:05:26] <ds2> was any new orifaces created in any body part?
[04:06:35] <jmkasunich> no
[04:08:32] <jmkasunich> this is what I was running:
[04:08:33] <jmkasunich> http://www.hgrindustrialsurplus.com/search-products/product-detail.aspx?id=12-275-094&searchtable=2&sortExpression=&SortASC=&pageSize=50&currentPageIndex=0
[04:09:02] <dgarr> did you happen to measure the runout on that spindle? how noisy is it compared to a universal motor at speed?
[04:09:36] <jmkasunich> I measured runout unpowered, and got 0.001ish (I was dissapointed)
[04:10:19] <jmkasunich> its not quiet (the motor is AC induction, 300Hz = 18000 RPM or so, then there is a 46 tooth phenolic gear driving a 17 tooth steel one
[04:11:16] <jmkasunich> it definitely has power - before I broke the burr I cut pretty heavy into a piece of 1/16" steel
[04:11:25] <jmkasunich> just handholding the spindle
[04:11:35] <jmkasunich> it didn't slow down under load
[04:11:43] <dgarr> Do you know the intended use of the device? -- it looks like a hand-held device in the hgr picture
[04:11:51] <jmkasunich> not sure
[04:12:08] <jmkasunich> there is a 20mm diameter by about 1" long machined sleeve just behind the rotating part of the spindle
[04:12:26] <jmkasunich> I think its supposed to mount there
[04:12:49] <jmkasunich> it is a 3-phase induction motor rated at 300 Hz, very much _not_ something you can just plug into the wall
[04:13:40] <dgarr> what would be a good price for a 400-500w vfd running off 115VAC be (say on ebay)?
[04:14:03] <jmkasunich> hard to say, couple hundred $ probably
[04:15:29] <dgarr> the driver came with one collet (6mm i think you said)?
[04:15:47] <jmkasunich> this one did - none of the others in the box had collets (or tools)
[04:16:58] <dgarr> well that's a negative, but it sure looks interesting -thanks for the info!
[11:03:39] <micges> hello
[11:04:09] <alex_joni> hi
[11:05:38] <micges> are you sure that command apt-get build-dep emc2 works on 8.04
[11:05:39] <micges> ??
[11:09:01] <pmbdk> micges: What have you done before this?
[11:09:50] <pmbdk> According to http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Installing_EMC2#On_Ubuntu_6_06_or_8_04_from_source
[11:10:46] <pmbdk> ?
[11:11:21] <pmbdk> I also wondered about the apt-get build-dep emc2 which didn't work out of the box
[11:11:34] <pmbdk> However after trying http://www.linuxcnc.org/index.php?option=com_content&task=view&id=21&Itemid=4
[11:11:38] <pmbdk> it did work
[11:11:45] <micges> It doesnt do anything
[11:12:29] <SWPadnos> if you have a stock 8.04 install, you need to add the emc2 repositories to the sources list first
[11:12:36] <pmbdk> Have you tried the http://www.linuxcnc.org/hardy/emc2-install.sh script?
[11:12:47] <micges> If no error is print and no update is done ?
[11:14:30] <micges> Ok I done it
[11:15:50] <micges> must have universe repo enabled
[11:16:14] <pmbdk> Should I add I think I'll add a link to the two scripts for updating the sources.list in the wiki; it really isn't that obvious that you need to run the script...
[11:16:38] <pmbdk> Isn't universe enabled as a default in 8.04?
[11:16:42] <micges> no
[11:17:26] <pmbdk> Weird...
[11:18:17] <micges> I have it since april
[11:19:13] <pmbdk> Did it work for you simply to enable universe and do nothing else?
[11:20:42] <micges> yes
[11:21:12] <rayh> If I remember there were a couple more steps beyond adding the repository if you try to build the documentation.
[11:22:27] <pmbdk> I'll just try it again... :-)
[11:24:03] <rayh> But it may have been an issue with my install of Ly
[11:24:10] <rayh> LyX and friends.
[11:32:21] <alex_joni> build-dep doesn't pull in the build of html docs
[11:32:33] <alex_joni> I think it pulls in what you need for pdf docs
[11:33:48] <rayh> Maybe that was what was happening.
[11:33:51] <rayh> Hi Alex
[11:33:59] <alex_joni> hi ray
[11:34:45] <rayh> How's the robot project?
[11:34:59] <alex_joni> coming along
[11:44:35] <buckie555> is anyone online to assist me with what appears to be an smi latency issue?
[11:45:45] <alex_joni> shoot
[11:46:58] <buckie555> i have a celeron p3 1Ghz which exhibits overruns every 62 s or so, it looks like SMI so I've installed the SMI patch and have run lsmod to verify that it's loaded but I'm still seeing the same behaviour
[11:47:18] <buckie555> I've also disabled onboard lan, usb, sound etc but to no avail
[11:47:28] <alex_joni> on-board graphics?
[11:47:46] <cradek> rayh: I got my HNC moving last night on the original control. X motion is smooth but Z is grumbly at low speed. sounds like oscillation maybe? I have control schematics but no amp schematics or adjustment instructions. do you have docs for the amps?
[11:48:15] <alex_joni> buckie555: what controller do you have on the mobo? (pastebin a lspci -vva)
[11:48:25] <buckie555> the graphics are onboard 810,. I tried using the vesa driver instead but it doesn't seem to like it so I've switched back ot the 810 driver which is found by default
[11:48:33] <rayh> I may have in a box out in the garage.
[11:49:02] <alex_joni> onboard graphics are usually a very probable cause of latency problems, usually sticking a graphics card in helps
[11:49:10] <rayh> I won't be able to look till later in the day.
[11:49:13] <alex_joni> but the overrun every 64 seconds is definately a SMI issue
[11:49:19] <buckie555> alex_joni: I'm not at the machine at present unfortunately but I can try that later today
[11:49:31] <rayh> There are two pots on the drive near the top left when you look.
[11:49:38] <alex_joni> buckie555: it might be that your controller isn't recognized by the SMI module
[11:49:39] <rayh> They are gain and offset.
[11:49:45] <alex_joni> buckie555: check http://cvs.gna.org/cvsweb/magma/base/arch/i386/calibration/README.SMI?rev=1.4;content-type=text%2Fplain;cvsroot=rtai
[11:50:02] <buckie555> alex_joni: well I don't know for sure. It definately happens every 62s which made me think it was that
[11:50:04] <alex_joni> see if you see the controller your lspci shows in that list
[11:50:17] <buckie555> ok will do
[11:50:38] <cradek> rayh: ok that sounds simple enough. I can unhook the vel input and set offset for no motion, and then hook it back up and adjust gain and see if I can make it sound better.
[11:51:05] <buckie555> It hasn't been an issue for me so far because I'm using a mesa 5i20 card so the timing isn't critical but now I'm trying to generate a frequency for a VFD and it's creating veruy bad jitter
[11:51:34] <cradek> rayh: but what I have to do first is get ready and then go to work :-)
[11:52:06] <alex_joni> buckie555: check http://cvs.gna.org/cvsweb/vulcano/base/arch/i386/calibration/smi-module.c?rev=1.17;cvsroot=rtai
[11:52:17] <cradek> thanks again, I will try it tonight.
[11:52:22] <alex_joni> you can see a list of the known controllers
[11:54:12] <alex_joni> heh: BIG FAT WARNING : globally disabling SMI on a box with SATA disks and SATA controller in "legacy" mode, probably prevents disks from working.
[11:55:20] <buckie555> alex_joni: ok thanks for the heads up - it's all IDE so it shouldn't be an issue
[11:56:15] <buckie555> strangely when I initially applied the smi fix a few months ago I'm sure that I ran the latency test for some time and there were no overruns
[11:56:51] <alex_joni> buckie555: is this on hardy?
[11:56:59] <alex_joni> or dapper?
[11:57:02] <buckie555> but now I'm not so sure as I have two identical pcs running two different machines and the latency tests I ran this morning both exhibit a 64s overrun
[11:57:06] <buckie555> dapper
[11:57:27] <alex_joni> and you're sure rtai_smi is loaded?
[11:58:16] <buckie555> it shows using lsmod and i checked the modules dir and the permissions on the .ko file and they look right - also the .conf has the correct entries
[11:58:58] <buckie555> I'm assuming that the module doesn't need execute permissions. I set it to the same as the others such as hal and match and they didn't have execute
[11:59:13] <buckie555> sorry math - not match
[12:00:18] <buckie555> so you think that it happens every 60s definately indicates smi as opposed to onboard graphics?
[12:00:25] <alex_joni> I'd think so
[12:00:36] <alex_joni> what kind of latency test did you run?
[12:01:01] <buckie555> i followed the instructions in the integration manual
[12:01:05] <alex_joni> if you run the rtai latency test (cd /usr/realtime-*/testsuite/kern/latency && sudo ./run)
[12:01:15] <alex_joni> then you need to insmod rtai_smi by yourself
[12:01:41] <alex_joni> if you just type "latency-test" then I think the rtai_smi gets loaded from rtapi.conf
[12:02:38] <buckie555> ah - so there's a chance I'm chasing shadows and the fix is being applied when emc runs normally?
[12:03:16] <alex_joni> it might be
[12:03:24] <pmbdk> Just installed the latest hardy; universe seems to be enabled as default....
[12:03:37] <alex_joni> you need to confirm (by lspci) that rtai_smi is loaded when you run the latency test
[12:03:57] <buckie555> ok I'll do that
[12:03:57] <alex_joni> pmbdk: yeah, that should be.. but if you don't have internet access while you install it might not get enabled by default
[12:04:50] <pmbdk> alex_joni: Ah... Didn't know that... :-)
[12:05:24] <pmbdk> in any case I'm not able to do build-dep emc2
[12:05:51] <alex_joni> pmbdk: hmm.. did you install a fresh hardy? or from the linuxcnc live-cd ?
[12:05:52] <buckie555> well I ran lsmod whilst emc was running and saw that rtai_smi was loaded. Is there any way to check the latency whilst the gui is running?
[12:06:04] <alex_joni> buckie555: if it isn't ok you get a popup
[12:06:13] <pmbdk> without first fresh hardy
[12:06:25] <alex_joni> buckie555: if you get no popup error, then you're probably ok
[12:06:27] <pmbdk> but i'll have to install the emc2 rep
[12:06:38] <alex_joni> pmbdk: you need to run the script, or add the emc2 repo
[12:06:47] <buckie555> ah - the realtime error popup. OK well I've never had one of those since I've installed the patch. Perhaps the stepgen jitter is another issue then
[12:06:48] <alex_joni> there is no emc2 package in stock hardy repo..
[12:06:49] <pmbdk> should have been: fresh install
[12:07:08] <alex_joni> buckie555: probably so.. but to debug that there's need on on-hand machine access :)
[12:07:14] <alex_joni> so get in here from that machine
[12:07:39] <buckie555> ok will do.
[12:07:48] <pmbdk> alex_joni: i know... just wondered how micges did it without the script
[12:08:12] <pmbdk> i got that impression... :)
[12:08:39] <pmbdk> so i simply wanted to try it out... but the linuxcnc rep really needs to be added...
[12:08:58] <alex_joni> pmbdk: sure it does.. the emc2 info is only in there :)
[12:09:07] <alex_joni> even if the packages are in the main repo
[12:09:18] <buckie555> To summarise (in case you can spot another remiss) I've got a stepgen in mode 2 (quadrature) that generates a 500hz signal. I'm just using phase A and then feeding that via an m5i20 digital out to a vfd.
[12:09:22] <alex_joni> ... most ...
[12:09:44] <alex_joni> buckie555: maybe you should start with the goal
[12:09:49] <pmbdk> i'll add it to the wiki section about the source install; it's really not 100% obvious...
[12:09:51] <alex_joni> and let the current implementation aside
[12:09:57] <alex_joni> pmbdk: sounds good
[12:10:32] <buckie555> OK, the vfd has a configurable frequency input that I'm trying to use to set the spindle speed
[12:10:57] <alex_joni> ok.. is that variable frequency or variable pulse-width?
[12:11:11] <buckie555> I've got it set so that a 500Hz input signal maps to a 100Hz motor frequency
[12:11:22] <buckie555> it's variable frequency
[12:11:27] <alex_joni> ok
[12:11:36] <buckie555> the vfd can handle 150-65000 hz
[12:12:04] <buckie555> I've got it set so that 500 hz represents 100hz motor frequency and then a linear scale down to 0
[12:12:05] <alex_joni> the m5i20 io update function is on the servo thread I think
[12:12:10] <alex_joni> so up to 1kHz updates
[12:12:30] <SWPadnos> and you won't be able to run it at 120 kHz
[12:12:36] <buckie555> yes it is - and that sounds about right
[12:12:43] <alex_joni> you get max 500Hz pulses
[12:12:50] <buckie555> yep
[12:12:52] <alex_joni> hi SWPadnos, back already?
[12:12:54] <SWPadnos> yep
[12:13:01] <SWPadnos> gone yet? :)
[12:13:04] <alex_joni> too bad.. I'm off to germany on monday
[12:13:16] <SWPadnos> bummer. I won't be back until late September
[12:13:40] <alex_joni> it'll surely match one day :D
[12:13:46] <SWPadnos> heh
[12:13:48] <buckie555> I get a smooth pulse train via the scope upto about 100hz and then after that the width of some of the pulses appears to differ
[12:13:55] <SWPadnos> well, I should have a railpass again - who knows :)
[12:14:03] <alex_joni> buckie555: right
[12:14:13] <alex_joni> where did you put the stepgen update function?
[12:14:40] <buckie555> the very last thing to trigger, make pulses is last in the base thread
[12:15:02] <alex_joni> not make pulses, the update
[12:15:15] <buckie555> the frequency output via the scope looks correct, just some of the pulse width's vary
[12:15:29] <alex_joni> buckie555: I expect it to jitter at some point
[12:15:43] <buckie555> update is also the last called but in the servothread
[12:15:44] <alex_joni> I would put all the stepgen stuff in the base thread
[12:16:21] <buckie555> I thought that update had to be in the servo thread because it uses floats
[12:16:28] <alex_joni> buckie555: I think you will get better results if you move the stuff to the parport
[12:16:39] <alex_joni> buckie555: right.. sounds like I'm moronic atm :)
[12:16:58] <SWPadnos> unless there's no work being done in the base thread ...
[12:17:06] <buckie555> alex_joni: not at all
[12:17:15] <alex_joni> the problem you have now is that changes only happen once every 1msec
[12:17:16] <buckie555> no the base thread is doing nothing else -
[12:17:37] <alex_joni> so if you want some odd frequency it will dither between possible frequencies
[12:17:38] <buckie555> but the spindle speed cmd rarely changes anyway
[12:17:46] <SWPadnos> ok, for 500Hz you probably want about a 5KHz base thread at minimum, and I'm sure it's faster than that
[12:18:01] <buckie555> yep 40000ns
[12:18:03] <alex_joni> yeah.. but if you request 333Hz .. it'll output 500Hz for a cycle and 250Hz for 2
[12:18:17] <buckie555> right
[12:18:19] <SWPadnos> have you tried the hostmot2 driver for the mesa? it has hardware step generators
[12:18:35] <alex_joni> SWPadnos: that is in 2.2.6 .. not yet out
[12:18:44] <SWPadnos> right-o
[12:19:13] <alex_joni> buckie555: either you update your config to hostmot-2 (which has different stuff in the m5i20 FPGA, and includes changing your config)
[12:19:20] <buckie555> no not yet. I've currently using all 4 servo axis and most of the io on the m5i20 board. I have got another that I could install though if need be
[12:19:21] <alex_joni> or you can try moving this to the parport
[12:20:20] <buckie555> I'm guessing that hostmot-2 retains 4 axis control but sacrifices some of the io to provide the step generators?
[12:21:06] <buckie555> are there any docs for it yet?
[12:21:17] <alex_joni> might be..
[12:21:20] <alex_joni> <- little clue
[12:21:51] <SWPadnos> sort of, it's more or less completely configurable as to which PWM or stepgens you use
[12:22:20] <SWPadnos> so if you need 4 PWM and 3 stepgen you can do that, but you will of course lose the I/Os for the functions you turn on
[12:22:36] <alex_joni> basicly you have PWM and stepgens inside the FPGA
[12:22:44] <alex_joni> those are connected to the same pins as I/O
[12:22:49] <SWPadnos> (then again, you can turn off functions as well, so if you don't need the encoder input for the fourth PWM, you can turn it off and regain those I/Os)
[12:22:53] <buckie555> OK - so at the moment I have 4 servo axis control and 16 + 32 IO I believe
[12:22:58] <alex_joni> and you can select if you want I/O or stepgens or pwm - on certain pins
[12:23:27] <alex_joni> buckie555: I still think the fastest way to solve this is using the parport
[12:23:35] <buckie555> sounds like just the job
[12:24:05] <SWPadnos> yep, that will be fastest
[12:24:07] <alex_joni> if you want software control of a certain frequency you need at least 4-5 times the output frequency
[12:24:15] <SWPadnos> or 10 :)
[12:24:21] <buckie555> I think you could be right. I was hoping to keep everything hooked up via the 5i20 for the optoisolation
[12:25:07] <alex_joni> http://upload.wikimedia.org/math/d/9/a/d9aa24ce7dd8d8defe76adccb3a04237.png
[12:25:42] <alex_joni> actually this: http://upload.wikimedia.org/math/0/4/1/041a1bdceac794c82b71068862abde6a.png
[12:25:56] <buckie555> OK - well the lowest high end frequency that the VFD accepts is 150hz so perhaps I'll see if I can get a stable pulse stream at that and if not I'll probably wait until hostmot 2 is available
[12:26:36] <SWPadnos> you can add parport stuff to the base thread. just add stepgen.0.make-pulses and then parport.0.write
[12:26:52] <SWPadnos> leave stepgen.update in the servo thread
[12:27:03] <alex_joni> wonder if you could run the m5i20.io-update in teh base thread
[12:27:06] <SWPadnos> (change the names so they're - you know - spelled right :) )
[12:27:12] <alex_joni> and leave the rest in the servo thread
[12:27:20] <SWPadnos> you should be able to run it at 10 KHz or so
[12:27:23] <buckie555> quite :-)
[12:27:26] <alex_joni> of course not a 25kHz base-thread
[12:28:12] <alex_joni> buckie555: you can try this: move the io stuff to the base thread, start with the same speed as the servo thread
[12:28:17] <SWPadnos> buckie555, when you have a chance, look at the run time of m5i20.0.digital-out-write (or whatever it's called)
[12:28:49] <buckie555> ok
[12:28:57] <SWPadnos> it should be a parameter named something like m5i20.0.digital-out-write.tmax
[12:29:14] <buckie555> rings a bell
[12:29:20] <SWPadnos> that will be in CPU cycles, not in nanoseconds
[12:29:24] <SWPadnos> you'll have to convert :)
[12:29:29] <buckie555> ok
[12:30:13] <SWPadnos> you only need 5 kHz or so to get a good 500 Hz signal
[12:30:30] <buckie555> right
[12:30:39] <SWPadnos> so as long as the tmax value is < 100 ns or so, you should be fine
[12:30:52] <buckie555> i'll check it out
[12:31:03] <buckie555> thanks for the help guys - it's much appreciated
[12:31:18] <SWPadnos> sure
[12:31:18] <buckie555> on another slightly more worrying issue:
[12:31:46] <SWPadnos> coffee time! ;)
[12:33:59] <buckie555> Good idea - coffee first.
[12:34:34] <buckie555> Several days ago my other machine running a similar setup hung halfway through a code. AXIS froze and the pc didn't respond to any commands however EMC obviously continued to run in the background as the code succesfully completed. Is there any auditing that I can set or what should I be looking for to try to get some debugging info for finding out whats happening if this happens again?
[12:35:30] <SWPadnos> interesting. how long was the G-code program? (just curious)
[12:36:16] <buckie555> not that long compared to some I run - 1000 lines maybe, a few subroutines and about 20mins machine time
[12:36:58] <SWPadnos> ok, and it ran for about 10 minutes or so after the UI had hung?
[12:37:00] <buckie555> it was pretty scary as I couldn't do anything but it looked as though it knew what it was doing :-) so I let it carry on with my hand over the e-stop
[12:37:52] <buckie555> It finished the motion but the spindle kept running - I'm guessing this would normally be controlled by the gui which had frozen
[12:38:30] <SWPadnos> ok, interesting. IO is handled by a different section of the code than motion
[12:39:08] <SWPadnos> just to be sure, it did a lot of different motions after the hang - not just completing a line or two?
[12:39:22] <buckie555> this is the first time it's happened in the 18 months that the machine has been running on average 8 hours a day
[12:40:02] <buckie555> no i think it did at least 20 or so lines
[12:40:22] <buckie555> and the finishing location was correct
[12:40:44] <buckie555> I couldn't even ctrl+alt+f1
[12:41:00] <SWPadnos> ok. I'm pretty sure it just finished out the motion queue, but I wanted to be sure
[12:41:09] <buckie555> right
[12:41:15] <SWPadnos> the interpreter is in userspace, so that wouldn't have run after the crash
[12:41:37] <SWPadnos> FWIW, I've seen much much better RT performance after a crash :)
[12:43:36] <SWPadnos> well, gotta run for a DR. appointment. see you later
[12:43:39] <buckie555> :-) I felt like I was playing russian roulette - only with a pretty expensive mold and a 15 hp VMC
[12:44:35] <SWPadnos> the RT system is very robust, so what should happen after a "userspace" crash is that any queued motion will complete, but nothing else will happen
[12:44:59] <buckie555> ok - thanks for all the help
[12:45:01] <SWPadnos> so you could end up burning a part/tool since the spindle will still be running once the queue is flushed
[12:45:11] <SWPadnos> (if the tool is still in contact with the part)
[12:45:18] <buckie555> absolutely
[12:45:19] <SWPadnos> luckily, all the coolant will still be on :)
[12:45:42] <buckie555> well we always run attended - well, in the same area at least
[14:53:56] <pjm> afternoon
[14:58:37] <BigJohnT> mornin
[15:06:00] <alex_joni> evening
[15:06:19] <archivist> hmm tis afternoon, and the boss hasnt turned up, and I made a worm and wheel
[15:06:41] <alex_joni> thought that the worm ate the wheel
[15:10:10] <BigJohnT> it does if you don't give it lube
[15:11:35] <alex_joni> he behaves with lube?
[15:11:57] <cradek> haha, 5 fill-ups on my credit card statement for last weekend
[15:12:27] <archivist> just been making a replacement set for a customer, he didnt give me the spacing, wheel was nearly bald
[15:13:05] <cradek> and I think I paid cash for one more
[15:13:51] <archivist> carting the new toy home?
[15:13:55] <cradek> yeah
[15:14:35] <cradek> it was about 1200 miles
[15:15:26] <BigJohnT> what new toy?
[15:15:35] <cradek> hardinge hnc lathe
[15:16:16] <BigJohnT> sweet!
[15:16:44] <cradek> it will be my first real emc machine - the mill is working well enough to wait
[15:39:16] <alex_joni> did you drive the bus?
[15:39:29] <alex_joni> to get the lathe I mean :)
[15:39:37] <cradek> nope, just a truck and trailer
[15:40:50] <alex_joni> still nice
[16:03:28] <tomp> cradek: "rayh: ok that sounds simple enough. I can unhook the vel input and set offset for no motion,.... "
[16:03:38] <tomp> Unhook the controller side vel input, short the amp side vel input ( this is called nulling the input), then adjust offset, then restore.
[16:03:39] <tomp>  If not standstill when reconnected then system is injecting bias ( not from 'offset' pot )
[16:04:19] <anonimasu> ?
[16:08:05] <anonimasu> *yawns*
[16:11:45] <archivist> * archivist finally does his thread milling pics and vids http://www.archivist.info/cnc/
[16:15:17] <anonimasu> wow
[16:15:18] <anonimasu> nice :)
[16:16:01] <anonimasu> I still havent found a nice way to cut gears
[16:16:50] <archivist> hobbing is nice I should add an encoder to the spindle
[16:18:09] <cradek> tha tlooks nice! is the worm acme?
[16:18:31] <archivist> yes
[16:18:56] <cradek> neat.
[16:19:05] <cradek> what's it for? I don't recognize it as a clock part.
[16:19:25] <archivist> just happend to have a suitable cutter
[16:19:52] <anonimasu> :)
[16:19:53] <archivist> its for a 1920's ish amusement machine
[16:21:05] <cradek> is the setup in P1010033 some kind of depthing machine?
[16:21:41] <fenn> vernier height gauge
[16:21:55] <fenn> with a block bolted onto it to hold round things
[16:22:04] <archivist> two parallels and a height guage
[16:22:26] <archivist> 1/4" bar to mimic the shaft
[16:22:27] <cradek> oh sure it is - I was zoomed in too far and thought I saw something else
[16:22:43] <cradek> wow, the original is pretty bad
[16:23:18] <archivist> lots of guessing needed from the original
[16:23:57] <fenn> archivist: would a steel worm be better because it would gall less?
[16:24:03] <archivist> used nearest hob 24DP to make the wheel and under sized the worm to match
[16:24:36] <cradek> fenn: certainly but there would be no repeat business
[16:24:39] <archivist> fenn yes but original wasnt
[16:24:55] <cradek> I see that the original failed though...
[16:25:00] <archivist> hehe Ill be dead when the repeats needed
[16:25:11] <anonimasu> ^_^
[16:25:57] <archivist> at least it forced me to finish the other axis and learn a bit more gcode
[16:26:02] <anonimasu> :)
[16:26:05] <anonimasu> nice
[16:26:13] <cradek> why did you use a rotary table instead of helical milling to make the worm?
[16:26:38] <archivist> now I know I need spindle encoder and a 5th axis
[16:26:39] <cradek> I suppose it would give a slightly better worm
[16:27:02] <anonimasu> archivist: why do you need that for threadmilling?
[16:27:02] <archivist> better worm and form
[16:27:11] <anonimasu> isnt the cutter symmetrical all around?
[16:27:16] <archivist> anonimasu, hobbing
[16:27:18] <anonimasu> ah
[16:27:20] <anonimasu> yeah
[16:27:44] <anonimasu> brb
[16:27:54] <archivist> then all the funny shaped escape wheels etc
[16:28:02] <cradek> a couple sine bars would be enough wouldn't they? you could just tilt the rotary.
[16:28:05] <archivist> no more filing
[16:28:32] <archivist> trying to reduce setup time as well
[16:28:34] <cradek> what kind of escape wheel needs 5 axis?
[16:28:54] <archivist> verge
[16:29:10] <cradek> oh right, england
[16:29:11] <archivist> well 4 for that
[16:29:44] <cradek> I'm anxious to make a fusee on my new lathe (after the retrofit)
[16:30:36] <archivist> fusee should be easy now on this, just need the gcode
[16:30:52] <cradek> yep
[16:32:04] <cradek> Daniels has a diagram in his book showing the proper curve - and I don't understand a bit of it
[16:32:09] <archivist> U type trunion with the A axis on so I can tilt for screws and hobbing and 0 90 for the rest
[16:33:21] <archivist> George Daniels? we shook hands at a ceremony
[16:34:25] <cradek> "The above assumes that the fusee curve is to be part of a circle (which from a practical viewpoint is probably satsifactory)" [first google hit, bhi]
[16:34:44] <archivist> must look in his book, I have A.L. Rawlings book as well and he has some on fusee curves
[16:36:28] <cradek> http://books.google.com/books?id=S69BAAAAIAAJ&pg=PA44&lpg=PA44&dq=fusee+curve&source=web&ots=p7K6my5moS&sig=sSZrUQsXruk3_VRxXDvLmHd4gjM&hl=en&sa=X&oi=book_result&resnum=2&ct=result#PPA44,M1
[16:36:44] <archivist> ug Rawling has the evil maths
[16:39:04] <archivist> hmm I have a later version of that at home http://www.collection.archivist.info/searchv10.php?srcdata=title&srcprog=searchv10.php&searchv4page=1&errlev=0&searchstr=Applied+Mechanics+and+Mechanical+Engineering
[16:40:28] <cradek> maybe 1943 will have less fusee info than 1903 though :-)
[16:41:45] <archivist> I have a few others to look in http://www.collection.archivist.info/searchv10.php?srcdata=title&srcprog=searchv10.php&searchv4page=1&errlev=0&searchstr=Jamieson
[16:42:25] <archivist> the elementary version may not have it
[17:01:19] <skunkworks_> my mother-in-law found this clock http://cgi.ebay.com/Working-Antique-Gilbert-Chiming-Mantle-Clock-1903_W0QQitemZ150273625311QQihZ005QQcategoryZ13853QQssPageNameZWDVWQQrdZ1QQcmdZViewItem
[17:01:34] <skunkworks_> it dings at the half hours and chimes at the hours. sound nice.
[17:03:26] <skunkworks_> http://www.cnczone.com/forums/showthread.php?t=61690
[17:31:49] <skunkworks_> logger_emc: bookmark
[17:31:49] <skunkworks_> Just this once .. here's the log: http://www.linuxcnc.org/irc/irc.freenode.net:6667/emc/2008-07-24.txt
[17:59:00] <cradek> skunkworks_: looks like you gave good advice. maybe the parport doesn't work right.
[18:00:13] <skunkworks_> cradek: ok
[19:05:33] <gotnone> I am interested in finding out some info on the lathe threading capabilities of emc2. Is anyone familiar with this aspect?
[19:06:07] <cradek> yes I am
[19:10:59] <gotnone> cradek, how accurate is the phase of thread starts with emc? I am interested in using it in an application where the angle of the start must be accurate within 2 degree. Is this achievable?
[19:11:24] <cradek> yes it is accurate to the resolution of your spindle encoder, since every threading pass starts with an index pulse.
[19:12:07] <gotnone> cradek, can the start of the pass be offset from the index pulse, or is it bound to the pulse?
[19:12:34] <cradek> it is bound to the pulse. to do multistart threads for instance, you would need to offset the pass's start in Z.
[19:13:43] <gotnone> I see. Would a single pulse/rev be adequate for good accuracy?
[19:14:15] <cradek> in the development version of emc2, there is very new support for that configuration. In the released versions you need an encoder.
[19:14:59] <gotnone> cradek, does the documentation have any recommended encoder hardware?
[19:15:03] <cradek> I have not ever used single pulse/rev so I cannot say how well it works, except that I am wary because I have seen some poor quality threads cut this way.
[19:15:42] <cradek> gotnone: there is a lot of supported hardware that reads encoders. also for a spindle encoder you could read it in software because it does not need a super high resolution or high speed.
[19:16:02] <cradek> I have cut lots of threads on a lathe with the spindle encoder hooked directly to a parallel port.
[19:16:34] <gotnone> on your setup, how many inputs/rev does your parallel port recieve?
[19:16:41] <gotnone> pulses
[19:18:05] <cradek> the parport can be read every 20 microsec, so if you think about the maximum rpm you want to use to thread, you can derive the correct number of lines for your encoder
[19:18:29] <cradek> I am not sure what mine was. I have encoder reading hardware now on that lathe, and a 1024 line encoder I think.
[19:19:13] <cradek> I meant 'can be read ABOUT every 20 microsec' - depending on your computer it may be more or less.
[19:19:33] <cradek> (I think all modern machines can do 20 microsec pretty easily.)
[19:21:55] <gotnone> Ok thanks for the tips.
[19:24:22] <cradek> welcome
[19:25:05] <gotnone> cradek, I found some good resources under cnczone too.
[19:25:26] <cradek> good
[19:25:36] <cradek> for emc2 information, our mailing lists are probably better than cnczone
[19:25:48] <cradek> nice archive: http://news.gmane.org/gmane.linux.distributions.emc.user
[19:26:19] <cradek> http://search.gmane.org/search.php?group=gmane.linux.distributions.emc.user&query=spindle+encoder
[19:38:09] <skunkworks_> gotnone: http://youtube.com/watch?v=ACvRilmIKDQ
[19:38:17] <skunkworks_> ^ I love that..
[19:38:41] <skunkworks_> http://jmkasunich.com/pics/fusee-DSC00563.jpg
[19:58:04] <gotnone> skunkworks, thanks for the link. Thats some neat stuff.
[20:11:54] <acemi> http://www.linuxdevices.com/news/NS4282988768.html
[20:47:54] <Roguish> little help with a jog wheel????
[20:48:51] <Roguish> when i spin the jogwheel slowly the axis moves smoothly, when i spin it quickly, the axis jerks and stutters and even doesn't make any motion progress??? what is going on?
[20:49:38] <Roguish> in jog-vel-mode. nothing else really out the ordinary.
[20:50:24] <SWPadnos> can you post your hal files?
[20:51:56] <Roguish> sure. http://pastebin.com/d3dfb6737
[20:53:49] <Roguish> i'm running in torque mode and still doing a bit of tuning, but that's a separate problem.
[21:13:35] <SWPadnos> hmmm. at first glance, that looks quite convoluted :)
[21:15:09] <Roguish> that's just my selection stuff. the first section is just that - first. can be done easier. look at the jog section, and the actual encoder area.
[21:16:14] <SWPadnos> well, I'm assuming that you've left the servo period at 1 ms, and that the 5i20 digital read function is in that thread, right?
[21:16:40] <Roguish> i believe so.
[21:16:45] <SWPadnos> and this jog thread is 5x slower, running at a 5ms period
[21:17:43] <Roguish> the jog thread is only for the switches. (supposed to be)
[21:18:04] <Roguish> SERVO_PERIOD = 1000000
[21:18:11] <Roguish> from the ini file.
[21:18:14] <SWPadnos> except that you put the encoder count and capture functions into the jog thread, not the servo thread
[21:18:23] <SWPadnos> ok
[21:18:37] <SWPadnos> so it can only count once pre 5 ms, or at 200 Hz
[21:19:01] <SWPadnos> however, the encoder omdule is in 1x mode, which I think means that it only counts full cycles, not each edge
[21:19:09] <BigJohnT> where is a good place to purchase a 100 ohm 10 turn pot?
[21:19:11] <SWPadnos> that means that you only get at most one count every 20 ms
[21:19:24] <SWPadnos> digikey
[21:19:35] <BigJohnT> thanks SWPadnos
[21:19:47] <SWPadnos> sure
[21:20:10] <Roguish> that's probably it. i will change it now and see what happens.
[21:20:44] <SWPadnos> even at the servo rate, you'll be limited to 250 counts/sec (which should be OK with a 100-count/rev handwheel - that's 150 RPM :) )
[21:22:19] <SWPadnos> wow - I didn't know they made 0.2% pots
[21:23:54] <Roguish> SWPadnos, you're a genius !!!!! thanks for the 2nd set of eyeballs.
[21:24:02] <SWPadnos> sure
[21:24:06] <SWPadnos> thanks :)
[21:24:22] <Roguish> now back to tuning.
[21:24:35] <SWPadnos> I'm willing to bet that the selection and scaling can be done a lot simpler
[21:25:14] <Roguish> yeah, i'm sure they can. gotta get is working for monday. then i can make it pretty.
[21:25:45] <Roguish> i'm integrating into an existing panel (delta tau)
[21:28:03] <SWPadnos> cool
[21:40:14] <BigJohnT> that was easy
[23:31:36] <skunkworks> jmkasunich: http://www.electronicsam.com/images/KandT/servostart/newschem5.png
[23:32:18] <skunkworks> I added diodes before the input of the comparator.. good/bad/indifferent?
[23:32:40] <skunkworks> with the .012 ohm resistor... I would never get to .6v
[23:32:59] <skunkworks> but it would take care of any cool spikes.
[23:34:09] <skunkworks> .015ohm..
[23:36:31] <SWPadnos> what kind of resistor has 4 terminals?
[23:37:28] <skunkworks> kenvin config.. :) yes I just learned that.
[23:37:53] <SWPadnos> kenvin?
[23:38:20] <skunkworks> http://www.ohmite.com/cgi-bin/showpage.cgi?product=10_series#four
[23:38:36] <SWPadnos> ah, Kelvin :)
[23:41:25] <skunkworks> sorry
[23:41:35] <skunkworks> I knew what I ment..
[23:41:36] <skunkworks> ;)\