#emc | Logs for 2008-04-08

Back
[00:18:28] <eric_U> I have some analog optoisolators. They have a feedback photo-transistor so you know pretty much what you're getting on the other side
[00:27:54] <tomp> sounds like its got its own control loop, closed to make sure the recieved = sent, cool
[00:28:43] <eric_U> I thought it was obvious and clever
[00:46:20] <tomp> i agree, post some #'s for ds2, he's headed for some un-needed complexity
[00:47:19] <eric_U> HCNR201#300
[00:48:13] <eric_U> dc-1MHz Think I bought them from digike
[00:48:14] <eric_U> y
[00:49:09] <SWPadnos> all the avago parts are out of stock
[00:49:32] <SWPadnos> that's why they didn't show up in my earlier search (only the NEC parts, which don't seem to have the feedback channel)
[00:51:08] <eric_U> spose I should read back in the history before I type so much
[00:51:57] <SWPadnos> oh. no biggie. it's useful information that those parts have a feedback channel (if you choose to use it)
[00:52:39] <eric_U> is avago HP?
[00:53:07] <SWPadnos> I think so
[00:53:20] <eric_U> I was remembering that those were hp parts
[00:53:23] <SWPadnos> their encoders are avago now, so maybe that's the optoelectronics division
[00:54:05] <jtr> any reason not to use a pair with the LEDs in series? one output to the isolated side, one for the feedback?
[00:54:24] <jtr> if they make a dual, would it be reasonably matched?
[00:54:35] <eric_U> I suppose that could work
[00:54:53] <SWPadnos> it relies on both the photodiode and LED being the same in the two parts
[00:55:05] <SWPadnos> so it should work, but maybe not as well
[00:55:19] <jmkasunich> avago is the new HP (in optoelectronics anyway)
[00:55:36] <SWPadnos> are they all A names?
[00:55:47] <SWPadnos> Avago, Agilent - those are the only two I know
[00:55:54] <jmkasunich> who knows
[00:56:11] <jmkasunich> s/knows/cares
[00:56:15] <SWPadnos> heh
[00:56:48] <eric_U> too bad the management didn't deserve to work for that company
[00:58:13] <eric_U> it is what it is
[04:04:47] <JymmmmEMC> SWPa
[04:04:56] <JymmmmEMC> SWPadnos: SWPLinux
[04:06:10] <SWPadnos> what?
[04:06:21] <JymmmmEMC> Got drawing?
[04:06:45] <SWPadnos> no
[04:06:47] <JymmmmEMC> k
[07:34:21] <micges> hello
[07:35:42] <micges> alex_joni: what is progress of implementing nml messages to read/write origin positions ?
[10:02:38] <alex_joni> micges: I'm not sure I know what you mean :)
[10:03:41] <alex_joni> micges: gotta run.. networking is bad here.. bbl
[10:05:34] <micges> on emc wiki: make variables beeing read/written from GUI's via NML (in response to [[SF #1763005]])
[12:42:40] <alex_joni> micges: I haven't started thinking about that
[12:43:14] <micges> alex_joni: I see
[12:43:38] <alex_joni> at the moment I'm not sure it can be done reliably
[12:43:45] <alex_joni> because of the lookahead in the interpreter
[12:44:30] <alex_joni> when you request a variable.. should it be the one interpreter has? (probably at the end of the program)
[12:45:34] <micges> my point is to read/write origin position to/from interpreter
[12:46:26] <alex_joni> I don't understand.. what is origin position?
[12:46:51] <micges> position settable by G10 command
[12:47:32] <alex_joni> that is somethign you set in the program?
[12:48:07] <micges> I don't use G92 for offsets, I use only G10
[12:49:54] <micges> Point is to not enter MDI mode to set offsets
[12:50:20] <alex_joni> can beyou be specific?
[12:50:39] <alex_joni> (sorry.. network is really bad here.. I seldom see what I type..)
[12:50:50] <micges> ok
[12:51:23] <alex_joni> can you give an example what you want to write in your program?
[12:53:36] <micges> My axis and programs operate on G10 offsets, and I must check/set offsets everytime I load new program, I also operate on G54..G59 modes that equals 6 diffrent XYZ offsets
[12:54:33] <micges> problem is when I am in g54 I can't read/write offset of g55
[12:54:42] <micges> I want to
[12:55:38] <micges> I saw in emcmodule.c that interp variables can be readed thru nml
[12:56:20] <micges> and I saw that you wrote on wiki that you plan to add write variables ability to nml
[12:56:34] <micges> so
[12:56:45] <micges> I've asked
[12:57:55] <alex_joni> I was thinking of something else for that, can't remember at the moment what I wanted..
[13:06:09] <micges> please tell me if you remember
[13:11:18] <micges> then I will program that solution and tell you how its going
[13:11:20] <micges> bbl
[21:37:04] <Twingy> hey, I've got emc2 compiled in gutsy, did all the rtai stuff... I'm not finding much info on what additional steps I need to perform such that I can run EMC2 as a mortal user and not be forced to run it via "sudo"
[21:37:40] <SWPadnos> sudo make install or sudo make setuid
[21:37:44] <Twingy> I found a little snippet about sudo make setuid that a "Jeff" wrote about, but wasn't very informative
[21:38:00] <Twingy> which package, emc?
[21:38:07] <SWPadnos> yes
[21:38:21] <Twingy> make: *** No rule to make target `setuid'. Stop.
[21:38:23] <SWPadnos> the RTAI stuff should be in the normal modules dir or realtime dir
[21:38:31] <SWPadnos> from within emc2/src ?
[21:38:34] <Twingy> yes, RTAI stuff is fine
[21:38:59] <Twingy> ok, sudo make setuid works, doing sudo make install again
[21:39:01] <SWPadnos> did you configure for run-in-place?
[21:39:04] <SWPadnos> no, wait
[21:39:09] <SWPadnos> those are for different install methods
[21:39:31] <SWPadnos> if you want to run installed, you need to be sure that configure was run without the --enable-run-in-place option
[21:39:41] <SWPadnos> and then you don't need the make setuid step
[21:39:47] <Twingy> $ ./configure --with-realtime=/usr/realtime --with-kernel-headers=/usr/src/linux-headers-2.6.22-realtime
[21:40:02] <SWPadnos> ok, then all you should need is sudo make install AFAIK
[21:40:07] <Twingy> k, testing
[21:40:43] <SWPadnos> start a new terminal to be sure sudo isn't still active
[21:41:48] <Twingy> usr/local/bin/emc: line 524: 5285 Segmentation fault (core dumped) $HALCMD loadusr -Wn iocontrol $EMCIO -ini $INIFILE
[21:42:15] <SWPadnos> interesting.
[21:42:19] <Twingy> does halcmd need special permissions?
[21:42:38] <jepler> the other thing that comes to mind about 7.10 is the amount of lockable memory. search down to limits.conf in http://www.britishideas.com/2007/11/07/how-to-install-emc2-on-unbuntu-710-gutsy-from-scratch/
[21:42:41] <SWPadnos> no, plus it's loading a userspace component there
[21:42:46] <Twingy> I blew away .emcrc, desktop shortcut, and all other emc2 local data before running as mortal user
[21:43:09] <Twingy> jepler that's where I got the instructions from
[21:43:16] <Twingy> (scanning)
[21:43:36] <Twingy> hard memlock 20480
[21:43:40] <Twingy> (I did that)
[21:44:12] <Twingy> (this is a fresh install of gutsy too)
[21:44:18] <Twingy> spent 3 hours compiling kernel earlier
[21:44:32] <Twingy> (1ghz 256MB system)
[21:46:10] <SWPadnos> gotta run. good luck
[21:46:23] <Twingy> if I chmod +s halcmd I get passed the splash screen
[21:46:55] <Twingy> but then it appears to be stuck waiting
[21:47:11] <cradek> halcmd is not setuid on my system...
[21:47:32] <jepler> this Andrew Ayre person never figured out how to make it run without setuid either
[21:47:33] <Twingy> without the setuid I get a seg fault
[21:47:42] <cradek> yuck
[21:47:44] <jepler> all I can say is, before I trashed it it worked fine without sudo on my 7.10 machine
[21:48:04] <Twingy> remember doing anything besides make setuid?
[21:48:19] <jepler> you should look through 'strace halcmd' to see if some mmap or related system call fails, or use gdb to find out what area (probably a shared memory area) is being accessed when the segfault occurs
[21:48:26] <Twingy> did you do the initial /usr/local/bin/emc as root or as user?
[21:48:34] <Twingy> that was my next idea
[21:48:40] <Twingy> strace/truss
[21:49:00] <Twingy> ok, I'll remove setuid from halcmd
[21:50:52] <Twingy> ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfed8148) = -1 ENOTTY (Inappropriate ioctl for device)
[21:50:56] <Twingy> I get a bunch of those
[21:51:02] <Twingy> just before the seg fault
[21:54:05] <jepler> seems unlikely to be related -- 0 is stdin.
[21:54:49] <Twingy> dmesg doesn't appear to have anything useful
[21:57:38] <Twingy> ah
[21:57:45] <Twingy> bad file descriptors
[22:00:31] <Twingy> what is ipcrm
[22:00:57] <Twingy> stat64("/usr/local/bin/ipcrm", 0xbfc4d678) = -1 ENOENT (No such file or directory)
[22:01:12] <jepler> the userspace portions of emc use shared memory to communicate. running ipcrm at shutdown ensures that the shared memory segments are removed
[22:01:25] <Twingy> k
[22:01:35] <jepler> usually that is /usr/bin/ipcrm
[22:01:40] <Twingy> yep
[22:01:43] <Twingy> it is
[22:02:10] <Twingy> hard to tell where in strace it's dying
[22:02:25] <Twingy> here we go
[22:02:44] <Twingy> write(2, "/usr/local/bin/emc: line 363: 6"..., 87/usr/local/bin/emc: line 363: 6294 Segmentation fault (core dumped) $HALCMD stop
[22:03:14] <Twingy> must be just before that
[22:03:40] <jepler> are you doing just 'strace emc'? that won't show you the syscalls inside halcmd ..
[22:03:57] <Twingy> should I attach strace to halcmd pid?
[22:04:36] <jepler> personally I'd .../realtime start, then strace halcmd stop (or whatever kills it; it sounds like almost anything will serve to make halcmd crash)
[22:05:25] <Twingy> start is a script?
[22:05:41] <jepler> "realtime start"
[22:05:48] <jepler> when using "make install" I'm not sure where it's placed
[22:05:59] <jepler> maybe in /etc, maybe in /usr/local/etc
[22:06:10] <Twingy> finding...
[22:06:25] <jepler> "realtime stop" is the inverse operation
[22:06:32] <Twingy> really :)
[22:07:07] <Twingy> going on 8 hours of getting this to work :)
[22:07:29] <Twingy> it's in /etc/init.d/realtime
[22:08:07] <Twingy> yea, halcmd stop does it
[22:09:17] <jepler> when I get rid of the 'memlock' fix on an ubuntu 8.04 machine and run halcmd, I get a segfault when running halcmd
[22:09:21] <jepler> the end of strace looks like this:
[22:09:34] <jepler> open("/dev/rtai_shm", O_RDWR) = 3
[22:09:34] <jepler> ioctl(3, 0xbb, 0x7fffaf4d7430) = 16384
[22:09:34] <jepler> mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_LOCKED, 3, 0) = -1 EPERM (Operation not permitted)
[22:09:37] <jepler> ioctl(3, 0xbc, 0x7fffaf4d7448) = 0
[22:09:39] <jepler> close(3) = 0
[22:09:42] <jepler> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
[22:09:44] <jepler> +++ killed by SIGSEGV (core dumped) +++
[22:10:12] <Twingy> (side note: tons of no such file or directory as it searches for files)
[22:10:27] <jepler> when I have the shared memory fix correct, the mmap succeeds:
[22:10:27] <jepler> mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_LOCKED, 3, 0) = 0x7fd094f89000
[22:10:53] <Twingy> shared memory fix is the "hard memlock 20480" ?
[22:10:56] <jepler> yes
[22:11:18] <Twingy> I have that as the very last line in /etc/security/limits.conf
[22:11:24] <jepler> jepler@hardly:~$ ulimit -a | grep locked
[22:11:24] <jepler> max locked memory (kbytes, -l) 20480
[22:11:30] <jepler> what's this command 'ulimit -a' show for you?
[22:11:43] <Twingy> max locked memory (kbytes, -l) 32
[22:11:47] <jepler> OK, that's the problem
[22:12:05] <jepler> did you log out since changing the setting?
[22:12:10] <jepler> if not, try that now
[22:12:15] <Twingy> rebooted a few times since
[22:12:26] <Twingy> I will again for good measure
[22:12:29] <Twingy> brb, k?
[22:12:32] <jepler> OK
[22:13:02] <jepler> I hate irc clients with lame signoff messages
[22:14:26] <skunkworks> hanson is coming to town... (not going)
[22:15:03] <Twingy> k, no change
[22:15:26] <Twingy> # End of file
[22:15:27] <Twingy> hard memlock 20480
[22:15:35] <jepler> are there any other "memlock" lines in the file?
[22:15:48] <Twingy> No
[22:16:07] <Twingy> is my syntax correct?
[22:16:33] <Twingy> and is it ok if it's the very last line?
[22:16:45] <jepler> it should be
[22:17:07] <jepler> jepler@hardly:~$ tail -2 /etc/security/limits.conf
[22:17:07] <jepler> # End of file
[22:17:07] <jepler> * hard memlock 20480 #EMC2
[22:17:10] <jepler> here's how it looks on my machine
[22:17:14] <jepler> how are you logging in?
[22:17:16] <Twingy> you have an asterisk?
[22:17:27] <Twingy> maybe I need one too
[22:17:46] <jepler> umm maybe so
[22:17:46] <Twingy> I have automatic login as the user cnc (admin)
[22:17:54] <Twingy> testing, brb
[22:20:09] <Twingy> that was it, missing asterisk
[22:20:15] <Twingy> checking website to make sure it was my mistake and not his
[22:20:26] <jepler> I think it was mine
[22:20:27] <jepler> http://article.gmane.org/gmane.linux.distributions.emc.user/4119/match=memlock
[22:20:34] <Twingy> it's the authoers mistake
[22:20:34] <jepler> duly copied by everyone else :(
[22:20:44] <Twingy> you are the author?
[22:22:09] <Twingy> ok, axis loads now, so one more minor issue
[22:22:26] <Twingy> but let me pull up the old settings for my CNC before I get into it
[22:22:27] <jepler> that message is by me, I was suggesting it to Andrew Ayre who I believe is the author of the britishideas.com article
[22:22:36] <Twingy> ok
[22:22:43] <Twingy> should I post an update?
[22:23:04] <jepler> I will post a reply to myself on the mailing list..
[22:23:16] <Twingy> ok
[22:23:21] <Twingy> thanks for working through this with me
[22:23:27] <Twingy> now I have a system with GCAM and EMC
[22:23:56] <dmess> have you used gcam any???
[22:24:39] <dmess> bcz i have a system with emc2 and VAPT and would like to compare notes
[22:24:57] <jepler> dmess: I think Twingy uses gcam some
[22:25:07] <jepler> ;-)
[22:25:14] <Twingy> I wrote it... :0)
[22:25:27] <jepler> bbl
[22:25:33] <Twingy> thx jep
[22:25:33] <dmess> ok... so its time we did talk then...
[22:25:38] <Twingy> well, not atm
[22:25:48] <Twingy> I'm about to head home in a minute, don't want to keep the g/f waiting
[22:26:42] <Twingy> jepler I get an "RTAPI: ERROR: Unexpected realtime delay on task 1"
[22:26:42] <dmess> ok.. no sweat.. i know where your head is... check back with myself or danielFalck on #cam
[22:26:55] <Twingy> we've talked before dan
[22:27:09] <Twingy> a couple times over the past 2 years
[22:27:38] <dmess> dont you believe we could encorporate some of both and kick some open source ass
[22:28:19] <skunkworks> can you run latency-test?
[22:28:22] <Twingy> we already talked about this and agreed that it would be more convenient to wait until the hardy heron distribution of hte LiveCD was ready before incorporating GCAM
[22:28:30] <Twingy> skunkworks, un momento
[22:28:39] <skunkworks> Twingy: is there onboard video?
[22:28:44] <dmess> since all/most high end software still uses APT even if in its DUMBEST form
[22:28:55] <Twingy> skunkworks yes, nvidia gf2mx400, do you want both user and kern tests?
[22:29:12] <Twingy> dmess I have a debian package available now on the website
[22:30:19] <skunkworks> one or the other. The issue is - if the video card shares memeory with the main memory - you're probably going to have latency issues
[22:30:30] <Twingy> skunkworks 0 overruns for kernel
[22:30:46] <skunkworks> run glxgears from termninal also
[22:30:51] <Twingy> woah
[22:31:05] <Twingy> for user latency test...
[22:31:07] <Twingy> insmod: error inserting '/usr/realtime/modules/rtai_lxrt.ko': -1 Invalid module format
[22:31:07] <Twingy> ERROR: cannot load /usr/realtime/modules/rtai_lxrt.ko
[22:31:07] <Twingy> CANNOT CREATE MAILBOX
[22:31:09] <Twingy> CANNOT FIND MAILBOX
[22:31:27] <dmess> if we want to compete wit the big boyz we have to concentrate our efforts is all i'm sayin'... and understand... i DO believe we can come up with something that can beat alot of other s/w
[22:31:47] <Twingy> dmess agreed, what's the next step?
[22:32:19] <Twingy> skunkworks oh, I killed emc and it works
[22:32:33] <Twingy> skunkworks with emc closed and "user" latency test I get 0 overruns
[22:33:01] <skunkworks> run glxgears from termninal also
[22:33:32] <dmess> lets all keep talking ...i'm an old APT guy... ive seen very good front ends... ive seen crap ones too.. ive wrote it in a text editor for the 777.. so it CAN do more in a t/e than many costly s/w
[22:33:38] <skunkworks> let it run for while
[22:33:42] <Twingy> In recent history there were 994064, 993969, 991147, 990923, and 995409 elapsed clocks between calls to the motion controller. This time, there were 1335277 which is so anomalously large that it probably signifies a problem with your...
[22:34:09] <Twingy> ok, glxgears is running (hardware accelerated)
[22:34:50] <Twingy> 0 overruns
[22:35:09] <skunkworks> what jitter?
[22:35:17] <Twingy> on glxgears?
[22:35:33] <skunkworks> latency test
[22:35:52] <Twingy> where do I see that
[22:36:16] <skunkworks> which test are you running?
[22:36:23] <Twingy> latency - user
[22:36:57] <skunkworks> latency-test?
[22:37:18] <Twingy> cnc@cnc:/usr/realtime/testsuite/user/latency$ ls
[22:37:18] <Twingy> display latency run
[22:37:40] <Twingy> I was executing "run"
[22:37:59] <Twingy> if I execute "latency" I get a segmentation fault
[22:38:00] <jepler> /usr/local/bin/latency-test
[22:38:04] <Twingy> k
[22:39:15] <Twingy> it's running
[22:39:20] <Twingy> been thrasing the system
[22:40:04] <Twingy> ok
[22:40:09] <Twingy> you want max jitter
[22:40:20] <Twingy> servo thread (1.0ms): 471002 (ns)
[22:40:29] <Twingy> base thread (25.0us) 471848 (ns)
[22:40:42] <skunkworks> yeck
[22:40:54] <Twingy> that's 0.5ms no?
[22:40:59] <skunkworks> do you have another video card you can put in there?
[22:41:11] <Twingy> what if I just disable the nvidia?
[22:41:17] <Twingy> and use vesa
[22:41:37] <skunkworks> try - but it is most likely the shared memory
[22:41:49] <Twingy> because when the program just starts up
[22:41:55] <Twingy> kitter is 10k max
[22:42:06] <Twingy> soon as glxgears loads 490k
[22:42:11] <Twingy> k, lemme switch vid drivers
[22:43:19] <Twingy> brb
[22:45:48] <Twingy> I switched to vesa driver and now I got no glx support
[22:46:31] <Twingy> I've got Load "glx" under "Module" in xorg.conf
[22:46:50] <skunkworks> I 'think' changing to vesa from the compiled nvidia driver is a pain.
[22:48:57] <eric_U> isn't it a separate package?
[22:49:25] <skunkworks> I think gene went thru this a month or so ago
[22:50:15] <eric_U> I went through it, didn't seem too hard
[22:50:44] <archivist> some rtfm a bit better
[22:50:58] <eric_U> people on the irc were just nicer to me
[22:51:04] <eric_U> dunno why
[23:15:43] <renesis> guys guys
[23:15:47] <renesis> my cnc computer died
[23:16:02] <renesis> but then i finished a pcb for someone and got paid
[23:16:15] <renesis> new CNC compy core arriving tomorrow \o/
[23:16:46] <renesis> heh, $100 in core parts is more powerful than my workstation pc =\ =\ =\
[23:17:02] <renesis> </blog>