#emc | Logs for 2010-11-20

Back
[00:04:01] <theorb> theorb is now known as theorbtwo
[01:04:53] <skunkworks> heh
[01:05:02] <skunkworks> I had the same problem a few weeks ago
[01:06:19] <andypugh> I am still baffled, everything now looks OK in hal, but nothing from the motor driver.
[01:06:50] <andypugh> I suppose I need to scope the pins on the card to make sure there really is a signal there.
[01:07:27] <andypugh> Encoders and hall sensors are reading back, so I am pretty confident about the wiring.
[01:07:37] <andypugh> But that is a job for tomorrow.
[01:07:48] <skunkworks> heh - sleep tight
[01:08:16] <andypugh> Night all
[01:15:06] <CaptainW> I put the following into my EMC machine:
[01:18:13] <CaptainW> #1 = .01
[01:18:14] <CaptainW> O101 while [#1 gt -.42]
[01:18:14] <CaptainW> G0 Z#1
[01:18:14] <CaptainW> G1 X-7 F14
[01:18:14] <CaptainW> G0 Z.25
[01:18:14] <CaptainW> G0 X0
[01:18:14] <CaptainW> #1 = [#1 - .2]
[01:18:15] <CaptainW> O101 endwhile
[01:18:15] <CaptainW> 0101 call
[01:18:37] <CaptainW> it runs the function, but does not loop.
[01:18:40] <CaptainW> any thoughts?
[01:19:03] <SWPadnos> that call looks like 0101, not )101 (zero one zero one instead of letter O one zero one)
[01:19:13] <SWPadnos> err, O, not )
[01:19:27] <CaptainW> it is the letter O
[01:19:49] <CaptainW> i mistyped the last line in the example
[01:19:53] <SWPadnos> ok
[01:19:54] <CaptainW> it was not copy paste
[01:19:57] <skunkworks> was it a direct copy and paste? because it looks like the number 0 here also
[01:19:59] <skunkworks> ah
[01:20:01] <skunkworks> nm
[01:20:36] <CaptainW> The call works and it starts into the while, but never loops
[01:20:52] <CaptainW> so I tried doing while [#1=#1]
[01:21:05] <SWPadnos> what version of emc?
[01:21:07] <CaptainW> while (true) to force it and it still only runs once
[01:21:31] <CaptainW> That I do not knwo. What version should I be on?
[01:21:39] <SWPadnos> I don't know :)
[01:21:42] <CaptainW> I will go out to the shop and check.
[01:21:51] <SWPadnos> ok
[01:22:10] <CaptainW> be back in 10.
[01:22:15] <SWPadnos> it probably doesn't matter. anything from this year (more or less) has some unary minus code in it
[01:22:33] <SWPadnos> which is possibly relevant (but hopefully not)
[01:27:12] <CaptainW> ok, 2.3.5
[01:28:17] <SWPadnos> ok, you should have the fix I was thinking of
[01:28:40] <skunkworks> works fine without the 0101 call at the end here
[01:28:58] <skunkworks> makes 3 passes
[01:29:14] <CaptainW> hmmm.
[01:29:26] <CaptainW> are you on a newer version skunkworks?
[01:29:47] <skunkworks> an old version of trunk :(
[01:30:04] <CaptainW> oh.
[01:30:10] <skunkworks> 2.5 pree
[01:32:18] <SWPadnos> oh duh
[01:32:26] <SWPadnos> O101 isn't a subroutine, it's a while loop
[01:32:29] <SWPadnos> you don't call it :)
[01:32:33] <skunkworks> with the o101 call - I get EOF in file /home/samco/loop.ngc seeking o-work: o<101> from line 0
[01:32:38] <skunkworks> line 8
[01:32:43] <skunkworks> heh
[01:32:51] <SWPadnos> funny. I get a different error :)
[01:32:54] <SWPadnos> on line 9
[01:33:09] <skunkworks> I may be paraphasing ;)
[01:33:14] <SWPadnos> oh no, it's the same error (this time)
[01:33:25] <SWPadnos> I thought it was different, which it might have been the first time
[01:34:33] <CaptainW> I did start out the file with some other stuff. and ended with m30
[01:34:44] <SWPadnos> yeah. change O101 call to M2 and you're set
[01:35:36] <SWPadnos> if you want that loop to be in a subroutine, stick another O word around it, like O100 sub / O100 endsub (and then use O100 call)
[01:36:14] <CaptainW> does the while loop need to be in a subroutine?
[01:36:26] <SWPadnos> if you want to call it like one, yes
[01:36:45] <SWPadnos> otherwise it's just a loop that gets run as soon as it's encountered (like other G-code)
[01:38:37] <CaptainW> %
[01:38:37] <CaptainW> G17 G20 G40 G90
[01:38:37] <CaptainW> M08
[01:38:38] <CaptainW> S85 M3
[01:38:38] <CaptainW> O100 SUB
[01:38:38] <the_wench> http://wiki.linuxcnc.org/emcinfo.pl?Installing_EMC2#Preparing_Ubuntu_to_compile_emc2
[01:38:38] <CaptainW> #1 = -.01
[01:38:38] <CaptainW> O101 WHILE [#1 GT -.42]
[01:38:39] <CaptainW> G1 Z#1 F14
[01:38:39] <CaptainW> G1 X-7 F5.5
[01:38:40] <CaptainW> G0 Z.25
[01:38:40] <CaptainW> G0 X0
[01:38:41] <CaptainW> #1 = [#1 - 0.2]
[01:38:41] <CaptainW> O101 ENDWHILE
[01:39:08] <SWPadnos> and O100 ENDSUB right after (night have been cut off)
[01:39:21] <SWPadnos> you should use pastebin for more than a few lines ( http://pastebin.ca )
[01:39:31] <CaptainW> ok.
[01:39:35] <skunkworks> I should get something to eat
[01:40:07] <CaptainW> http://pastebin.ca/1996779
[01:41:01] <SWPadnos> ok, next thing to note is that variables 1 through 30 are locals, so the global #1 gets replaced with whatever you specify at the call
[01:41:09] <SWPadnos> like O100 call [47]
[01:41:11] <skunkworks> CaptainW: last one needs to be letter o not number o
[01:41:29] <SWPadnos> #1 in the subroutine will be 47, since that was passed in the call
[01:43:19] <CaptainW> globals are then over 30
[01:43:47] <CaptainW> ok, I appreciate your feedback. Thanks much.
[01:44:00] <SWPadnos> yes
[01:44:11] <SWPadnos> you could also change the sub so that you actually pass it parameters
[01:44:39] <SWPadnos> oh. actually it should work as is, with the change skunkworks pointed out
[01:44:49] <SWPadnos> since you set #1 in the subroutine
[01:45:32] <SWPadnos> http://pastebin.ca/1996782
[01:45:57] <SWPadnos> that is the same code (forgot to fix the typo even :) ), but using passed parameters for the start, end, and step values
[01:46:00] <CaptainW> is #1 and #2 jsut the position of the parameter passed? Like arg[0] arg[1]?
[01:46:04] <SWPadnos> yep
[01:46:08] <CaptainW> ok.
[03:26:27] <UncleG> I made my first EMC part on my Index Werke screw machine at about 5:30 this morning :)
[03:28:56] <qq-> Congratulations, UncleG! You have won the time-life collection of vintage AOL CDs, a set of 120!
[03:29:12] <UncleG> shucks.
[03:29:41] <qq-> Congratulations, UncleG! You have won a one way ticket to Christmas Island!
[11:06:39] <Paragon39> Hello All...
[12:13:26] <jthornton_> archivist: how far are you from Tonbridge
[12:13:50] <archivist> a long way
[12:14:07] <archivist> 140 miles or more
[12:14:44] <archivist> * archivist wonders whats in Tonbridge
[12:14:47] <jthornton_> ah ok, the latest chap to join the forum is from there and is converting a machine to cnc... didn't know if you were neighbors or not :)
[12:15:01] <jthornton_> just thought I'd check
[12:15:33] <archivist> thats Kent and Andypugh is nearer
[12:15:43] <archivist> Im midlands
[12:15:46] <jthornton_> ah, ok
[12:58:18] <psha> jepler: my hal.Pin patches are incorrect...
[12:58:54] <psha> i've again missed concept of what pointer is living in shmem and what's in local mem :(
[12:58:59] <psha> trying to fix them
[13:10:10] <psha> no, it's correct
[13:51:13] <psha> oops, invalid channel :)
[15:44:13] <UncleG> I have a usb gamepad, the keys are all picking up in hal scope, how do I get it to work now./
[15:44:15] <UncleG> ?
[15:45:55] <UncleG> Does anyone have an example hal file I can look at?
[15:47:06] <cradek> sounds like you are close. have a look at halui. it has a bunch of pins you can hook up to the gamepad pins you're seeing in halscope.fffff
[15:47:26] <cradek> fffff?
[15:47:34] <UncleG> Yeah I dont know how to "hook up"
[15:47:54] <UncleG> I need an example hal file so I know what to typle
[15:47:56] <UncleG> lol
[15:47:59] <UncleG> typle* ?
[15:48:00] <UncleG> :P
[15:48:15] <cradek> ah, then maybe start with the hal tutorial? hooking stuff up is what it's all about
[15:48:22] <cradek> heh neither of us can type today
[15:48:50] <UncleG> yeah, but all my books and such are at the shop 15 minutes away, no internet.
[15:49:10] <UncleG> if I can print off an example I can do it when I get there.
[15:52:50] <psha> there is one on the wiki
[15:53:08] <psha> http://wiki.linuxcnc.org/emcinfo.pl?Simple_Remote_Pendant
[15:53:41] <UncleG> Thank you, I didnt even see it.
[15:53:48] <UncleG> That is exactly what I need.
[16:17:39] <JT-Hardinge> glad you liked it
[16:38:50] <Bonny> psha here?
[16:39:56] <psha> yes
[16:40:03] <Bonny> bad news.
[16:40:05] <psha> i've fixed interlacing yesterday
[16:40:12] <Bonny> Still doesn't work
[16:40:20] <Bonny> seems same for me.
[16:40:28] <Bonny> I attached image on forum
[16:40:48] <psha> i'll check it
[16:40:52] <Bonny> and I got a lot of messages (same messages ) in console
[16:41:11] <Bonny> read: Resource temporarily unavailable
[16:41:40] <psha> wait a bit, i'll check in kvm
[16:41:40] <Bonny> For now I just reinstal camview
[16:42:00] <Bonny> maybe some deletion needed like yesterday?
[16:42:01] <psha> what version of libcamunits6 is now installed?
[16:42:07] <psha> see apt-cache policy
[16:42:35] <psha> 0.2.0-6~hardy~ubuntu8.04
[16:42:39] <psha> this is version with fixes
[16:42:49] <psha> it's definetly row_stride bug i've fixed yesterday
[16:42:58] <psha> image is displayed 3 times in a row
[16:43:22] <Bonny> libcamunits6:
[16:43:22] <Bonny> Installed: 0.2.0-5.2~hardy~ubuntu8.04
[16:43:22] <Bonny> Candidate: 0.2.0-5.2~hardy~ubuntu8.04
[16:43:22] <Bonny>
[16:43:32] <Bonny> .. not good
[16:44:26] <psha> have you done apt-get update?
[16:44:35] <psha> or how it's called in gui
[16:44:53] <Bonny> I update from gui
[16:45:10] <Bonny> apt-cache policy from terminal
[16:45:58] <psha> run sudo apt-get update from terminal for sure :)
[16:46:07] <Bonny> just doing
[16:46:59] <Bonny> yep now is ok
[16:47:17] <Bonny> upgrading
[16:49:55] <Bonny> little better
[16:50:10] <psha> not corrupted?
[16:50:21] <Bonny> corrupted
[16:50:23] <psha> :)
[16:50:34] <Bonny> I got image at 160 x 120
[16:50:37] <psha> question is _how_ it's corrupted :)
[16:50:43] <Bonny> but has few lines of noise
[16:51:04] <psha> in previous attempts you had 640x480?
[16:51:04] <Bonny> and after that something like image
[16:51:20] <Bonny> at 640 x 480 just black screen
[16:51:35] <Bonny> where to attach image for you
[16:51:49] <Bonny> on forum just isn't good place
[16:51:52] <psha> there are some services like pastebin for images
[16:52:08] <Bonny> do you know link?
[16:52:10] <psha> http://imagebin.ca
[16:53:53] <Bonny> http://imagebin.ca/view/pC4iMug.html
[16:54:25] <psha> are there other formats besides 160x120?
[16:54:32] <Bonny> with convert to rgb is same ?
[16:54:41] <Bonny> yes 640 x 480
[16:54:47] <psha> convert to rgb is needed for YUV cameras only
[16:54:50] <psha> or mjpeg
[16:54:53] <psha> or other strange ones
[16:55:04] <psha> and with 640x480 you have same image?
[16:55:13] <Bonny> no just black
[16:55:36] <psha> it looks like crop...
[16:56:46] <psha> bb, time for some food
[16:57:08] <Bonny> ok..
[16:57:19] <Bonny> just to kno image is still!
[16:57:37] <Bonny> (160x120)
[16:57:57] <Bonny> seems taht is sampled once and after that reports resource bussy!
[17:04:11] <psha> low format is buggy even on vivi driver
[17:04:42] <Bonny1> low format from where?
[17:04:50] <psha> low = small size
[17:05:10] <Bonny1> but high 640x480 is not workable at all
[17:05:19] <Bonny1> I mean I got just black
[17:05:27] <psha> that's bad but hope it's possible to fix it
[17:05:40] <psha> what image was interlaced was it live or still too?
[17:05:41] <Bonny1> I hope too
[17:06:09] <Bonny1> the image I send you seems to be captured once
[17:06:15] <psha> i'll add close/open workaround and we'll what happen
[17:06:23] <Bonny1> after that I se no change if I move cam
[17:06:47] <Bonny1> but on console window I get resource bussy message!
[17:06:52] <Bonny1> (a lot of them)
[17:06:57] <psha> that's bad :)
[17:07:06] <psha> is gqview running at same time?
[17:07:15] <Bonny1> But hopefuly says something what's bad.
[17:07:31] <Bonny1> gqview?
[17:07:38] <psha> in most cases it tells that someone else tryies to eat from same resource
[17:07:39] <psha> yes
[17:07:41] <psha> oops
[17:07:54] <psha> not gqview, but what was your 'working' app?
[17:07:57] <Bonny1> .. all other cam application's are closed
[17:08:04] <Bonny1> gqcam
[17:08:36] <psha> thanks
[17:08:48] <Bonny1> gqcam and cheese works without problems
[17:17:40] <psha> building experimental fix
[17:23:50] <psha> Bonny1: but you'll need to manualy install package with wget && dpkg -i
[17:24:45] <psha> Bonny1: cd /tmp; wget http://psha.org.ru/tmp/libcamunits6_0.2.0-6~hardy_i386.deb; sudo dpkg -i libcamunits6_0.2.0-6~hardy_i386.deb
[17:25:01] <psha> i've added reopen there
[17:25:07] <psha> maybe this will help
[17:28:02] <Bonny> even worse
[17:28:10] <Bonny> I can't view any image
[17:28:20] <Bonny> just black box in both resolutions
[17:28:36] <Bonny> and messages in console still present
[17:30:34] <Bonny> when execute camview I got error ** (camview:8344): WARNING **: Unable to load pixbuf
[17:30:49] <psha> pixbuf is ok
[17:30:58] <Bonny> .. in console! (before doing anything)
[17:31:24] <psha> i think camview tries to set window icon and fails
[17:32:49] <Bonny> and after I click my cam in input window the console get bunch of 'read: Resource temporarily unavailable'
[17:37:39] <psha> try again please
[17:37:54] <psha> but remove downloaded file first
[17:38:15] <psha> cd /tmp; rm -f libcamunits6_0.2.0-6~hardy_i386.deb; wget http://psha.org.ru/tmp/libcamunits6_0.2.0-6~hardy_i386.deb; sudo dpkg -i libcamunits6_0.2.0-6~hardy_i386.deb
[17:39:32] <Bonny> same result
[17:39:37] <Bonny> black window
[17:39:56] <psha> now resource unavable has to be 10/s
[17:40:04] <psha> rate of messages
[17:40:06] <psha> i mean :)
[17:40:14] <psha> is it true?
[17:40:33] <Bonny> I got aprox one message every 2 seconds
[17:40:49] <psha> and still no image?
[17:41:20] <Bonny> With last 2 fix is this rate. before fixes are mani in seconds
[17:41:26] <Bonny> no image sorry
[17:42:08] <psha> ah, that's better...
[17:42:10] <Bonny> and with that fixes the application cam lazy. ie responds wery slow
[17:42:21] <psha> there are 100ms sleeps :)
[17:42:41] <psha> i'm testing if it's needed to give v4l device to calm before reopen
[17:42:54] <Bonny> doesn't know exact time but redrawing is slow...
[17:42:59] <psha> if rate is slow even before last package then sleep is not needed
[17:43:17] <psha> i've added some debug messages there
[17:43:23] <Bonny> last tvo packages are slow
[17:43:48] <Bonny> and I discover taht in cam info here is no fps mark
[17:44:02] <Bonny> (on right side )
[17:44:33] <Bonny> before last two changes there was frame rate counter and shows somewhere betwen 5 an 15 fps
[17:44:59] <Bonny> (and probably I got same messages in console)
[17:45:47] <psha> i've removed reopen but added calmdown timeout
[17:46:00] <psha> maybe this will help
[17:46:30] <psha> hm
[17:46:33] <psha> EAVAIL is not error!
[17:46:40] <psha> my bad...
[17:46:51] <Bonny1> ?!?
[17:46:53] <psha> have to consult errno.h before doing something else :)
[17:47:07] <psha> EAGAIN is common errno in unix to signal that resource is not ready
[17:47:17] <psha> and you have to wait for a while and try again
[17:47:44] <Bonny1> I can wait :)
[17:49:26] <psha> try again please
[17:50:52] <Bonny> same
[17:51:12] <Bonny> black window and message every 2 second
[17:53:01] <psha> that was incorrect build... running one again
[17:54:22] <Bonny> very same
[17:56:10] <psha> build is not finished :)
[17:57:14] <Bonny> I just retry as I didn't be sure if I deleted package 1'st
[17:58:07] <psha> check now
[17:58:36] <psha> btw it seem that at least once package with fixed was uploaded into another dir and have not arrived to you :)
[17:59:06] <Bonny> Calm down device 0
[17:59:06] <Bonny> Frame captured ok
[17:59:06] <Bonny> read: Resource temporarily unavailable
[17:59:14] <Bonny> but still black box
[17:59:30] <psha> that's all in console?
[17:59:30] <Bonny> and 7fps
[17:59:35] <Bonny> yes
[18:00:23] <psha> no 'Calm down device...' message?
[18:00:40] <Bonny> just output to console
[18:02:37] <Bonny> I got some (still) garbage
[18:03:34] <Bonny> http://imagebin.ca/view/EuYgGnk.html
[18:04:03] <psha> with 640x480 - black screen?
[18:04:52] <Bonny> 640x480 blackbox
[18:05:07] <Bonny> low has garbage no image more.
[18:05:48] <psha> so now (unlike before) there is only one line about unavailable resource!?
[18:06:06] <psha> btw what is version of gqcam?
[18:07:00] <Bonny> http://imagebin.ca/view/89Jqf9.html
[18:07:57] <Bonny> gqcam is one old one.
[18:08:14] <Bonny> as I striped out all sliders and make croshair
[18:08:35] <Bonny> don't know exact version but at least half year old
[18:10:30] <psha> stock one is working too?
[18:10:34] <psha> from hardy?
[18:10:48] <Bonny1> it was working.
[18:11:41] <Bonny1> After I check if work then I'm uninstal it and build from cvs as I remember
[18:11:44] <psha> i'm checking why :)
[18:12:01] <psha> it seem that they both have same - open, ioctl, read...
[18:12:35] <Bonny1> I'm just decided on that one as is is shortest source and work :D
[18:12:52] <psha> yes, compared to cheese it's tiny :)
[18:13:15] <psha> when i was searching for app on which to base my camera work i was considering it too
[18:13:26] <Bonny1> and I'm was able to strip out all 'garbage sliders' to have just image on screen
[18:14:07] <Bonny1> .. and I'm included crosshair too. (Proud programmer)
[18:14:36] <Bonny1> But I have nill 0 zerro knovledge on C and similar.
[18:15:05] <Bonny1> Just I'm good on assembly with 8051 derivates of mcu.
[18:15:51] <psha> :)
[18:15:57] <psha> then C won't be hard for you :)
[18:16:45] <andypugh> You can inline assembler in C if you prefer
[18:17:07] <Bonny1> I can manage simple changes but to make something new is to much for me. And linux is little allyen for me still (too)
[18:17:15] <psha> may you try once again
[18:17:18] <psha> rm/wget/dpkg
[18:17:36] <andypugh> But you can see the machine code poking through C too, like the way the result of a calculation stays on the stack to be re-used.
[18:18:03] <psha> i've added some debug prints
[18:18:52] <Bonny> read: Resource temporarily unavailable
[18:18:53] <Bonny> Calm down device 0
[18:18:53] <Bonny> read 640x480 [921600]
[18:18:53] <Bonny> Frame captured ok
[18:18:53] <Bonny> read 640x480 [921600]
[18:18:53] <Bonny> read: Resource temporarily unavailable
[18:19:39] <Bonny> andy I can live with assembler. Just one time over 20 years I wan't to knov C
[18:20:24] <andypugh> I think C is worth learning. I learnt it earlier this year.
[18:20:51] <andypugh> (I have worked in machine code (and I don't mean assembler))
[18:20:59] <psha> Bonny: so you have one captured frame and another missed?
[18:21:17] <psha> and that's repeated?
[18:21:21] <Bonny> no
[18:21:26] <Bonny> I got black box
[18:21:32] <psha> i mean console :)
[18:22:03] <Bonny> As I send you and this is repeated.
[18:22:11] <Bonny> ..quick
[18:22:46] <skunkworks> can you default a checkbox in the pyvcp to true?
[18:23:02] <psha> but there are 'frame captured ok' lines?
[18:23:25] <Bonny> andy I think C for micro is just overkill. For ARM or similar is good. (here the assembly is weak)
[18:23:42] <Bonny> but frames are not visible!
[18:24:15] <Bonny> I see just black box but fps changes and console say's that frames are ok.
[18:24:23] <psha> invisible frames is more simple problems than invalid capture :)
[18:24:31] <psha> may you try loading vivi driver?
[18:24:41] <psha> this will give you another input device
[18:24:42] <Bonny> where to get?
[18:24:49] <psha> sudo modprobe vivi
[18:24:55] <psha> it's testing device for video
[18:25:21] <psha> choose vivi (v4l, not v4l2!), convert to rgb and opengl
[18:25:25] <psha> is there any image?
[18:26:00] <Bonny> wery nice black box!
[18:26:22] <psha> try (don't accept) apt-get install libgl1-mesa-swx11
[18:27:08] <Bonny> slavko@emc2:~$ apt-get install libgl1-mesa-swx11
[18:27:08] <Bonny> E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)
[18:27:08] <Bonny> E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
[18:27:08] <Bonny> slavko@emc2:~$
[18:27:13] <psha> sudo :)
[18:27:15] <psha> it's root command
[18:27:45] <psha> it seem that camview must have non-opengl output
[18:28:17] <Bonny> slavko@emc2:~$ sudo apt-get install libgl1-mesa-swx11
[18:28:17] <Bonny> Reading package lists... Done
[18:28:17] <Bonny> Building dependency tree
[18:28:17] <Bonny> Reading state information... Done
[18:28:17] <Bonny> The following packages were automatically installed and are no longer required:
[18:28:18] <Bonny> mesa-common-dev python-xml python-numarray
[18:28:18] <Bonny> Use 'apt-get autoremove' to remove them.
[18:28:19] <Bonny> The following extra packages will be installed:
[18:28:19] <Bonny> libosmesa6
[18:28:20] <Bonny> The following packages will be REMOVED:
[18:28:20] <Bonny> libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libglu1-mesa-dev
[18:28:21] <Bonny> ubuntu-desktop
[18:28:21] <Bonny> The following NEW packages will be installed:
[18:28:22] <Bonny> libgl1-mesa-swx11 libosmesa6
[18:29:29] <psha> may you try to do it? in most cases swx11 performs better on rtai kernel
[18:29:50] <psha> at least there are two reports that this solves latency issues :)
[18:30:03] <Bonny> http://pastebin.com/8Wtyj7Ep
[18:30:21] <Bonny> to install?
[18:30:32] <psha> yes
[18:30:49] <psha> it replaces hardware accelerated OpenGL renderer with software one
[18:31:07] <Bonny> I had working CNC here...
[18:31:18] <Bonny> how danger to proceed
[18:31:27] <psha> you may roll back by installing libgl1-mesa-{glx,dri}
[18:31:39] <psha> this will remove swx11 package and restore previous state
[18:31:42] <Bonny> ok I go
[18:31:46] <psha> in most cases this is safe
[18:31:57] <psha> and sometimes it solves some probles caused bu glx
[18:33:18] <Bonny> someone should make new liveCD (hardy) for older computers with newest EMC
[18:33:52] <psha> are not there backports available on http://linuxcnc.org repo?
[18:34:08] <Bonny> vivi show image!
[18:34:34] <psha> try cam now
[18:34:39] <Bonny> Quickcam show image
[18:34:56] <Bonny> I mean live image
[18:35:00] <psha> niec
[18:35:01] <psha> niec
[18:35:02] <psha> nec
[18:35:04] <psha> nice!
[18:35:05] <psha> :)
[18:35:19] <Bonny> That's is long one
[18:35:38] <Bonny> so what package to use now?
[18:35:54] <Bonny> to just reinstall ?
[18:36:08] <psha> apt-get install --reinstall libcamunits6
[18:37:14] <Bonny> ok image is here
[18:37:36] <Bonny> but console has very quick output
[18:37:54] <Bonny> read: Resource temporarily unavailable
[18:38:44] <psha> may you try to check how fast is it?
[18:38:55] <psha> 100/s? 10/s?
[18:39:03] <psha> if it's like 10/s - it's ok
[18:39:13] <psha> i'll silent them and you'll be happy
[18:39:26] <psha> if it's 100/s - then some sleeping/polling have to be added
[18:40:17] <Bonny> if you mean fps it's around 6
[18:40:31] <Bonny> .. i just check if CNC still works
[18:40:40] <psha> sure
[18:40:41] <psha> :)
[18:40:52] <psha> fps is not that interesting as EAGAIN error rate
[18:41:15] <Bonny> then what you mean?
[18:42:10] <Bonny> Hey.... What did you do it with my computer?
[18:42:22] <Bonny> latency drops from 16uS to 8!!!
[18:42:32] <psha> :)
[18:42:40] <psha> another happy user of swx11 :)
[18:43:11] <Bonny> it go to 9us with glxgears in fullscreen
[18:43:31] <Bonny> ... and cam running and ..10 windows oppened
[18:43:45] <psha> swx11 sacrifices opengl performance in favor of lower interrupt/hardware abusing rate
[18:43:58] <Bonny> seems that I can decrease basethread!
[18:44:20] <psha> you still have to run latency test for some time...
[18:44:36] <Bonny> it's run underground just now
[18:44:50] <psha> thanks
[18:45:11] <Bonny> I wil do that entire day before changing timebase
[18:45:11] <psha> i'll build last package with timestamps in error messages so you may tell my what is EAGAIN error rate
[18:45:23] <psha> and based on this info i'll fix this error
[18:47:08] <psha> it'll be ready in ~5 minutes
[18:47:28] <Bonny> I just trying to make it works under EMC
[18:47:39] <psha> there is camview-emc program
[18:47:48] <psha> but it's not available on hardy still :)
[18:47:57] <psha> one of packages was corrupted during build
[18:48:33] <Bonny> sadly I discover that already
[18:50:10] <Bonny> But how long will be corrupted? Minutes, weeks, months or years?
[18:50:54] <psha> hope that it'll be one or two-hours (pessimistic)
[18:51:13] <psha> package is built but all files were trashed before packaging :)
[18:51:20] <psha> do rm/wget/dpkg
[18:51:24] <psha> there is new version with timestamps
[18:52:19] <psha> oops
[18:52:24] <Bonny> ?
[18:52:29] <psha> rm/wget/dpkg :)
[18:52:38] <psha> mv libcamunits6_0.2.0-6~hardy~master_i386.deb libcamunits6_0.2.0-6~hardy
[18:52:39] <psha> :)
[18:52:41] <psha> without .deb
[18:53:02] <psha> now i've fixed and new package is ready to be wget'ted
[18:54:25] <Bonny> messages goes like crazy
[18:54:31] <Bonny> Error read timestamp: 1290279181
[18:54:31] <Bonny> read: Resource temporarily unavailable
[18:54:31] <Bonny> read 640x480 [921600]
[18:54:31] <Bonny> Error read timestamp: 1290279181
[18:54:31] <Bonny> read: Resource temporarily unavailable
[18:54:31] <Bonny> read 640x480 [921600]
[18:54:32] <Bonny> Error read timestamp: 1290279181
[18:54:32] <Bonny> read: Resource temporarily unavailable
[18:55:20] <psha> crop part with same timestamps
[18:55:33] <psha> and count (grep -c Resource) error lines
[18:55:44] <Bonny> mv libcamunits6_0.2.0-6~hardy~master_i386.deb libcamunits6_0.2.0-6~hardy
[18:55:52] <Bonny> something wrong with that
[18:56:12] <psha> yes :) that was invalid command on my side :)
[18:56:42] <psha> so may you crop part with same timestamps and ask grep to count Resource lines for you?
[18:57:04] <Bonny> out of range in my head
[18:57:08] <psha> hnm
[18:57:09] <psha> hm
[18:57:10] <psha> so
[18:57:22] <psha> run camview > /tmp/output.log
[18:57:23] <Bonny> how to do that
[18:57:31] <psha> setup chain
[18:57:36] <psha> wait for a while (5-10 seconds)
[18:58:04] <psha> quit camview
[18:58:33] <Bonny> yes
[18:58:51] <psha> then do 'grep "Error read" /tmp/output.log | sort | uniq -c'
[18:59:01] <psha> this will give you lines with counts
[18:59:15] <psha> without single quotes
[18:59:53] <Bonny> what number you need?
[19:00:25] <Bonny> 2130 Error read timestamp: 1290279430
[19:00:25] <Bonny> 4595 Error read timestamp: 1290279431
[19:00:25] <Bonny> 3280 Error read timestamp: 1290279432
[19:00:25] <Bonny> 2660 Error read timestamp: 1290279433
[19:00:25] <Bonny> 2820 Error read timestamp: 1290279434
[19:00:26] <Bonny> 2845 Error read timestamp: 1290279435
[19:00:26] <Bonny> 2891 Error read timestamp: 1290279436
[19:00:35] <Bonny> this is 1'st few
[19:02:12] <psha> oops
[19:02:16] <psha> that's much!
[19:02:47] <Bonny1> just that give me
[19:03:15] <psha> i have to add some sort of waiting...
[19:03:48] <Bonny1> just don't slow down the EMC :D
[19:04:06] <psha> hope i won't :)
[19:19:56] <psha> Bonny1: rm/wget/dpkg
[19:20:07] <psha> there are still some prints
[19:22:37] <Bonny> http://pastebin.com/5aueDEvu
[19:26:01] <psha> but it seem that there are x5 EAGAIN calls per one frame call
[19:26:07] <psha> i think that's ok
[19:26:22] <Bonny1> not alwaiys
[19:26:24] <psha> ~35 read requests per second is not huge amount
[19:26:51] <psha> counter is flushed after successful read
[19:27:02] <psha> and i don't see any 50000 line in output
[19:27:16] <psha> so it tells me that there are only 4 sleeps performed
[19:27:28] <Bonny> yes 5000 is in output
[19:27:49] <psha> i may increase base period to 20k so there will be even less sleeps
[19:28:17] <psha> 1 + 2 + 3 + 4 = 120ms
[19:28:18] <Bonny> well I'm not sure what that mean for me
[19:28:25] <psha> with 2 it will be 2 + 4 + 6
[19:28:27] <psha> 3 sleeps
[19:28:37] <psha> let it be 10ms :)
[19:28:43] <psha> i've added increasing sleep
[19:28:49] <psha> when EAGAIN occurs
[19:28:56] <Bonny> EAGAIN while reading; Sleep: 40000
[19:28:56] <Bonny> EAGAIN while reading; Sleep: 10000
[19:28:56] <Bonny> EAGAIN while reading; Sleep: 20000
[19:28:56] <Bonny> EAGAIN while reading; Sleep: 30000
[19:28:56] <Bonny> EAGAIN while reading; Sleep: 40000
[19:28:56] <Bonny> EAGAIN while reading; Sleep: 50000
[19:28:57] <psha> first we sleep for 10ms
[19:28:59] <psha> next for 20
[19:29:01] <psha> next for 30
[19:29:02] <psha> etc
[19:29:13] <psha> until we reach 200ms or succeded in reading frame
[19:29:27] <psha> 200ms is ceil for sleeps, success flushes sleep to zero again
[19:30:42] <Bonny> I don't know how exactly that works. As I understand You invoke frame read and in mean time (until frame are ready) releases time with sleep?
[19:30:54] <Ratamahata> hi
[19:31:34] <psha> no, if i get EAGAIN i sleep for a while and return failure
[19:31:34] <Ratamahata> anybody here
[19:31:44] <psha> then i'm invoked again and try to read frame one more time
[19:31:56] <psha> it seem that polling is broken on you kernel/cam/driver/etc
[19:32:02] <psha> so workaround is needed
[19:32:13] <andypugh> No, nobody here at all Ratamahata
[19:32:16] <psha> Ratamahata: here are many, many of anybodies
[19:32:25] <Ratamahata> lol
[19:32:33] <andypugh> psha: Bah! I had him fooled htere till you bew it
[19:32:50] <Ratamahata> spricht auch jemand deutsch?
[19:33:02] <psha> нет, только по русски
[19:33:11] <psha> Bonny1: i'm building final version
[19:33:38] <Bonny> So practicaly you invoke frame read and if got EAGAIN then wait some time and again invoke read? (until pass without err)
[19:34:02] <andypugh> Ratamahata: Sorry, I don't see any german speakers online
[19:34:13] <psha> yes
[19:34:24] <Bonny> but some other languages are present..
[19:34:33] <psha> ideally poll need to do it for us
[19:34:43] <psha> but it's broken for unknown reason
[19:34:48] <Ratamahata> ok, my english is very bad
[19:35:32] <Bonny> psha but what if you try to estimate how fast frames came and then try to read on such time?
[19:35:40] <psha> Ratamahata: and who's is good?
[19:36:06] <psha> Bonny: it's possible, and there is timeout-based reading method
[19:36:13] <psha> but it's harder to hook
[19:36:18] <Bonny> or just try to get 10 frames per second and if pass then increase rate but if fail decrease it?
[19:37:14] <psha> calculating fps is not straightforward :) you need to calculate mean for some time and to store it somewhere
[19:37:22] <Bonny> If I understand you then you just need to calculate new sleep time based on few previous frames?
[19:37:23] <psha> then adjust timeout
[19:37:37] <psha> yes, but you need to be very exact
[19:37:51] <psha> and still you'll have EAGAIN errors if you miss proper time
[19:38:13] <psha> i don't know when previous frame is trashed and new arrives
[19:38:17] <Bonny> That's true but lot less of EAGAIN
[19:38:33] <psha> last version has 4 EAGAINS per one frame
[19:38:36] <Xavier_H> Hi all
[19:38:38] <psha> i think it's not high amount
[19:38:44] <andypugh> Ratamahata: Most of the people on here speak very bad English, especially the Americans, don't worry about it
[19:38:47] <Bonny> Frames was doesn't buffered?
[19:39:15] <psha> Bonny: i don't know how exatly frame handling is implemented in v4l1
[19:39:23] <Bonny> Is the problem if you read to slow?
[19:39:32] <JT-Hardinge> lol at andypugh
[19:40:05] <psha> if previous unread frame is discarded - then no problems
[19:40:16] <Bonny> I think so.
[19:40:50] <psha> so let's try
[19:41:06] <psha> if this will be easy - i'll try to hook it
[19:41:43] <Bonny> In this case we can start with 100ms delay and every frame decrease sleep for few ms until EAGAIN. After that add few ms and voila ?!
[19:42:27] <psha> heh, but we have to fit into framework :)
[19:42:46] <Ratamahata> the problem is that i am new on emc and have problems with the english manual
[19:43:14] <Bonny> In other side for our application the 5 frames per second is just enought so we can have fixed sleep
[19:43:16] <Xavier_H> I encountered some problem to synthesize Hostmost2 driver for 5I23. I setup the Xilinx settings32.sh for the environment variable. My error message are :
[19:43:18] <Xavier_H> """
[19:43:20] <Xavier_H> xavier@xavier-Latitude-E6500:~/Bureau/hm2-dev$ make
[19:43:22] <Xavier_H> ./build.py i23 SVST8_4IM2_72 fw/5i23/SVST8_4IM2.BIT
[19:43:24] <Xavier_H> # workdir /home/xavier/Bureau/hm2-dev/fw/5i23/SVST8_4IM2_work
[19:43:26] <Xavier_H> # xst -ifn scr
[19:43:28] <Xavier_H> # exited with 127
[19:43:30] <Xavier_H> make: *** [fw/5i23/SVST8_4IM2.BIT] Erreur 127
[19:43:32] <Xavier_H> """
[19:43:34] <Xavier_H> I let in fimware.txt only this line because I don't want to synthesize all firmwares: "i23 SVST8_4IM2"
[19:43:52] <Xavier_H> Anyone have synthetise hostmost2 firmware here?
[19:44:55] <JT-Hardinge> Ratamahata: what problems do you have?
[19:45:16] <psha> Bonny: the problem is that we have to declare what we want - polling or timeout, in the beginning
[19:45:45] <Bonny> That's easy! Flip the coin :D
[19:45:49] <psha> :))
[19:46:27] <Xavier_H> Sorry I try to synthesize hostmost2 firmware and not the driver.
[19:46:33] <Ratamahata> JT-Hardinge: the configuration is fine, i search for a german manual
[19:46:33] <Bonny> What kind of timeout?
[19:47:12] <Bonny> Did you have chance to request frame but to get message if frame doesn't ready within time?
[19:47:53] <Bonny> If that's true then I think that is better candidate.
[19:48:30] <JT-Hardinge> the only translation has been to French
[19:48:43] <JT-Hardinge> can you read French?
[19:48:52] <Ratamahata> thats the problem :(
[19:49:22] <JT-Hardinge> Ratamahata: there are some German speaking people on the forum
[19:49:42] <Ratamahata> oh, that are good news
[19:49:58] <Bonny> Ratamahata what about girl or ... May help you to translate.
[19:49:58] <psha> Bonny: i'll check environment variable for method
[19:50:24] <andypugh> Xavier_H: The only person I know of who creates Hostmot2 firmware (other than Pete) is jepler.
[19:51:04] <andypugh> Xavier_H: Why are you creating your own, is there a missing feature that you require?
[19:51:54] <Ratamahata> thank you all for help, i look in the forum
[19:51:56] <Xavier_H> Yes I want to implement module to communicate with my sanyo denki PA035C absolute encoder
[19:51:56] <Ratamahata> bye
[19:52:21] <Xavier_H> thank you to respond andypugh
[19:52:27] <andypugh> Is that SPI?
[19:53:01] <Xavier_H> no RS485 2.5MHz with specific protocol
[19:53:22] <Xavier_H> I have the documentation to make the good IP
[19:53:38] <Xavier_H> I know VHDL en Xilinx spartan 3 FPGA
[19:54:38] <andypugh> In that case, I think it is likely that only pcw or jepler are going to be able to help
[19:54:50] <Xavier_H> but I am not very confortable with make automation...
[19:55:15] <Bonny> well in meantime just one question. As LPT port's are every day harder to find what interfaces are expected to work for EMC ? (to be simple and cheap)
[19:55:24] <andypugh> The 8i20 uses a 2.5MHz serial protocol.
[19:55:29] <Xavier_H> The makefile seems to autogenerate themself, depending of configurations
[19:55:33] <Xavier_H> !!!
[19:56:24] <andypugh> Bonny: Long term perhaps cabled-PCIe.
[19:56:30] <Xavier_H> My idea is to copy the relative resolver interface and put the module behind
[19:56:53] <Xavier_H> because I don't know how to modify hostmost2 driver side
[19:57:06] <Xavier_H> (sorry for my poor english...)
[19:57:12] <andypugh> Bonny: Short-term PCI parallel cards are <$5 delivered from Hong-KOng
[19:58:08] <Xavier_H> jepler : Are you online?
[19:58:20] <Bonny> I know that but what if there are no free PCI?
[19:58:23] <andypugh> LPT ports are only supported because they are cheap and common. They are not a very good solution. But they are a better solution than USB
[19:58:25] <psha> Xavier_H: no chance, he's on dev chan
[19:59:13] <andypugh> 1928: jepler: bbl!
[19:59:44] <Xavier_H> psha: ok, perhaps I should try to connect to this channel, what is its name?
[19:59:51] <psha> #emc-devel
[19:59:59] <psha> if that's was not top secret ;)
[20:00:02] <Bonny> ..but are good for software stepgen in low cost machines.
[20:00:17] <andypugh> I think compiling Hostmot2 firmwares counts as developmen.
[20:00:49] <Xavier_H> psha: andypugh: thank you, I will try there!
[20:01:28] <Bonny> I can't imagine software stepgen over USB. Maybe over ethernet but not sure too.
[20:02:14] <andypugh> No serial protocol will have enough pins for software stepgen
[20:02:48] <Bonny> ?!?!
[20:02:51] <psha> andypugh: industrial ethernet seems ok but hardware costs too much
[20:03:07] <andypugh> That's not software stepgen though, is it?
[20:03:26] <psha> i've read ethercat specs and it seem that you may use software stepgen
[20:03:44] <andypugh> Software means step and direction on seperate lines to the drive (or individual phase drives)
[20:03:46] <psha> there is reliable transmission and very low latency
[20:04:10] <psha> you still need some form of conversion from serial (ethercat) to pins
[20:04:11] <andypugh> How many signal pins?
[20:04:15] <psha> some digital or analog outputs
[20:04:51] <Bonny> hmm as I know the ethercat has known latency between own modules but not between PC and blackbox
[20:05:00] <andypugh> That's sort of my point. Once you are decoding serial data to step/dir then you might as well offload the step generation too.
[20:06:25] <psha> Bonny: with realtime ethernet implementation on host it'll have konw latency between host and modules too
[20:06:30] <psha> andypugh: that's true
[20:06:46] <Bonny> decoding ethernet frame is easy. So ethernet to pins aren't so hard. But how to push PC to reliable send ethernet frame every 10 us for example?!
[20:07:51] <andypugh> There was a realtime USB protocol as an add-in to RTAI, but it seems to have fallen into disrepair.
[20:08:14] <psha> Bonny: there is RT-NET project
[20:08:23] <psha> but it has limited capabilities
[20:08:28] <psha> at least not rotting like RT-USB
[20:08:32] <Bonny> USB is much harder to realize in hardware than ethernet.
[20:10:10] <Bonny> psha did you know that lattency here is stil under 10uS (after openGL change)
[20:15:26] <psha> Bonny: that's nice :)
[20:15:52] <Bonny> i think so
[20:16:05] <Bonny> I had to go now...
[20:16:09] <Bonny> see ya
[20:19:45] <psha> Bonny: it's too hard to hook timeout for me now :(
[20:20:03] <Bonny> yust catch me
[20:20:06] <psha> soemthing wierd is going and i'm to tiredto figure it out :)
[20:20:16] <psha> hope i'll fix it on monday
[20:20:22] <psha> with python bindings too
[20:20:30] <Bonny> ok have nice day and night
[20:20:38] <psha> thanks
[20:20:41] <psha> at least you have working one
[20:20:43] <Bonny> same
[20:20:49] <psha> with not too high overhead
[20:21:08] <psha> i'll post status update on forum if i'll get it running
[20:21:12] <Bonny> it's not ussable for me until work inside EMC
[20:21:19] <Bonny> ok
[20:21:34] <Bonny> bye
[23:31:26] <JT-Hardinge> I'm sure glad I was drinking that night I saw the Discovery 308 on flea bay
[23:31:53] <andypugh> Had you drunk enough to bid?
[23:33:14] <JT-Hardinge> enough to offer enough to buy it lol
[23:33:24] <JT-Hardinge> got me humming a Joe Walsh tune too
[23:34:37] <JT-Hardinge> I think it was the same reason I have the Hardinge CHNC :)
[23:34:47] <andypugh> Talking of tunes, do you get the Kronenbourg 1664 ads in the US?
[23:35:05] <JT-Hardinge> I've never seen them
[23:35:10] <JT-Hardinge> part done brb
[23:36:51] <andypugh> http://www.youtube.com/watch?v=-77sVQ7Zgv0
[23:37:16] <JT-Hardinge> do I need speakers?
[23:37:20] <andypugh> Aye
[23:37:33] <pfred1> I have speakers on this machine
[23:37:35] <JT-Hardinge> heh, no speakers on the lathe... yet
[23:37:48] <andypugh> Modulate the servo PWM
[23:38:04] <JT-Hardinge> ROTFLMAO
[23:39:57] <jt-plasma> plasma has speakers
[23:40:09] <JT-Hardinge> andypugh>http://www.youtube.com/watch?v=-77sVQ7Zgv0
[23:41:27] <andypugh> Its less fun if you don't know the song and artiste of course.
[23:41:53] <JT-Hardinge> oh, I'm not familiar with them
[23:42:06] <andypugh> More typical: http://www.youtube.com/watch?v=W3xJDmBq2Cg
[23:43:12] <JT-Hardinge> for some reason youtube does not excite my speakers on the plasma... must be missing something
[23:44:12] <JT-Hardinge> * JT-Hardinge closes down the flea bay window for his own safety
[23:48:27] <andypugh> I am mainly checking the 'bay for boring heads, but not seeing the bargains I hope for.
[23:48:43] <andypugh> Perhaps I need to search in other languages
[23:50:42] <andypugh> I think that eBay has increased the value of old machine tools by a factor of about 10. When my dad built his workshop up he was disappointed if he paid more than scrap metal prices
[23:52:36] <JT-Hardinge> machine prices over here are the lowest I've seen in a long time
[23:53:16] <andypugh> Well, the last thing my dad bought was a universal grinder for £50
[23:53:22] <JT-Hardinge> it's amazing how much time I spend looking up feeds and speeds now that I can control them and I have better tooling
[23:53:28] <JT-Hardinge> surface grinder?
[23:53:30] <andypugh> With all the tooling
[23:53:32] <pfred1> ebay is top dollar
[23:54:31] <andypugh> Something about the size and design of http://www.p-h-s.co.uk/Jones/Shipman_1300.htm
[23:54:56] <andypugh> But with a taller, rotatable head to add sirface grinding.
[23:55:03] <JT-Hardinge> cool
[23:55:25] <andypugh> He has the space...
[23:55:36] <pfred1> not the sort of surface grinder i am familiar with
[23:55:39] <JT-Hardinge> I'm out of space
[23:55:50] <JT-Hardinge> but have 900 sq ft on the way
[23:57:22] <andypugh> pfred1: It's a Universal grinder, does external and internal cylindrical, tool and cutter sharpening and surface grinding.
[23:57:43] <JT-Hardinge> I've never touched one but it sounds neat
[23:58:16] <pfred1> this is more of my idea of a surface grinder: http://www.gmtmachines.com/surfpic2.jpg
[23:58:32] <pfred1> I remember when I first started using one cranking the handles would crack me up
[23:59:04] <JT-Hardinge> I used to run one similar to that to make cutters for nail points lol
[23:59:09] <andypugh> That's a dedicated surface grinder. He gave his away when he got the Universal.
[23:59:57] <JT-Hardinge> http://www.linuxcnc.org/component/option,com_kunena/Itemid,20/func,view/catid,30/id,5476/lang,english/#5476