#emc | Logs for 2009-04-11

[00:00:05] <Skullworks> fish :~
[00:14:24] <Optic> <>-~-<
[00:19:55] <BigJohnT> yep divide by 128
[00:20:03] <BigJohnT> sorry the fish is gone now
[00:20:36] <BigJohnT> pan fried bluegill better than potato chips
[00:27:30] <BigJohnT> dang lumpy internet
[00:39:30] <Skullworks> still better than down in MX
[00:39:54] <BigJohnT> heh
[00:40:34] <Skullworks> was annoying to go to google and end up at google.com.mx Hola!
[00:41:41] <BigJohnT> that would be weird
[00:50:00] <tomp> didnt it have a thing at top asking if you wanted to change, and cancel revret to .en ?
[00:50:34] <tomp> and there some pref yo can set , i keep a 'google us not ataiwan' link in my bookmarks
[00:51:08] <tomp> http://www.google.com/webhp?hl=eN
[00:51:17] <tomp> is always english
[00:51:58] <toastydeath> in soviet russia, english is always in YOU
[00:52:11] <tomp> buy russian war bonds!
[00:53:24] <toastydeath> or you could just buy stocks in the defense contractors supplying both sides of the conflict
[00:53:40] <tomp> "if theres one thing i wouldnt be twice, zombies is both of 'em" closing comment of last bmoviedrivein movie
[00:53:47] <tomp> just ended
[00:53:50] <toastydeath> lol
[00:54:45] <tomp> off to work , i hear its easter! sheesh
[00:57:45] <toastydeath> here's what i want to know
[00:57:54] <toastydeath> what retarded 77 year old woman intervenes in a swordfight
[00:58:17] <BigJohnT> beats me
[00:58:31] <toastydeath> and is it REALLY the fighter's fault if she dies?
[00:58:36] <toastydeath> i say, no, it is not.
[01:01:52] <BigJohnT> it's sad that when your brain starts to fail that weird stuff seems real to you
[01:19:24] <BigJohnT> goodnight all
[02:20:08] <jmkasunich> http://jmkasunich.com/pics/vise-on-2-4-6-blocks-2800.jpg
[02:20:31] <jmkasunich> a bit more rigid than my former setup
[02:32:02] <LawrenceG> jmkasunich, cool... I need a couple of those blocks
[02:35:37] <jepler> jmkasunich: those are the ones on sale at enco this month?
[02:45:06] <jmkasunich> jepler: I got those from a local supplier (via ebay)
[02:45:14] <jmkasunich> pretty much the same thing tho
[02:46:22] <jmkasunich> http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=250368868606
[02:49:51] <jmkasunich> in case anybody else needs some, they've listed more:
[02:50:03] <jmkasunich> http://cgi.ebay.com/1-SET-2-4-6-BLOCKS-NEW-GAGE-BLOCKS-TOOLING-NEW_W0QQitemZ380116000796QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item380116000796&_trksid=p3286.m20.l1116
[02:50:20] <jmkasunich> dunno how price + shipping compares with the enco sale and a free shipping code
[02:50:53] <toastydeath> 2-4-6 blocks are way more useful than 1-2-3's
[02:53:17] <jmkasunich> toastydeath: I imagine that depends on the kind of stuff you work on
[02:53:30] <jmkasunich> if you have a sherline, a 2-4-6 on the table might make the mill tip over
[02:53:57] <toastydeath> i guess
[02:54:02] <toastydeath> even on small stuff i like the larger blocks
[02:56:25] <toastydeath> the guy who runs the grinders made a set of really big parallels
[02:56:29] <toastydeath> they're like 4x24
[02:56:39] <toastydeath> flat and parallel to .0002"
[02:56:47] <jmkasunich> nice
[02:57:01] <jmkasunich> I was at HGR today, and saw some even bigger "parallels"
[02:57:03] <toastydeath> except they're enormous and hard to move
[02:57:23] <toastydeath> they're 4 wide x 6 tall, you see
[02:57:30] <toastydeath> what kind of large parallels?
[02:57:39] <jmkasunich> dunno if they are actually accurate enough for setup, but there were two pieces of ground steel, 4" x 4" x 4'
[02:58:12] <toastydeath> could you tell if they were blancard or straight ground
[02:58:20] <jmkasunich> straight
[02:58:50] <toastydeath> hopefully they'd be accurate enough for setup then
[02:59:06] <jmkasunich> as long as you have a crane handy
[02:59:19] <toastydeath> hahah
[03:14:11] <cradek> jmkasunich: neat, that looks like just what you needed.
[03:15:03] <jmkasunich> yep
[03:20:47] <jmkasunich> anybody using dapper right now?
[03:21:00] <jmkasunich> does youtube work for you?
[03:21:19] <jmkasunich> I get: Hello, you either have JavaScript turned off or an old version of Adobe's Flash Player. Get the latest Flash player.
[03:21:39] <jmkasunich> the link has a player that is for 8.04 and later only
[03:21:48] <cradek> jmkasunich: wow, the holes in that are the same spacing as your T slots - that's amazing.
[03:22:22] <jmkasunich> not exactly the same
[03:22:36] <jmkasunich> but 3/8" studs in 5/8" holes gives you some wiggle room
[03:23:26] <jmkasunich> I need to get some bolts that are the right length
[03:23:39] <jmkasunich> the nuts extend above the bed of the vise
[03:24:03] <cradek> that's no good
[03:24:09] <jmkasunich> for today's job that was actually an advantage - remove collet block, flip 180 to mill other side, slide against nut to set axial position
[03:24:19] <jmkasunich> but most of the time - no good
[03:24:48] <jmkasunich> my old vise risers were 4 pieces of 2" round, with holes drilled in the middle for the studs
[03:24:56] <jmkasunich> I had bolts the right length, with low heads
[03:27:31] <cradek> what's this project?
[03:28:23] <jmkasunich> pcb spindle
[03:28:47] <jmkasunich> specifically tonight? the nut that goes on the back of the spindle and compresses the bearing preload spring
[03:29:04] <cradek> ah, making a square nut?
[03:31:45] <jmkasunich> round, with 2 flats
[03:32:01] <toastydeath> heresy
[03:32:26] <toastydeath> i had to make 80 tpi locknuts this week
[03:32:28] <cradek> I made a very nice hex nut a while back - only one I've ever done
[03:32:36] <toastydeath> 100 of them
[03:32:40] <cradek> more work than you'd think
[03:32:49] <cradek> what kind of locknut?
[03:32:54] <jmkasunich> 3x more work than I needed ;-)
[03:33:22] <toastydeath> i dunno, it was like a .340 bore or something with a 80 tpi thread, .190" wide, .540 across flats
[03:33:39] <toastydeath> they go on these ball-ended screws we use for levelling jacks on the bearings
[03:33:52] <cradek> oh, not 0-80, they were large-80
[03:34:00] <toastydeath> yeah
[03:34:02] <toastydeath> sorry
[03:34:04] <cradek> cool
[03:34:09] <cradek> np
[03:34:14] <toastydeath> i didn't know there was anything that legitimately had an 80 tpi thread
[03:34:15] <cradek> I was thinking that was a pretty small tap.
[03:34:28] <toastydeath> (like 0-80)
[03:34:29] <cradek> yeah 0-80 is NF I think
[03:34:42] <jmkasunich> NC
[03:34:52] <cradek> NF or NC :-)
[03:35:04] <cradek> jmkasunich: what's 0 NF?
[03:35:23] <jmkasunich> dunno, I just know 0-80 is C
[03:35:40] <toastydeath> but the threads were such a pain in the ass
[03:35:45] <toastydeath> the boring bar wears so fast
[03:35:59] <toastydeath> chip gets in the way, poof, bad thread
[03:36:17] <toastydeath> oh also the bar feed decided to clamp on itself
[03:36:30] <cradek> nope, 0-80 is UNF, there is no 0 UNC (MH Ed. 28)
[03:36:35] <toastydeath> and try to machine a .190 locknut out of 6" of hardened steel bar pusher rod
[03:37:03] <jmkasunich> huh
[03:37:19] <toastydeath> the part is .190 long
[03:37:31] <cradek> 1-64 is the smallest UNC
[03:37:42] <toastydeath> oh, that was to cradek, sry
[03:38:13] <cradek> toastydeath: sounds like a nasty job
[03:38:34] <toastydeath> it wasn't too bad, i'm just irritated that the bar magazine destroyed itself
[04:07:21] <[1]a-l-p-h-a> [1]a-l-p-h-a is now known as a-l-p-h-a
[06:16:07] <[1]a-l-p-h-a> [1]a-l-p-h-a is now known as a-l-p-h-a
[10:39:00] <motioncontrol> good morning.i have one problem with parallel port. when i use the stepper_mm.ini config file and start emc the terminal see the error: hal_parport.ko : -1 device or resourse busy.i use the live cd because this problem ?
[10:50:41] <Guest252> Has anyone built emc2 with Debian Lenny?
[11:06:08] <tomp> motioncontrol: i would believe half the error message "hal_parport.ko : -1 device or resourse busy", meaning theres some problem withthe parport, but not necc that it is busy.
[11:06:39] <tomp> motioncontrol: see if you can see the device in halscope or halmeter ( 1st verify that emc thinks it exists )
[11:08:26] <tomp> maybe this link , http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?TroubleShooting#Parallel_port_no_longer_works_in_EMC_2_0_1_or_later_hal_parport_Device_or_resource_busy
[11:09:56] <tomp> and on same page point 9, testing par port
[11:11:42] <tomp> hmm, you wont be able to test with hal unitl its loaded, so check dmesg fro discovery of the port and for failures of kernel driver to install (.ko)
[11:14:56] <tomp> and pont 5 suggests a 'loadrt probe_parport' before the line loading hal_parport in your hal file. fro 'some' systems
[11:15:16] <tomp> s/pont/point
[12:20:58] <tomp> hmm,i wonder if i >can< make relay sockets for orcad
[12:21:06] <tomp> some connections aren't on edge,
[12:21:08] <tomp> they're on a row inside the edge ( eg: 4 formC )
[13:16:10] <motioncontrol> ok thanks tomp i control your help
[14:33:55] <Master15> Hi. I have some question about milling. I have a drawing with polygons. Now I want to countersink it. But I think that the thickness of the cutter is important. Is it correct that I must redraw the polygons in the cad-program and take note of the cutter-radius? I always must redraw it when I use another cutter??? Sorry for my bad english? my german is much better? hoffentlich ;-)
[14:35:01] <cradek> can you explain what you mean by countersink in other words?
[14:38:26] <Master15> very difficult... do you not understand what I mean?
[14:39:27] <cradek> sorry no, I do not understand what kind of milling you mean
[14:39:36] <cradek> do you have a picture of what you are doing?
[14:41:56] <Master15> This machine: http://www.cnc-step.com/S-1000_Fraesmaschine_CNC_STEP_1.jpg
[14:43:05] <archivist> that does not match the question
[14:43:51] <Master15> I use Win-PCNC and I yesterday I installed ubuntu with emc2. Now I want to make some test with this machine and I have draw something with Autocad.
[14:44:16] <cradek> ok
[14:45:14] <Master15> I have draw it 1:1. OK?
[14:46:07] <cradek> ok you are drawing some lines/arcs in autocad
[14:46:15] <Master15> yes
[14:46:54] <Master15> the cutter works along this lines?
[14:47:26] <cradek> that depends on how you go from lines/arcs in autocad to gcode
[14:47:54] <cradek> I think you will need to explain each step for us to understand what you are doing
[14:48:10] <archivist> http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Cam
[14:48:55] <cradek> I don't understand if you already have some part machined and you want to do an additional operation to refine the part, or if you are asking how to get your autocad drawing into gcode
[14:51:51] <Master15> The problem is, that the cutter works along the lines. The cutter has a radius. It's very difficult to describe it...
[14:55:04] <cradek> yes in general if you go to a larger radius cutter, you need to offset the path outward
[14:55:17] <cradek> or, the other option is to use cutter diameter compensation in the gcode
[14:55:20] <Master15> yes you understand me
[14:56:51] <cradek> in autocad if you use a polyline for a closed cutter path, you can use the OFFSET command
[14:57:53] <Master15> ok but i must redraw it for each cutter. If a cutter gets broken I want to use a larger cutter.
[14:58:27] <Master15> sorry I want = I have to
[14:59:08] <Master15> or, the other option is to use cutter diameter compensation in the gcode <- How can I do that... Are there some tutorials?
[14:59:26] <cradek> are you using emc 2.2 or 2.3
[15:00:33] <cradek> http://www.linuxcnc.org/docs/devel/html/gcode_tool_compensation.html#sec:Cutter-Radius-Compensation
[15:00:41] <cradek> here are the 2.3 instructions
[15:01:03] <cradek> if you are not using 2.3 you probably want to upgrade to the 2.3 beta before learning cutter radius compensation. It is much easier to use now in 2.3.
[15:01:38] <cradek> here are instructions for updating from 2.2 to 2.3: http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?UpdatingTo2.3
[15:02:33] <Master15> I do not have the version 2.3
[15:02:38] <cradek> I have to go now, I hope you can get it working, ask more questions if not, and someone will help
[15:02:52] <Master15> thank you for your help
[15:02:57] <cradek> you're welcome
[15:03:51] <SWPadnos> whoa. strange
[15:04:11] <SWPadnos> world news that's based on a guy who lives (or lived) a few miles from me
[15:05:26] <jlmjvm> anyone have a copy of axis.py for 2.2.2?
[15:05:37] <SWPadnos> cvs.linuxcnc.org sure does
[15:08:44] <eric_unterhause1> I installed a web site editor and realized I have no idea what to do with it :)
[15:33:09] <Skullworks> If I had not looked outside I would not know it is snowing.
[15:44:33] <alSMT_> hello
[15:44:37] <alSMT_> [ 4223.280858] 66: ERROR: Unexpected realtime delay: check dmesg for details.
[15:44:37] <alSMT_> [ 4223.280903]
[15:44:37] <alSMT_> [ 4223.280920] In recent history there were
[15:44:37] <alSMT_> [ 4223.280924] 558163, 545503, 565277, 546100, and 504211
[15:44:37] <alSMT_> [ 4223.280929] elapsed clocks between calls to the motion controller.
[15:44:37] <alSMT_> [ 4223.280956] This time, there were 622030 which is so anomalously
[15:44:41] <alSMT_> [ 4223.280962] large that it probably signifies a problem with your
[15:44:44] <alSMT_> [ 4223.280967] realtime configuration. For the rest of this run of
[15:44:45] <alSMT_> [ 4223.280973] EMC, this message will be suppressed.
[15:45:21] <eric_unterhause1> did you look up realtime delay in the wiki?
[15:45:55] <alSMT_> this didn't show on 2.2.8
[15:46:38] <eric_unterhause1> it did if you had an unexpected real time delay
[15:47:04] <alSMT_> just went to beta and here it is
[15:47:39] <eric_unterhause1> what kind of system?
[15:47:49] <eric_unterhause1> stepper/servo/pack mule?
[15:47:58] <alSMT_> stepper
[15:48:59] <alSMT_> i'm using a base period of 40000
[15:49:28] <Skullworks> any cd in the drive?
[15:49:57] <alSMT_> if you are talking to me no
[15:50:07] <skunkworks> what about a usb key drive?
[15:50:14] <alSMT_> no
[15:50:22] <skunkworks> onboard video?
[15:50:24] <eric_unterhause1> same computer as before?
[15:50:27] <alSMT_> yep
[15:50:34] <alSMT_> same
[15:50:58] <skunkworks> does the videocard share main memory?
[15:51:09] <alSMT_> yes
[15:51:20] <alSMT_> intel 810
[15:51:58] <eric_unterhause1> do you still have the 2.2.8 installed?
[15:52:27] <alSMT_> I can get back but ?
[15:53:13] <eric_unterhause1> I get this on my system too, latency test results are mediocre, but nothing like 1/2 second delays
[15:53:22] <eric_unterhause1> then I run emc, and I get 1/2 second delay
[15:54:10] <alSMT_> i'm running classicladder also could this be a problem?
[15:54:14] <eric_unterhause1> I have a theory that it's related to the startup, but I'm too lazy to figure out how to test that
[15:54:27] <eric_unterhause1> has something changed since you ran 2.2.8?
[15:55:06] <alSMT_> let me try a diff configuration i have
[15:55:28] <eric_unterhause1> need a hal pin called "overrun"
[15:57:07] <alSMT_> why would this not show up with 2.2.8
[15:57:26] <eric_unterhause1> if you told me why it shows up, I could answer that
[15:58:59] <eric_unterhause1> what was your max latency on the latency test?
[15:59:55] <alSMT_> i have'nt ran it since year in half she ran fine on 2.2.8
[16:00:17] <SWPadnos> what's the CPU speed?
[16:00:27] <SWPadnos> it looks like it might be 1.2GHz
[16:00:35] <alSMT_> celron 566
[16:01:49] <SWPadnos> hmmm
[16:02:13] <eric_unterhause1> I wonder how it was working on 2.2.8
[16:02:43] <SWPadnos> it's a little slow, but that shouldn't be the problem
[16:02:54] <SWPadnos> oh, duh
[16:03:18] <SWPadnos> I'm looking at the servo period clocks (~500k) and trying to fit that into a 40000 base period
[16:03:35] <SWPadnos> before having enough coffee to realize that it's off by an order og magnitude :)
[16:03:38] <SWPadnos> of
[16:10:47] <SWPadnos> alSMT_, there aren't many changes to that code in 2.3 beta2 (relative to 2.2.8)
[16:11:04] <alSMT_> ok
[16:11:44] <SWPadnos> so there's either a change in RTAI (which I don't think is true - I don't believe there's a kernel change for 2.3), a change somewhere else in HAL, or another change (drivers, etc.) that's causing it
[16:12:10] <eric_unterhause1> 2.3 changes the kernel?
[16:12:14] <SWPadnos> which X driver are you using? (VESA or i810)
[16:12:22] <SWPadnos> no, I just said the opposite of that :)
[16:12:28] <alSMT_> i810
[16:12:42] <SWPadnos> ok, if that driver has changed, that could do it
[16:12:45] <eric_unterhause1> redin' comprenshen problem
[16:12:54] <SWPadnos> you might try VESA, though it will slow things down a bit :)
[16:13:44] <alSMT_> the driver shouldn't have changed?
[16:14:05] <eric_unterhause1> too bad there's no such thing as a hardware debugger any more
[16:14:07] <SWPadnos> if you've kept the system up to date, it could have
[16:14:24] <SWPadnos> eric_unterhause1, there is, but they're $250k now
[16:14:27] <SWPadnos> or more
[16:15:17] <alSMT_> how do I ck witch driver is being used?
[16:16:02] <SWPadnos> you can look at /var/log/Xorg.0.log
[16:16:16] <SWPadnos> search for "Driver", and you'll see all the loaded drivers
[16:16:25] <SWPadnos> or look for i810 or VESA
[16:31:15] <Goslowjimbo> I am attempting to use a Mesa Electronic's 7i43 board and would like some clarification of how to address a gpio pin in hal.
[16:33:27] <Goslowjimbo> One version of the man hostmot2 tells me it should be hm2_7i43.0.gpio.IONum, another tells me it should be hm2_7i43.0.gpio.PortName.PinNum.
[16:34:30] <Goslowjimbo> I've posted the error output of the startup of EMC on Pastebin M3e0d3bed.
[16:35:08] <SWPadnos> Goslowjimbo, comment out the lines in your HAL file that try to connect to GPIO pins, then run EMC2
[16:35:36] <SWPadnos> while ENC2 is running, run halmeter from the Machine menu (I think), and look at the pin list
[16:35:44] <SWPadnos> err. EMC2
[16:36:03] <SWPadnos> or, you can run halcmd and use "show pin hm2_7i43" (without the quotes)
[16:36:42] <Goslowjimbo> The only line I've edited is the 3rd from the last, trying to link an Estop signal to physical pin 41 as an output.
[16:37:08] <SWPadnos> are you asking what the names are, or how to figure out which pin has what name?
[16:37:27] <SWPadnos> you can easily see the names by using halcmd while EMC2 is running
[16:38:28] <Goslowjimbo> I believe I am asking how to figure out which pin has what name.
[16:38:45] <SWPadnos> well that's a harder problem (for me :) )
[16:39:31] <SWPadnos> I believe the hostmot driver puts a full pin list in dmesg, so if you run EMC (even if it fails), you can use "dmesg | less" to look at the available pins
[16:39:55] <SWPadnos> I believe there are also pinout files in the firmware directory, but I can't tell you where that is on an installed system
[16:41:14] <Goslowjimbo> The Dmesg is what I put on Pastebin. It has 2 listing for each pin. I don't know what the IONum or PinNum is on that listing.
[16:41:51] <SWPadnos> is that pastebin.ca, pastebin.com, or somewhere else?
[16:43:19] <SWPadnos> which firmware are you using?
[16:43:58] <SWPadnos> this directory has the pin files for all the 7i43 firmware: http://cvs.linuxcnc.org/cvs/emc2/src/hal/drivers/mesa-hostmot2/firmware/7i43/
[16:44:10] <Goslowjimbo> I posted it a few hours ago on .com (i thought). Can't find it now.
[16:45:24] <Goslowjimbo> I'm using the latest revision as of a month ago.
[16:46:33] <SWPadnos> look in the directory I just posted, find the PIN file for the firmware you're using (there are several), and look at the list of pins in that file
[16:46:54] <SWPadnos> it clearly tells you which connector pin maps to what I/O or other function
[16:47:21] <SWPadnos> there are several different firmwares you can use with the 7i43, so "the latest" doesn't tell me much :)
[16:47:30] <SWPadnos> bbl - gotta go change some tires
[16:50:14] <Goslowjimbo> I'll have to go back to the machine to determine exactly. I have both the Ubuntu 8.04 live distibution and a CVS version on the same machine.
[17:07:14] <maddash> greetings, friends
[17:42:40] <alSMT_> is it a problem for me to change the TRAJ_PERIOD =10300000 and the SERVO_PERIOD = 1030000 in the ini file
[17:48:53] <Guest923> Does anyone know how to make the step pulse stay high for longer then 50000ns?
[18:00:23] <alSMT_> is it a problem for me to change the TRAJ_PERIOD =10200000 and the SERVO_PERIOD = 1020000 in the ini file when I change these my error message go away
[18:01:48] <eric_unterhause1> I don't think you'll be happy with that
[18:02:07] <alSMT_> why is that
[18:02:52] <SWPadnos> these days, TRAJ_PERIOD mighta s well be the same as SERVO_PERIOD
[18:03:02] <SWPadnos> so they can both be 1020000
[18:03:25] <alSMT_> will this be trouble?
[18:03:25] <SWPadnos> I don't think it will matter much having a 1.02 ms servo period instead of 1.0ms
[18:03:29] <SWPadnos> don't think so
[18:03:34] <SWPadnos> steppers or servos though?
[18:03:41] <alSMT_> steppers
[18:03:51] <SWPadnos> ok, no PID then
[18:03:56] <alSMT_> no
[18:04:09] <SWPadnos> note that this doesn't solve the problem, it only makes it so EMC won't give you messages about it
[18:04:32] <eric_unterhause1> doesn't that mess up his steppers?
[18:04:37] <eric_unterhause1> and it's 10ms isn't it?
[18:04:41] <SWPadnos> the real problem is that there's a timing issue from time to time, and it happens to be very close to the threshold for EMC to warn you about it
[18:05:06] <SWPadnos> no, TRAJ_PERIOD is more or less unused these days, but it was generally 10x the servo period
[18:05:36] <SWPadnos> it used to bo 10ms TRAJ, 1ms SERVO, and as fast as possible BASE
[18:05:57] <alSMT_> that is the only thing I changed in the ini file
[18:06:34] <SWPadnos> this is a bit like putting blinders on a horse - it doesn't make the distractions go away, it just makes the horse not see them ...
[18:06:36] <alSMT_> my latency test came out the same as before
[18:06:54] <SWPadnos> ok, that's good to know
[18:07:58] <eric_unterhause1> SWPadnos: do you know which file keeps track of the real-time delay?
[18:08:25] <eric_unterhause1> or do I have to be a big boy and find it for myself
[18:09:06] <SWPadnos> src/emc/motion/control.c
[18:09:24] <SWPadnos> * SWPadnos looked it up earlier ;)
[18:10:02] <eric_unterhause1> thanks
[18:10:07] <SWPadnos> sure
[18:10:17] <SWPadnos> bbl - food time
[18:10:19] <eric_unterhause1> I just want to change it to spit out a dialog box every 1000 times it happens
[18:10:42] <SWPadnos> I thought there was a HAL pin with the number, but I didn't look for it
[18:10:47] <SWPadnos> maybe add that instead
[18:11:56] <SWPadnos> oh hey, there it is (maybe)
[18:11:58] <SWPadnos> overruns
[18:12:10] <eric_unterhause1> so I can have a halmeter?
[18:12:23] <Optic> i have a hal question :)
[18:12:36] <alSMT_> when I ran latency test I noticed that my servo period was above the 1.0ms
[18:12:47] <Optic> we have our laser engraver set up to turn the laser on when Z is negative
[18:12:53] <SWPadnos> eric_unterhause1, yex, motion.servo.overruns
[18:12:58] <SWPadnos> s/yex/yes/
[18:13:00] <eric_unterhause1> cool
[18:13:02] <SWPadnos> it's a param
[18:13:07] <Optic> I'd like to enforce the positiveness of Z before the start of a job
[18:13:11] <SWPadnos> now I'm really leaving. see you
[18:13:32] <Optic> or jog z to +0.001 or something when the user hits "stop"
[18:13:40] <Optic> is that kind of thing possible?
[18:13:48] <alSMT_> SWPadnos: thanks
[19:55:29] <guest3673456> hi. I was wondering if anyone could give me some pointers to do a closed loop spindle RPM control. I have an encoder on the spindle hooked up to a scale to output actual spindle RPM which is connected to the motion.spindle-speed-in. The spindle speed is controlled by a pwmgen channel, but since the pwm duty cycle is not linear to the actual spindle speed, I'm trying to figure out a way to have the HAL dynamically adjust the pwm
[19:56:36] <eric_unterhause1> why is it not linear?
[19:58:38] <dareposte> guest3673456: could you try a PDM output?
[19:59:00] <eric_unterhause1> what's pdm?
[19:59:19] <dareposte> pulse density modulation
[19:59:26] <guest3673456> i have a sieg X1 which has a potentiometer to control the speed. I replaced the potentiometer with a board i made which uses the pwm signal from the parallel port to charge a capacitor to create the reference voltage so I don't think it's linear, I think it follows the RC curve
[19:59:40] <cradek> often you get something fairly linear but with an offset
[19:59:47] <dareposte> the output is from emc, right?
[19:59:56] <eric_unterhause1> should be mostly linear
[19:59:58] <cradek> pwmgen has scale/offset to let you adjust this
[20:00:01] <eric_unterhause1> on average
[20:00:06] <guest3673456> the speed control works with commands like m3 s4000 but the rpm's don't match
[20:00:33] <guest3673456> and i was hoping to find a way to hook it up for EMC to self adjust the RPM based on feedback between the spindle in speed and spindle out speed
[20:00:35] <eric_unterhause1> sounds like cradek has your solution
[20:00:52] <guest3673456> @dareposte: yes, the pwm signal is from emc through pwmgen out a parallel pin port
[20:00:52] <dareposte> you are wanting a feedback loop then?
[20:01:10] <guest3673456> yes, i would like to figure out how to setup a feedback loop
[20:01:12] <eric_unterhause1> he wants a non-linear scale
[20:01:33] <dareposte> he wants to use the spindle encoder to feedback to like a PID loop or something
[20:01:49] <guest3673456> yeah, exactly, so it wouldn't matter if the speed control pwm was linear or not
[20:02:32] <dareposte> the easiest way would be to do what cradek said, use the offset/scale to get it close
[20:02:33] <cradek> you can definitely do it with pid
[20:02:52] <cradek> when I tried that, it didn't tune very well, because the spindle is so slow to respond
[20:02:56] <cradek> but no reason not to try it
[20:03:10] <guest3673456> i would prefer to use the pid loop so the machine could maintain spindle speed when cutting
[20:03:21] <guest3673456> i think i understand how to setup the pid loop
[20:03:25] <guest3673456> except for the output
[20:03:56] <guest3673456> the output would be a positive or negative number which is related to the difference in the actual speed and expected speed?
[20:05:48] <cradek> no, the output of pid would be the pwm to drive the motor
[20:05:50] <alex_joni> the output should be the corrected speed for pwmgen
[20:06:07] <alex_joni> if the pid loops sees your motor is too fast, it will reduce the pwm speed
[20:06:24] <cradek> pid takes "desired", "actual" and gives you an output that tries to drive the difference ("error") to zero
[20:06:29] <alex_joni> (the difference to last time will be negative, but the actual output is the lower speed)
[20:10:16] <guest3673456> let me try hooking it up to a pid component and see what it spits out with the default settings. I'm a little confused as to what the output would be if say the command=4000rpm and the feedback says 4000rpm, but let me hook it up and see waht it spits out for the output
[20:12:27] <alex_joni> if command=4000rpm, and feedback=4000rpm, the output will be 4000rpm
[20:12:34] <alex_joni> and the PID will be stable
[20:12:40] <alex_joni> (that means the output doesn't change)
[20:13:04] <alex_joni> but you need to scale the output to fit the pwmgen
[20:13:28] <guest3673456> i think i understand
[20:14:48] <dareposte> i want to try that too, guest
[20:14:50] <dareposte> let me know how it goes
[20:15:30] <dareposte> i have a single index pulse on my spindle, and a PDM driven analog speed controller
[20:15:54] <dareposte> my rpm's are pretty close to what i request, but it would be nice to have it linked that way with a feedback loop
[20:16:31] <pjm__> yeah me too!!! interesting pointers above, my spindle has a 360ppr quadrature encoder, and a pulse train frequency driven VFD - problem is I know nowt about PID loops!
[20:17:04] <dareposte> do your rpms match pretty close?
[20:17:09] <Optic> so with gcode, is there a major cost to doing math?
[20:17:33] <eric_unterhause1> I'm not paying attention to you guys, I have to get the mill running lalalalalala
[20:17:34] <Optic> i could do scaling in my code generator, or I could leave variables at the top of the code and a multiplication on every line
[20:17:38] <Optic> which is best practice?
[20:17:39] <pjm__> dareposte they are within perhaps 1% so if I command 1000, the encoder shows 995 rpm
[20:17:54] <dareposte> plenty close for government work
[20:18:08] <SWPadnos> Optic, the amount of time it takes to do the math is insignificant compared to the time it takes to interpret the ASCII G-code into usable numbers
[20:18:20] <pjm__> hehh ah but it would be nice to maintain speed during cuts that may be just a little too heavy etc
[20:18:32] <Optic> so i might as well leave the math in the g-code and allow easy tweaking
[20:18:57] <guest3673456> i got it hooked up to the pid, but i think i need to setup the parameters. I can see the commanded rpm and the feedback rpm, but output is at zero. I'm reading the man page for the pid to see what i need to tweak
[20:20:31] <guest3673456> i'm going to be amazed if emc can compensate for the crappiness of my speed board. It's just an optocoupler i had lying around and a few resistors and a capacitor.
[20:20:59] <dareposte> the good thing about that is it's constant at least
[20:21:13] <alex_joni> guest3673456: there's an enable for pid too iirc
[20:21:24] <alex_joni> and you need to add the function to a thread
[20:21:59] <guest3673456> got the function added to the servo-thread already. I missed the enable pin.
[20:23:08] <Optic> also can you have comment-only lines in gcode?
[20:24:46] <dareposte> yeah
[20:24:55] <dareposte> just put them in ( )'s
[20:30:55] <guest3673456> hmm, it kind of works
[20:31:11] <alex_joni> guest3673456: you now need to tune the PID
[20:31:24] <alex_joni> so it stops oscillating, or whatever it's doing :)
[20:31:24] <guest3673456> it seems to have steady stated at pid.command=1001 pid.output = 679 pid.feedback=323
[20:31:47] <alex_joni> that sounds wrong
[20:31:57] <alex_joni> you need to get scales right, for this to make sense
[20:33:04] <guest3673456> would it matter what my output scale is? I'm thinking that if the feedback value is under the command value it would keep on increasing output to compensate until the feedback and the command do match
[20:35:49] <alex_joni> unless it saturates
[20:36:04] <guest3673456> my pwm scale is 4000rpm
[20:36:27] <guest3673456> and my feedback and command are both from 0 - 4000rpm
[20:36:42] <alex_joni> how did you enter pwm scale 4000 ?
[20:37:02] <guest3673456> setp pwmgen.0.scale 4000
[20:37:16] <alex_joni> I don't think that's right
[20:38:52] <guest3673456> hmm, i interpeted the pwmgen as when pwmgen.0.value == pwmgen.0.scale then duty cycle = 100%
[20:39:28] <guest3673456> the higher the duty cycle the higher the voltage my board puts out to increase spindle speed
[20:39:34] <alex_joni> hmm.. you're right
[20:39:37] <alex_joni> it's ok I guess :)
[20:39:54] <alex_joni> so at 100% duty cycle, the spindle runs at 4000 rpm?
[20:40:01] <guest3673456> i could be wrong though, this is my first experience really messing around with the hal
[20:40:16] <guest3673456> at 100% duty cycle i measured the spindle at about 3800rpm
[20:40:31] <alex_joni> you can enter 3800 then :)
[20:40:56] <alex_joni> does your feedback also indicate 3800 at 100% duty cycle?
[20:41:23] <guest3673456> let me crank up the commanded speed all the way and see waht it says
[20:42:52] <guest3673456> pid.0.command = 4001 pid.0.feedback=~ 1780 pid.0.output = ~2220
[20:44:09] <alex_joni> what's pid.0.error?
[20:45:21] <guest3673456> pid.0.error = ~2220
[20:45:34] <alex_joni> sounds like it's still compensating..
[20:45:40] <alex_joni> P is probably way small
[20:46:22] <guest3673456> hmm, pid.0.Pgain = 1
[20:46:43] <guest3673456> let me try messing around with the tuning params to see if i can get it to compensate better
[20:47:00] <guest3673456> i don't want to waste everyone's time on stuff I can read about myself :-)
[20:47:14] <alex_joni> guest3673456: no harm in asking..
[20:48:05] <maddash> am I weird for naming each of my two uc stepgen modules?
[20:48:55] <maddash> the x-axis is Leona, and the other is Zack
[20:49:12] <maddash> I think I'll call the TP Bob
[20:49:56] <alex_joni> Bob sounds like a good name
[20:49:59] <alex_joni> solid and all
[20:50:23] <maddash> actually, Bob fits because of the clunkiness
[20:50:25] <maddash> :P
[20:50:34] <guest3673456> i like to call my x and y stepper axises lurch and hissy :-)
[20:51:16] <alex_joni> I'd settle for pugsley and wednesday
[20:51:36] <maddash> so, I herd you leik milling, so put a tp in your tp so you can interp while you interp
[20:52:22] <alex_joni> TP'ing? http://en.wikipedia.org/wiki/Toilet_papering
[20:53:33] <guest3673456> i think i'm getting closer... I bumped the pid.0.PGain from 1 to 10 and now i'm within 300rpm of error
[20:54:08] <maddash> alex_joni: wow -- that's got to be the article with the highest "citation needed" density
[20:54:56] <alex_joni> guest3673456: also add some FF1
[20:55:25] <alex_joni> that way the spindle will start changing speed when you command a new speed, not after some error builds up
[20:55:31] <alex_joni> I'd put FF1 =1 for testing
[20:56:39] <guest3673456> ah, i think i'
[20:56:43] <guest3673456> i'm beginning to understand
[20:57:21] <guest3673456> i think i'm steady stated with feedback != commanded because my Igain is too low
[20:57:27] <guest3673456> the Pgain gets me into the ballpark
[20:57:33] <guest3673456> and the lgain and Dgain fine tune it
[20:58:16] <guest3673456> my IGain and DGain are zero by default so there is actually no learning feedback
[20:58:43] <alex_joni> guest3673456: yup
[20:59:03] <guest3673456> haha, that was scary, i changed my IGain from 0 to 1 and the mill went from 500rpm to full speed
[20:59:17] <alex_joni> oops ..
[20:59:26] <alex_joni> long time accumulating errors :D
[20:59:43] <alex_joni> * alex_joni is off to bed
[20:59:48] <alex_joni> good night all
[20:59:50] <guest3673456> night, thanks for all you help!
[21:00:29] <alex_joni> guest3673456: it was probably nothing ;)
[21:00:55] <guest3673456> i owe you a virtual beer somewhere :-)
[21:01:16] <alex_joni> I don't drink any..
[21:01:25] <alex_joni> not even virtual one ;)
[21:01:28] <guest3673456> virtual root bear :-)
[21:01:45] <alex_joni> better, but still yucky :D
[21:01:57] <alex_joni> make it a virtual iced tea
[21:02:01] <guest3673456> deal
[21:02:18] <alex_joni> see you
[21:02:22] <guest3673456> night
[21:18:16] <cradek> whee, my fuel pump repair works great
[21:18:28] <cradek> of course, I should have taken a picture before I put it back together.
[21:23:36] <guest3673456> fuel pump for your car?
[21:33:52] <cradek> yes, made some new check valves for the fuel pump in my '52
[21:34:05] <cradek> the original design was flawed - it used rubber valves
[21:39:24] <guest3673456> that sounds pretty cool. is it hard to make a check valve?
[21:40:12] <cradek> the problem was it had to be flat so a ball valve couldn't fit. I just made reed valves out of brass - simplest possible design
[21:50:06] <pjm__> guest3673456 btw is it possible you could perhaps post your hal file etc to the wiki once u have the spindle speed pid stuff sorted, as an example for others (me included) to look at and learn?
[21:51:00] <Guest231> Running a threading code and the encoder count is not resetting every time during the threading cycle. What should I look for?
[21:54:37] <guest3673456> @pjm: not a problem. I think I almost got it working. I'll post the hal file after I got it working
[21:54:52] <pjm__> great! thanks a lot
[21:54:59] <guest3673456> no problem
[21:54:59] <pjm__> i will apply the same control to my mill soon
[21:55:54] <guest3673456> Do you have a speed control board already?
[21:56:04] <guest3673456> ugg, i should really change my name
[21:56:12] <guest3673456> guest3673456 is now known as FlyingElectron
[21:56:21] <pjm__> well i use a parpin from the PC and the stepgen in velocity mode
[21:56:38] <pjm__> so i have a 0 to 6GHz square wave that feeds the VFD
[21:56:53] <pjm__> sorry i mean 6KHz...
[21:56:53] <FlyingElectron> i see
[21:57:10] <FlyingElectron> the pid loop actually did the trick
[21:57:18] <pjm__> excellent
[21:57:27] <FlyingElectron> spindle rpm goes into the pid feedback
[21:57:40] <FlyingElectron> target rpm goes into the pid commanded value
[21:57:45] <pjm__> currently i have displayed on axis the commanded speed and the actual speed
[21:58:17] <FlyingElectron> is it hard to get axis to display the rpms? It wasn't obvious how to get it to show it
[21:59:12] <pjm__> its pretty simple i recall, let me have a quick pick thru the files here
[22:01:25] <FlyingElectron> cool, thanks!
[22:02:16] <pjm__> http://pjm.dyndns.org/cam/pjm_emc2_configs_230109/configs/my-mill/rpm_display.txt - this is what i added to panel.xml
[22:02:29] <pjm__> to give u a commanded rpm and a bargraph of the actual speed
[22:03:22] <pjm__> then in my custom_postgui.hal i added net spindle-speed-ppr-filtered pyvcp.rpm
[22:04:57] <pjm__> look right at the bottom of http://pjm.dyndns.org/cam/pjm_emc2_configs_230109/configs/my-mill/custom.hal - it has the rpm conversion, a low pass filter to take the jitter out of the displayed rpm etc
[22:09:09] <[1]a-l-p-h-a> [1]a-l-p-h-a is now known as a-l-p-h-a
[22:12:00] <jlmjvm> what kind of mpg are you using
[22:17:30] <pjm__> i bought one from the little machine shop
[22:18:47] <pjm__> ah no it wasnt there, let me find it
[22:19:40] <pjm__> http://www.cnc4pc.com/Store/osc/product_info.php?cPath=40&products_id=158 this is the item
[22:20:04] <pjm__> i should have added it far sooner than i did, it is tedious to say the least without one
[22:21:40] <jlmjvm> is it a good unit
[22:22:30] <pjm__> i put another quadrature encoder on the Z axis control box too, currently its configured for a spindle speed override, but i'll eventually have its use selectable between spindle, feed override, and Z position
[22:24:59] <jlmjvm> have a spare encoder im not using,may try to display my rpms
[22:32:27] <FlyingElectron> I added the info about how to do closed loop spindle speed control to the wiki along with the HAL file code that is needed
[22:32:28] <FlyingElectron> http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Closed_Loop_Spindle_Speed_Control
[22:33:01] <pjm__> ah great!! i will read and digest
[22:34:42] <pjm__> i will try that tommorow
[22:37:09] <pjm__> tight time to hit the hay, gn all
[22:37:14] <FlyingElectron> night
[22:37:15] <pjm__> right /....
[22:37:17] <pjm__> gn
[23:48:32] <[1]a-l-p-h-a> [1]a-l-p-h-a is now known as a-l-p-h-a
[23:56:09] <maddash> ARGHHHHHHHHHH
[23:56:33] <maddash> what's the equation relating a capacitor's capacitance and it's rolling average period?!?!?!