#emc-devel | Logs for 2007-03-03

[00:12:19] <jmkasunich> hi guys
[00:12:55] <cradek> hi
[00:13:14] <cradek> Please read the HAL manual.
[00:13:18] <jmkasunich> I wonder why I keep replying to him
[00:13:32] <jmkasunich> I think it says something not-so-nice about me
[00:14:11] <cradek> it's nice to help I guess
[00:14:40] <jmkasunich> but putting not-so-subtle digs in the message isn't nice
[00:14:52] <jmkasunich> he irritates me, and I should just ignore him
[00:17:32] <jmkasunich> on a better note....
[00:17:36] <cradek> what are your plans for the weekend?
[00:17:41] <jmkasunich> I've been playing around with fpga tools
[00:17:52] <cradek> any progress?
[00:18:03] <jmkasunich> and (slowly) working on the new 5i20 driver
[00:18:25] <jmkasunich> peter wallace has sent me a couple updated versions, ball is in my court now
[00:18:31] <cradek> great
[00:19:03] <jmkasunich> the fpga development system is incredibly convoluted, to deal with a bazillion differnt design flows
[00:19:30] <jmkasunich> but I'm managed to figure out 95% of the specific flow that is relevant, and can use the command line to build the fpga
[00:19:46] <jmkasunich> gonna come up with either a script or a makefile one of these days
[00:20:13] <cradek> great
[00:20:38] <jmkasunich> so, what are your weekend plans?
[00:21:33] <cradek> clean a never-repaired monitor off one desk, move the mill there and set it up on a new computer, maybe work on the lathe, maybe fix a watch for someone I've been putting off
[00:21:52] <jmkasunich> busy busy
[00:22:07] <cradek> yeah, but more likely I'll sit on my rear the whole weekend
[00:22:13] <jmkasunich> heh
[00:22:28] <jmkasunich> I'm waiting for parts, then I have to repair the garage door opener
[00:22:41] <jmkasunich> the worm gear ain't gots no teeth anymore
[00:22:55] <jmkasunich> they turned into plastic dust on the bottom of the enclosure
[00:23:07] <cradek> yay for plastic
[00:24:22] <cradek> mine has a chain - pretty old
[00:24:30] <jmkasunich> ours does too
[00:24:41] <jmkasunich> the worm gear is between the motor and the chain sprocket
[00:25:14] <cradek> huh, strange place for a plastic part
[00:25:43] <jmkasunich> "self lubricating, low maintainence"
[00:25:54] <jmkasunich> "planned lifetime" too probably
[00:26:02] <cradek> no kidding
[00:26:03] <jmkasunich> its about 14 years old
[00:26:19] <cradek> I guess things wear out after 14 years
[00:26:22] <jmkasunich> replacement is $32.75 including tax and shipping, beats the heck out of a new opener
[00:26:33] <cradek> true
[00:26:43] <cradek> sears?
[00:26:47] <jmkasunich> yep
[00:27:01] <cradek> I've had great luck with ordering replacement parts for all sorts of sears stuff
[00:27:09] <jmkasunich> yep
[00:27:12] <cradek> 10-15 yrs old? no problem, here's the exploded diagram
[00:27:25] <jmkasunich> thats one thing they do right
[00:27:48] <cradek> only crap I ever bought there was a vacuum cleaner, everything else has been good
[00:28:32] <cradek> wonder how they keep all those parts for so long
[00:28:52] <jmkasunich> good question
[00:29:28] <jmkasunich> I wonder how long its gonna take to get the part
[00:29:39] <cradek> 'not long' is my experience
[00:30:43] <jmkasunich> 'This part has been processed in the system, but order status from the supplier is not yet available."
[00:31:00] <jmkasunich> thats not quite "its on our shelf and we'll ship today"
[00:31:09] <jmkasunich> I placed the order about 24 hours ago
[00:32:22] <cradek> hmm, maybe you won't be so lucky
[00:32:32] <cradek> hope it still kinda works
[00:32:42] <jmkasunich> the opener?
[00:32:55] <jmkasunich> the motor still turns.....
[00:33:41] <jmkasunich> the worm is entirely toothless though
[00:33:48] <cradek> can you use your garage? it's pretty important right around now I bet
[00:34:01] <jmkasunich> yeah, just gotta open the door by hand
[00:34:03] <cradek> ah good
[00:36:32] <jmkasunich> I'm trying to decide between coding and going to the store and drooling over digital cameras
[00:36:56] <cradek> store? what's that?
[00:37:15] <jmkasunich> the place where they let you fondle the expensive electronics, before you go home and order it online
[00:37:44] <cradek> ahhh I guess I've been there
[00:37:47] <jmkasunich> I wouldn't do that to a camera store, but the store I'm talking about is best buy
[00:37:49] <cradek> I just forgot
[00:38:27] <jmkasunich> the problem with the camera stores is they keep everything under glass
[00:39:06] <jmkasunich> best buy actually has the (significant fraction of a kilobuck) digital SLRs out where you can handle them (on leashes of course)
[00:39:22] <cradek> yeah, that's nice
[00:40:25] <jmkasunich> I'm trying to decide whether I want a DSLR, or just a high end fixed lens digicam
[00:40:47] <jmkasunich> well, actually I know I _want_ a DLSR, but I'm not sure its the right thing to get
[00:41:19] <cradek> remember to factor in all the lenses you'll want to buy then
[00:41:30] <jmkasunich> see, thats the thing
[00:41:57] <jmkasunich> my film SLR has two lenses - a 50mm that came with it, and a 28-200 zoom that I bought not long after I got it
[00:42:01] <jmkasunich> (this is going on 20 years ago)
[00:42:16] <jmkasunich> I almost never take off the zoom...
[00:42:28] <cradek> could you use those on the right digital? (I'm totally camera ignorant)
[00:42:36] <jmkasunich> no
[00:43:04] <jmkasunich> some older lenses can be used, but not mine
[00:43:32] <jmkasunich> the film camera is a minolta... you can use minolta lenses on the new sony DSLR (sony bought out minolta)
[00:43:45] <jmkasunich> but not the old manual focus ones like mine
[00:49:15] <jmkasunich> hey petev, long time no see
[00:49:27] <petev> yeah, been super busy with work
[00:49:37] <petev> still havent finished my bridgeport
[00:49:43] <petev> pretty sad
[00:49:55] <jmkasunich> heh, still haven't finished my shoptask either
[00:50:04] <jmkasunich> but I actually got started over christmas
[00:50:14] <petev> I got everything mounted and about 1/2 the wiring done
[00:50:28] <petev> then work really got busy
[00:50:41] <petev> 3 trips to china and way too many other projects to get done
[00:50:43] <jmkasunich> darned work....
[00:50:48] <petev> yep
[00:50:53] <jmkasunich> ouch - I don't like travel
[00:51:01] <jmkasunich> especially not really long trips
[00:51:04] <petev> yeah, especially china
[00:51:39] <petev> I'm killing my last debian box with ubuntu
[00:51:46] <petev> but it's not going down easy
[00:51:50] <petev> looks like the install is hung up
[00:51:58] <jmkasunich> thats not encouraging
[00:52:08] <petev> the other went really well
[00:52:10] <petev> same HW too
[00:52:12] <petev> strange
[00:52:10] <jmkasunich> you doing vanilla ubuntu or the emc live-cd?
[00:52:22] <petev> the emc-live
[00:52:38] <petev> figured I better get everything up to date if I want to do any dev work
[00:53:00] <petev> looks like it got stuck right at the start, maybe partitioning or fs
[00:53:08] <jmkasunich> I haven't tried the live cd myself - I did vanilla ubuntu and then installed the rt patched kernel packages
[00:53:24] <petev> hmm, I have a network cable plugged in
[00:53:32] <petev> didn't have it on the other box during install
[00:53:34] <jmkasunich> thats probably a good thing
[00:53:39] <petev> wonder it thats a problem
[00:53:39] <jmkasunich> oh
[00:53:51] <jmkasunich> I had some trouble with an install when I didn't have the network
[00:53:56] <petev> hmm
[00:54:07] <jmkasunich> I had to manually set everything up afterwards
[00:54:19] <jmkasunich> don't remember the details though - this install is about a year old I think
[00:54:38] <petev> I think it crashed as the mouse won't even move
[00:54:45] <jmkasunich> ouch
[00:54:49] <petev> I'll try again without the network
[00:55:06] <petev> I have some problems with the startup graphics on the touch panel as well
[00:55:12] <petev> the X server works fine
[00:55:22] <petev> but startup resolutions are a problem
[00:55:32] <petev> I changed the grub file, but it didn't help
[00:55:48] <jmkasunich> the grub file on the CD?
[00:55:58] <petev> no, on HD after install
[00:56:00] <jmkasunich> or is it booting the live CD and failing when you try the actual install?
[00:56:22] <petev> yes, boots, then fails install on this machine
[00:56:37] <petev> still has video problem on boot, but fine after X starts
[00:56:46] <jmkasunich> if you are in the grub menu.lst, remove "quiet splash" from the kernel lines
[00:56:55] <jmkasunich> that might make it a little easier to see what is going on
[00:57:09] <petev> the monitor won't sync, so I can't see a thing
[00:57:15] <jmkasunich> * jmkasunich hates bootsplash
[00:57:18] <petev> it's an 8" touch panel
[00:57:21] <jmkasunich> oh
[00:57:52] <jmkasunich> maybe try the install with a regular monitor, then switch?
[00:58:08] <petev> I set the res lower in the bios, and that helped a little, but then gdm used the same res for X and didn't size the desktop
[00:58:12] <petev> I think its a refresh rate issue
[00:58:25] <petev> it's the same on the machine that's installed
[00:58:37] <petev> fine once it boots, but no good before
[00:58:47] <jmkasunich> strange
[00:59:09] <petev> I don't think the panel can handle more than 60Hz refresh
[00:59:21] <petev> but I don't see a way to control that on boot
[01:00:33] <jmkasunich> if it continues to give you fits you might want to try the stock ubuntu "alternate install" disk
[01:00:40] <jmkasunich> it includes text mode install
[01:01:06] <petev> one last try, then I might have to
[01:01:25] <jmkasunich> remember, get 6.06, not 6.10
[01:01:36] <petev> yes
[01:03:16] <skunkworks> I have had the ubuntu install hang more than once during the partitioning part.
[01:03:28] <skunkworks> reboot - restart the install and everything is fine
[01:03:34] <petev> did u figure out the cause?
[01:03:42] <skunkworks> No
[01:03:46] <petev> seems like the same stage mine is hanging
[01:04:25] <skunkworks> also on different hardware - no real patern that I can see yet.
[02:20:25] <cradek> jmkasunich: bored?
[02:21:08] <skunkworks> he is probably still fondling cameras.. the freak
[02:21:15] <cradek> or he knows when to keep quiet :-)
[02:21:44] <skunkworks> ;) did you see that g92 seems to work as I expected now.. sorry. ;)
[02:21:52] <cradek> heh, that's cool
[02:22:12] <cradek> I still don't like it, but whatever floats your boat
[02:23:17] <skunkworks> I understand.
[02:23:41] <skunkworks> you do need to reload the program so the preview is correct.
[02:26:42] <jmkasunich> wha? who? did somebody call me?
[02:27:10] <cradek> hi
[02:27:13] <jmkasunich> * jmkasunich was busy
[02:27:17] <cradek> if you're bored and want a progrmaming project...
[02:27:40] <jmkasunich> (running thru doom levels with god mode turned on and a crapload of rockets ;-)
[02:27:46] <cradek> haha
[02:27:57] <skunkworks> rambo?
[02:28:11] <jmkasunich> something like that
[02:28:15] <jmkasunich> s'up?
[02:28:54] <cradek> I'm working on rigid tap - I wonder if you would want to work on the motion controller part of it - receive a message and call tpAddRigidTap
[02:29:17] <jmkasunich> just call it? you make it work?
[02:29:31] <cradek> well, that's my hope
[02:29:35] <jmkasunich> sure
[02:29:42] <jmkasunich> thats only about 15 mins
[02:29:55] <jmkasunich> sending the message is a lot harder
[02:29:54] <cradek> one of us will have to figure out how to add interp support, then get it through task to motion
[02:30:00] <jmkasunich> (and NML)
[02:30:09] <cradek> yeah all that hooey
[02:30:19] <jmkasunich> not one of us having this conversation
[02:30:21] <jmkasunich> at least not this one
[02:30:30] <cradek> wonder if I should make a branch that we can play on
[02:30:37] <jmkasunich> I don't do NML, its against my religion
[02:30:53] <cradek> I could do it, but if we wait, maybe alex will :-)
[02:30:56] <jmkasunich> might not be a bad idea
[02:31:08] <jmkasunich> branching that is (also waiting for alex ;-)
[02:31:12] <cradek> ok, I'll do that, it's some nontrivial changes
[02:32:12] <jmkasunich> I should stop farting around and work on the 5i20 driver
[02:32:24] <jmkasunich> I seem to have a block about that for some reason
[06:43:05] <petev> jmkasunich u still awake?
[06:43:49] <jmkasunich> barely ;-)
[06:45:09] <petev> I have a ? on motion
[06:45:16] <jmkasunich> shoot
[06:45:29] <petev> what does it do if spindle-revs is not eual to spings-speed-out?
[06:45:36] <petev> spindle
[06:45:52] <jmkasunich> I don't know much about spindle
[06:46:00] <petev> oh, who did that code?
[06:46:06] <petev> I see it's in motion now
[06:46:10] <jmkasunich> lemme see if I can figure it out
[06:46:49] <petev> trying to decide how to handle the reeves pulley with air motor on the BP
[06:47:12] <petev> was leaning towards just leaving it manual control, but I want EMC to be able to stop it and have a status input
[06:47:26] <jmkasunich> I see spindle-speed-out, but not spindle-revs
[06:47:39] <petev> hmm, I'm looking at the lates from the live CD
[06:47:45] <jmkasunich> duh, there it is
[06:48:52] <jmkasunich> ok, spindle-revs is where you hook the encoder for threading (and eventually rigid tapping)
[06:49:08] <jmkasunich> it has nothing to do with spindle control - its the reference that the axes need to track for threading
[06:49:26] <petev> yes, but how does motion control things if it doesn't match the command?
[06:49:33] <petev> is it only used for tapping?
[06:49:38] <petev> and ignored otherwise?
[06:49:50] <jmkasunich> still looking at code...
[06:49:54] <petev> or will motion wait until speed is correct to continue?
[06:50:31] <jmkasunich> spindle-speed-out is the command
[06:50:38] <jmkasunich> there is no closed loo
[06:50:38] <jmkasunich> loop
[06:50:52] <petev> hmm, so it's only for tapping then?
[06:50:53] <jmkasunich> probably 99% of machines have no spindle feedback of any kind
[06:51:03] <jmkasunich> actually for lathe threading at this point
[06:51:16] <jmkasunich> tapping is in the works (that is more complex because of reversing the spindle)
[06:51:22] <petev> so it's just read and feeds adjusted accordingly?
[06:51:27] <jmkasunich> yes
[06:51:32] <petev> hmm
[06:51:41] <jmkasunich> (and the index pulse is used to sync successive passes)
[06:51:53] <petev> so what's the best way to get EMC to wait until the spindle is on if under manual control?
[06:53:29] <petev> the BP is a problem because u have to run the spindle to adjust the speed
[06:53:39] <jmkasunich> thats a darned good question... lemme look some more
[06:54:03] <petev> maybe I'll have to rely on the tool-changed input, but it would be nice to keep motion from going if the spindle isn't on
[06:54:52] <jmkasunich> I thought at one time there was some sort of a handshake, but I'm not seeing it
[06:55:04] <petev> yeah, I couldn't find anything
[06:55:12] <jmkasunich> I'd suggest either asking alex when he's online, or posting to the dev list
[06:55:32] <petev> ok
[06:55:42] <jmkasunich> I think alex did the original spindle stuff (when it was in iocontrol) and he knows more about the NML messages
[06:55:57] <petev> ok
[06:57:22] <jmkasunich> I agree with you - there should be a handshake of some kind, even if 90% of people just "jumper it out"
[06:57:50] <petev> yes, is the spindle-revs the raw encoder count?
[06:58:02] <petev> or is it conditioned as a speed?
[06:58:20] <jmkasunich> in fact, I remember when we cut the first part on the Mazak at the CNC workshop, we almost had a crash, because the mill starting moving into the cut while the spindle was spinning up
[06:58:31] <jmkasunich> its the counts, scaled to a position
[06:58:40] <petev> yeah, and some spindles take time to get up to speed
[06:59:02] <jmkasunich> I _think_ you are supposed to scale it so it indicates revs, cradek would know for sure
[06:59:24] <jmkasunich> the index enable is used so it normally counts from zero up to one rev, then resets
[06:59:42] <jmkasunich> during threading, at the start of a pass it waits for a reset, then turns off index-enable
[06:59:58] <jmkasunich> and the position counts up throughout the entire threading pass (multiple revs)
[07:00:21] <jmkasunich> at the end of the pass, index-enable turns back on, and the position goes back to "sawtooth mode"
[07:00:46] <petev> hmm, even if motion waited for proper speed indication, that wouldn't be so convenient to jumper without an external module to condition spindle-speed-out
[07:01:23] <jmkasunich> I would not have motion checking speed - very few people actually have feedback devices
[07:01:24] <jmkasunich> I
[07:01:35] <jmkasunich> I'd have a bit input, called "spindle-at-speed" or something
[07:01:46] <petev> yeah, a separate handshake would be easier
[07:01:58] <jmkasunich> then you can just use a time-delayed copy of spindle-on
[07:02:11] <jmkasunich> or you can get fancy and use a window comparator that compares command to feedback
[07:02:14] <jmkasunich> or anything in between
[07:02:18] <petev> I was looking at some of the comercial offerings, and many take a couple of secs to hit high speeds
[07:02:46] <petev> for the BP, I would probably use a time delay from the contactor coil
[07:02:56] <jmkasunich> at lot of VFDs can be configured to close a relay when they are at speed, that could also be used
[07:03:13] <petev> yes, and they usually have a couple of digital outputs too
[07:03:28] <jmkasunich> yeah, either a delay or a button that you press after manually winding the vari-speed handle to the right speed
[07:03:48] <petev> true
[07:04:17] <jmkasunich> I'd definitely suggest a posting to the dev list - either I'm missing something that alex can clear up, or we should add the at-speed input
[07:04:17] <petev> unless the interp can be configured to use a cycle hold, something like that would be needed
[07:04:32] <petev> ok
[07:04:53] <jmkasunich> oh, that reminds me - in the meantime, there is a feed-hold HAL pin that you could use
[07:05:08] <petev> I missed that one
[07:05:13] <jmkasunich> "if spindle-on and not delayed-spindle-on then feedhole = true"
[07:05:23] <petev> right there in front of me
[07:05:50] <jmkasunich> still not as nice as proper spindle handshaking
[07:05:52] <petev> yes, I can condition something with ladder and a button press once at the right speed
[07:07:15] <jmkasunich> well, its 2am here....
[07:07:17] <jmkasunich> goodnight
[07:07:19] <petev> gn
[16:18:01] <alex_joni> cradek: ping
[16:19:48] <cradek> ?
[16:21:44] <alex_joni> you said you want me to add some NML stuff
[16:21:54] <alex_joni> for rigid tapping?
[16:24:01] <cradek> I'm not sure the best way to do it - i think maybe it should have its own gcode, canon call RIGID_TAP, then its own motion message that will call tpAddRigidTap
[16:25:15] <alex_joni> if we (you:P) can come up with a number, I'll try to do it :)
[16:25:27] <alex_joni> is it similar to tpAddLine ? (same params)
[16:25:41] <cradek> yes except no 'type'
[16:25:50] <cradek> I checked it in (unfinished) on rigid_tap branch
[16:25:51] <alex_joni> type?
[16:26:42] <alex_joni> I saw the commit
[16:26:56] <alex_joni> I'm a bit puzzled though.. never seen rigid tapping before
[16:27:10] <alex_joni> you set a spindle speed first.. right?
[16:27:19] <alex_joni> then it should work like lathe threading?
[16:27:50] <jepler> yuck
[16:28:20] <jepler> g28/g30 have a units issue -- they'll move to a location in the current units system, so a nonzero g28 "home" will go to a different location subject to the g20/g21 setting
[16:28:38] <cradek> jepler: oops
[16:28:48] <cradek> alex_joni: yes the spindle should be turning before you issue the RT gcode
[16:28:56] <jepler> at least, that's what the docs say
[16:29:00] <jepler> "The parameter values are in terms of the absolute coordinate system, but are in unspecified length units."
[16:29:15] <cradek> jepler: I may have 'fixed' it when I 'fixed' the other crazy units things
[16:29:26] <jepler> OK I'll investigate
[16:29:47] <jepler> so that variable would always be in "machine units" if you "fixed" it?
[16:30:28] <cradek> yes I tried to make everything in the var file, that represents a distance or coordinate, in machine units
[16:31:15] <jepler> nope
[16:31:24] <cradek> grr
[16:31:33] <jepler> g21 / g28 moves to .3937 when I had assigned #5161=10
[16:31:36] <jepler> on sim/axis
[16:31:39] <jepler> 2.1.1
[16:32:21] <cradek> oh you have to assign it directly - I don't know how that should work
[16:32:51] <cradek> please figure it out and fix it :-)
[16:33:37] <jepler> ugh
[16:33:37] <cradek> I've heard that some other program lets you home with a gcode. seems like a terrible idea.
[16:34:10] <cradek> maybe a gcode for periodically rebooting windows in case something has gone wrong is needed too
[16:36:31] <cradek> bbl
[16:37:13] <alex_joni> watchdog takes care of that :P
[17:05:13] <jepler> alex_joni: with a scale and an offset, is the calculation usally 'position = (count + offset) / scale' or 'position = (count / scale) + offset'?
[17:06:05] <alex_joni> the first one I think
[17:07:51] <jepler> hm the hal manual gives this equation for canonical analog input: value = (hardware reading * scale) - offset
[17:07:56] <jepler> different than either of us said
[17:08:08] <alex_joni> look at encoder/position
[17:08:33] <jepler> though encoder doesn't have an offset
[17:08:42] <jepler> I'll go with (count+offset)/scale
[17:09:21] <alex_joni> I have (value-offset)*gain
[17:09:25] <alex_joni> for the DAC's in the stg driver
[17:13:35] <jepler> er, yes, -offset
[17:13:50] <alex_joni> *gain or /scale should be the same
[17:14:32] <jepler> which is easier for the user to specify, I wonder
[17:14:55] <alex_joni> usually I set the value at 0
[17:15:01] <alex_joni> then I measure the offset (write it down)
[17:15:23] <alex_joni> once subtracted it should be back at 09
[17:15:27] <alex_joni> once subtracted it should be back at 0
[17:15:44] <alex_joni> next set some value (e.g. 8V) then adjust gain untill it's right
[17:17:56] <jepler> this stupid digital joypad gives values 4, 512, and 1021
[17:18:09] <jepler> I can't turn that into exactly -1, 0 and 1 with gain and offset
[17:18:43] <alex_joni> how about with conv?
[17:18:57] <jepler> (because 4=512-508, 1021=512+509)
[17:22:02] <alex_joni> jepler: any idea how to turn -1,0,1 into 2 different 0..1's ?
[17:23:02] <alex_joni> I could use limits and s32 to bit converters..
[17:24:36] <jepler> you want out1 = in < 0 ? -in : 0; out2 = in > 0 ? in : 0; ?
[17:25:05] <jepler> hm but s32
[17:25:16] <jepler> you need s32 as your output?
[17:25:52] <alex_joni> no, bits
[17:26:04] <jepler> the input is s32?
[17:26:06] <alex_joni> float or s32
[17:26:08] <jepler> if the input was float, sounds like two comparators to me
[17:26:21] <alex_joni> comp outputs bit?
[17:26:39] <jepler> comp.N.out bit out
[17:26:39] <jepler> Output of the comparator.
[17:26:48] <jepler> hm you'll need a 'not' in there
[17:26:57] <jepler> or you can hook the inputs up in a different order I guess
[17:27:03] <alex_joni> right
[17:28:16] <alex_joni> hmm.. setp doesn't do tab-completion
[17:28:18] <alex_joni> for pins
[18:25:48] <jepler> alex_joni: hm it works for me
[18:25:56] <jepler> halcmd: loadrt comp
[18:25:56] <jepler> halcmd: setp comp.0.
[18:25:56] <jepler> comp.0.hyst comp.0.in0 comp.0.in1 comp.0.tmax
[18:26:46] <alex_joni> hmm.. works now, must have been a PEBCAK
[18:27:36] <jepler> there was a bug nearby though
[18:27:39] <alex_joni> :-)
[18:27:58] <alex_joni> I think the TELEOP jogging might be interesting for trivkins too
[18:28:22] <alex_joni> or at least the same functionality in halui for jogging
[18:56:19] <alex_joni> jmkasunich: what do you feel about analog jogging inputs to halui
[18:56:47] <jmkasunich> dunno
[18:57:01] <jmkasunich> right now I'm too pissed at my computer to think about it
[18:57:04] <alex_joni> for a joystick jogging
[19:14:45] <alex_joni> yay.. halui analog pin works
[19:21:31] <alex_joni> this works soooo well
[19:21:40] <alex_joni> jepler: thanks for doing hal_input
[19:23:09] <jepler> alex_joni: it would have worked as well with hal_joystick, wouldn't it?
[19:23:19] <alex_joni> dunno
[19:23:32] <alex_joni> bet not for this USB gamepad
[19:23:47] <jepler> actually i have concerns about hal_joystick, that it doesn't call hal_ready unless I missed it in the source
[19:28:28] <alex_joni> * alex_joni cries silently
[19:28:36] <alex_joni> all that nice HAL work
[19:29:25] <alex_joni> http://pastebin.ca/380087
[19:29:30] <skunkworks1> 1 step forward and 2 steps back..
[19:29:42] <skunkworks1> * skunkworks1 doesn't know what alex_joni is talking about though
[19:30:00] <alex_joni> skunkworks1: I made a 2page halfile to jog with this gamepad
[19:30:09] <alex_joni> now I added an analog input to halui for jogging..
[19:30:16] <alex_joni> and it's a 4 line halfile :D
[19:30:45] <skunkworks1> cool.. that is what someone elde had done with the simencoder?
[19:30:47] <skunkworks1> else
[19:30:57] <alex_joni> this is using hal_input
[19:36:31] <jmkasunich> jepler: hal_joystick probably doesn't use hal_ready, because it is older than hal_ready is
[19:55:50] <alex_joni> jepler: it's not ready for 2_1, forget it..
[19:55:53] <alex_joni> there's some hidden flaw
[19:56:09] <jepler> alex_joni: hal_input has its own deadzone for analog controls (it's called .flat by the linux docs) though hal_joystick may not
[19:56:12] <jepler> alex_joni: oh -- subtle flaws are bad
[19:56:29] <alex_joni> jepler: really?
[19:56:40] <alex_joni> guess I'll leave it in .. won't hurt
[19:56:52] <alex_joni> I get 2 jog events when starting up
[19:56:58] <alex_joni> can't understand where from
[19:57:08] <alex_joni> of course they fail, because machine is in ESTOP
[19:57:38] <jepler> hm indeed
[19:58:09] <alex_joni> that's why there's an extra printf in sendJogCont (not sure if that slipped through the commit)
[19:58:16] <alex_joni> but that one doesn't appear..
[19:59:01] <alex_joni> hmm.. think I know
[19:59:12] <alex_joni> a jogStop might get sent
[19:59:43] <alex_joni> the analogs are set at 0.. but when halui gets connected to the hal_input that might not be true
[19:59:59] <alex_joni> beeing different, but smalled than deadband, it sends a jogStop
[20:00:05] <jepler> hm
[20:00:23] <jepler> certainly don't move it back before you're very confident in it
[20:00:31] <jepler> don't move it back if it's not useful without hal_input
[20:00:42] <alex_joni> I'll leave it for 2.2
[20:00:56] <jepler> ok I can agree with that as well
[20:03:36] <alex_joni> hmm.. wonder if it's a problem with hal_input while starting up
[20:03:47] <alex_joni> sendJogCont 0 100.000000
[20:03:51] <alex_joni> I get that on startup
[20:03:58] <alex_joni> axis X, speed = 100
[20:04:32] <jepler> hal_input is supposed to show 0 for position until it actually receives an event, but maybe it's not
[20:04:58] <jepler> (I can't seem to figure eout how to find the state of the joystick when I open it, I have to wait for a change)
[20:07:33] <alex_joni> what's the initial value?
[20:07:54] <alex_joni> bet it depends on scale & offset
[20:08:08] <jepler> e.g., if you have the stick pushed all the way to the right and then load hal_input, it'll show 0 (centered) until you move the stick again
[20:13:12] <jepler> alex_joni: if halui reads the pin before hal_joystick drives it with a value, it might read 0 then some other value
[20:13:35] <jepler> er, hal_input
[20:14:07] <jepler> I don't see that I ever drive the pin with a value I don't expect
[20:14:08] <alex_joni> yeah, I think that's the problem
[20:14:31] <jepler> __setitem__ 0.abs-x-counts 511
[20:14:31] <jepler> __setitem__ 0.abs-x-position -0.000977517106549
[20:14:31] <jepler> __setitem__ 0.abs-x-position -0.000977517106549
[20:14:36] <jepler> this is what happens when the component starts up
[20:15:05] <alex_joni> Starting EMC2...
[20:15:05] <alex_joni> 0 -0.003922 0.000000
[20:15:05] <alex_joni> jogStop
[20:15:05] <alex_joni> sendJogCont 1 -0.000000
[20:15:05] <alex_joni> command (EMC_AXIS_JOG) cannot be executed until the machine is out of E-stop and turned on
[20:15:33] <alex_joni> I don't get why sendJogCont gets called
[20:15:37] <jepler> maybe halui should not jog if it thinks the machine is in estop
[20:15:45] <alex_joni> the value read is way less than deadband
[20:15:56] <alex_joni> jepler: that feels like a nasty hack
[20:16:06] <alex_joni> how does AXIS do it?
[20:16:17] <alex_joni> checks it in AXIS; or lets emc take care of that?
[20:16:20] <jepler> you don't want error dialogs popping up just because the joystick gets bumped while in estop or running a program
[20:16:30] <jepler> axis checks most things to avoid getting the error dialogs
[20:16:39] <alex_joni> hmm.. you have a point there
[20:18:32] <jepler> hm the buttons on my joypad are all named inappropriately
[20:18:41] <alex_joni> same for me
[20:19:02] <jepler> input.0.btn-pinkie
[20:19:13] <jepler> I don't know how I'd have to hold this thing to press that button with my little finger...
[20:19:14] <alex_joni> I have one of those too
[20:19:20] <alex_joni> same here
[20:19:26] <alex_joni> it's to the left of my btn-thumb :D
[20:25:52] <alex_joni> anyways.. would name a button "pinkie"
[20:27:51] <alex_joni> jepler: question: why isn't AXIS starting up in "P" view :
[20:27:54] <alex_joni> ?
[20:28:23] <jepler> alex_joni: because it's always started up in Z view
[20:28:44] <alex_joni> the first thing I always do is switch to P
[20:28:50] <alex_joni> guess I should hack my .axisrc ;)
[20:29:05] <jepler> by typing "v" a half a dozen times, I suppose
[20:29:36] <alex_joni> I had 1-2 feedbacks from new users looking over my shoulder : "wow that's a nice interface, and you can see the part in XY"
[20:29:52] <alex_joni> then I had to tell them it's real 3D, .. and after switching to P the saw it too :)
[20:30:20] <jepler> yeah I recall corresponding with one user who was surprised to learn he could *rotate*
[20:30:34] <jepler> he had figured out the 4 preset view buttons, but not using the mouse to change the view
[20:30:58] <jepler> sooo -- maybe you're right
[20:31:09] <alex_joni> not sure it'd had helped in that case
[20:31:25] <skunkworks> jepler: that was me ;)
[20:31:26] <jepler> figuring out some left-over keys to choose the 4 preset views easily wouldn't hurt
[20:31:27] <jmkasunich> never underestimate the inability of users to discover things
[20:31:54] <alex_joni> jepler: now it works as it should
[20:32:18] <alex_joni> jepler: want me to look at the vibrating thingie?
[20:32:26] <jepler> alex_joni: don't hurt yourself
[20:32:35] <alex_joni> lol
[20:33:35] <alex_joni> jepler: where did you look?
[20:33:45] <jepler> alex_joni: ff.txt in linux-source/Documentation/input
[20:34:22] <alex_joni> * alex_joni reads
[20:35:43] <jepler> bbl
[20:35:49] <jepler> let me know if you can get it to work
[20:35:58] <jepler> or maybe I'll go buy a FF joystick
[20:36:03] <alex_joni> I think I can figure out FF
[20:36:12] <alex_joni> but this device I have has no real FF
[20:36:15] <alex_joni> it just vibrates
[20:36:20] <alex_joni> bit-wise
[20:36:42] <alex_joni> FF_RUMBLE
[20:36:50] <alex_joni> jepler: before you go
[20:37:07] <alex_joni> can you tell me where you do similar ioctl's to check for device capabilities?
[20:39:44] <skunkworks> in my defense - I only had a 2 button mouse to begin with when I started playing with axis.
[20:39:54] <skunkworks> ;)
[20:40:05] <alex_joni> hahahaha, that was you?
[20:40:25] <skunkworks> * skunkworks blushes
[20:55:57] <alex_joni> jepler: obviously I have no idea how to do this..
[20:56:10] <alex_joni> this is how far I got (very slowly I might add): http://pastebin.ca/380162
[21:04:34] <jepler> alex_joni: after those changes, I would expect self.device.get_bits('EV_FF') to return the FF features supported (like section 3.1 of that ff.txt doc)
[21:04:43] <jepler> alex_joni: do you get any return values?
[21:04:48] <alex_joni> yeah, me too.. how do I see those?
[21:05:22] <jepler> you'd get HAL pins for each one found, wouldn't you?
[21:05:23] <alex_joni> I don't get any error, but no new hal pins either
[21:05:30] <jepler> hm
[21:06:10] <alex_joni> hmm.. I see some flat & fuzz
[21:06:14] <alex_joni> where those there before?
[21:06:17] <jepler> those are from the absolute axes
[21:06:20] <jepler> yes
[21:06:36] <alex_joni> only abs- and btn-
[21:07:22] <alex_joni> * alex_joni adds 6 more FF effects
[21:07:36] <jepler> alex_joni: if they weren't listed in FF they'd appear as numbers
[21:07:46] <alex_joni> oh
[21:07:55] <jepler> install input-event package and run input-events NR where NR is the number of your joystick
[21:08:16] <jepler> if it doesn't show EV_FF then there may be no linux support for the force feedback
[21:08:28] <alex_joni> is it input-event ?
[21:08:38] <alex_joni> apt-cache search doesn't find it
[21:08:40] <jepler> input-utils package
[21:08:56] <jepler> binary is called input-events
[21:09:01] <alex_joni> thx
[21:09:30] <alex_joni> bits ev : EV_SYN EV_KEY EV_ABS
[21:09:35] <alex_joni> I guess that means no FF..
[21:09:44] <jepler> too bad
[21:10:07] <jepler> "At the moment, only I-Force devices are supported, and not officially."
[21:10:30] <jepler> I dunno if this line of the documentation is accurate, but it sounds like support is pretty limited
[21:10:51] <jepler> (that was in 2001 though)
[21:10:57] <alex_joni> heh :)
[21:10:59] <alex_joni> a bit outdated?
[21:11:08] <alex_joni> there are lots of FF things in input.h
[21:12:15] <jepler> it does look like there's some EV_FF support in usb devices
[21:12:38] <jepler> usb/input/hid_input.c: set_bit(EV_FF, input->evbit)
[21:12:46] <jepler> so some USB FF devices must work
[21:12:52] <alex_joni> right
[21:12:54] <alex_joni> just not this one :)
[21:13:04] <alex_joni> are there other input debug thingies?
[21:13:20] <alex_joni> note the highly technical term "thingies"
[21:13:26] <jepler> input-events and input-kbd are really the only two I've found
[21:14:27] <jepler> ff.txt refers to fftest but apt-file doesn't find it
[21:14:56] <jepler> q/home/jepler/joystick-20051019/utils/fftest.c
[21:15:04] <jepler> looks like it's in the source to the 'joystick' package, maybe you can get it to compile
[21:15:58] <jepler> $ ./fftest
[21:16:01] <jepler> Upload effects[0]: Function not implemented
[21:16:03] <jepler> doesn't work for me
[21:17:22] <alex_joni> http://akustik.hfbk.net/sc/SuperColliderHelp/Linux/LID.html
[21:18:06] <jepler> what language is *that*?
[21:18:12] <alex_joni> I have nfc
[21:18:25] <alex_joni> but it has some register LID
[21:18:28] <alex_joni> with rumble :D
[21:19:34] <alex_joni> jepler: did you really mean compile?
[21:20:13] <jepler> alex_joni: yes, fftest doesn't seem to be included in the debian-built package, nfc why
[21:20:23] <alex_joni> so where did you get it from?
[21:20:28] <alex_joni> apt-get source joystick?
[21:21:29] <jepler> yes
[21:22:08] <alex_joni> ewww..
[21:22:11] <alex_joni> /bin/sh: sdl-config: command not found
[21:22:09] <alex_joni> ffmvforce.c:37:17: error: SDL.h: No such file or directory
[21:22:39] <alex_joni> and build-dep isn't helping :((
[21:22:51] <jepler> 'gcc fftest.c -o fftest' worked for me
[21:24:22] <alex_joni> how did you run it?
[21:24:32] <alex_joni> I tried ./fftest /dev/input/event3
[21:24:50] <jepler> ./fftest 3
[21:25:07] <alex_joni> Open device file: No such file or directory
[21:25:25] <jepler> er, yes, then you're right
[21:25:32] <alex_joni> maybe it's looking specifically for a joystick
[21:25:35] <jepler> it's input-event that takes a number
[21:26:08] <alex_joni> doesn't find any effects
[21:26:15] <jepler> time to buy a new joystick
[21:26:24] <alex_joni> this ain't mine ;)
[21:26:26] <jepler> I might if I knew for sure which one to buy
[21:26:27] <jepler> oh
[21:26:29] <alex_joni> but it's fairly new
[21:26:45] <alex_joni> ask chris to make you a custom LiveCD
[21:26:52] <alex_joni> so you can go the shop and try them out :P
[21:26:55] <jepler> hah
[21:26:56] <alex_joni> or just drag your laptop along :)
[21:31:04] <alex_joni> oh-oh
[21:31:21] <alex_joni> drivers/usb/input/hid-ff.c:#ifdef CONFIG_LOGITECH_FF
[21:31:41] <alex_joni> * alex_joni rumbles
[21:33:23] <jepler> not on in the ubuntu kernel? doh!
[21:33:50] <alex_joni> wai ttill I tell chris I want to build new kernel packages to include FF for logitech gamepads
[21:33:54] <alex_joni> ROFL
[21:34:55] <alex_joni> HID_FF is also not enabled (marked Experimental)
[21:35:26] <alex_joni> jepler: I guess don't bother for a new joystick yet..
[21:35:35] <alex_joni> there's no FF whatsoever in the Ubuntu kernel ;)
[21:35:47] <jepler> hmph
[21:35:58] <alex_joni> I'll make a new hid module
[21:42:23] <alex_joni> I forgot how long an i386 kernel with all modules takes :(
[22:00:59] <alex_joni> WOOT
[22:01:06] <alex_joni> I'm jogging puma in teleop :D
[22:03:59] <alex_joni> http://imagebin.org/7470
[22:17:04] <alex_joni> http://imagebin.org/7471
[22:18:00] <jepler> alex_joni: looks like you're just a few bugs away from finishing the puma kins
[22:18:31] <alex_joni> who me? ;)
[22:18:37] <jepler> yes you
[22:18:49] <jepler> chop chop!
[22:18:51] <alex_joni> lol.. I just tossed a few PM_PI's here and there
[22:19:09] <alex_joni> actually I talked to a guy from germany
[22:19:13] <alex_joni> that started my interest
[22:19:22] <alex_joni> he got to look over it in more detail
[23:26:46] <alex_joni> jepler: guess a new module didn't help either..
[23:53:18] <alex_joni> jmkasunich: hi
[23:57:57] <alex_joni> * alex_joni needs a bit of help with kins ;)