#linuxcnc-devel Logs
Apr 12 2017
#linuxcnc-devel Calendar
01:17 PM seb_kuzminsky: morning Joe_Hildreth
01:18 PM Joe_Hildreth: Good morning Seb. Taking a little break from my hal_parport manpage writing.
01:18 PM seb_kuzminsky: nice
01:18 PM Joe_Hildreth: I am thinking when I "think" I have it complete, maybe someone with more experience can take a look to give me a bit of a sanity check.
01:18 PM seb_kuzminsky: fure sure
01:18 PM seb_kuzminsky: *for
01:19 PM seb_kuzminsky: that's what the review and comments on a PR are all about
01:19 PM Joe_Hildreth: What is the best way to do that?
01:19 PM seb_kuzminsky: make it what you think it should be, then submit a PR on github
01:19 PM Joe_Hildreth: SO, just do a PR when I think I am done and go from there?
01:19 PM Joe_Hildreth: OK
01:19 PM seb_kuzminsky: yep, that's it
01:20 PM seb_kuzminsky: http://linuxcnc.org/docs/devel/html/code/contributing-to-linuxcnc.html#_overview_of_the_process
01:21 PM seb_kuzminsky: just like you did before
01:21 PM Joe_Hildreth: Speaking of github, I set up gitlab in my hospital for me and another guy to use when we delevelop Joomla components for the hospital. Thanks to you and messing about with this project I think we can solve some of our internal issues. Thanks for helping me with that, well .. even if you didn't know you were. :-)
01:21 PM seb_kuzminsky: :-)
01:21 PM seb_kuzminsky: learning git is time well spent, for all kinds of projects all over life
01:23 PM Joe_Hildreth: Currious, why gtk for gui stuff and not QT or something else?
01:23 PM seb_kuzminsky: no deep reason
01:23 PM archivist: history
01:23 PM seb_kuzminsky: it was the most familiar to the folks who wrote those guis
01:24 PM seb_kuzminsky: there are some guis written in Tcl/Tk and ncurses too, i think
01:24 PM Joe_Hildreth: I like QT because of cross platform compiling but I guess with LinuxCNC that is mute.
01:24 PM seb_kuzminsky: people just use whatever makes sense for them, there is no project rules about what toolkits have to be used or anything
01:24 PM skunkworks: well - you could have the gui running on another machine... ;)
01:24 PM Joe_Hildreth: Simply because of the RT architecture.
01:24 PM seb_kuzminsky: a QT gui would be great
01:25 PM seb_kuzminsky: the GUIs don't run in realtime context, but many GUIs to operate partially using HAL pins, and HAL doesn't run over the network
01:26 PM seb_kuzminsky: there are two ways that GUIs talk to the motion controller: HAL and NML
01:26 PM seb_kuzminsky: HAL is not network transparent, so there would be a development effort needed to add that to HAL before you could use it
01:27 PM seb_kuzminsky: NML normally uses shared memory for communication, so that's not network transparent either, but there's a mostly dormant "NML-over-TCP" library in linuxcnc that could probably be revived and used pretty easily
01:27 PM Joe_Hildreth: Hmmm... I think I should keep taking small bites until I get comfortable.
01:28 PM seb_kuzminsky: learning linuxcnc is like eating an elephant
01:28 PM Joe_Hildreth: Yes SIR!!!
01:28 PM archivist: one byte at a time
01:28 PM seb_kuzminsky: hmm, or maybe eating an apen grove or whatever vegetarians do
01:28 PM Joe_Hildreth: I thought the Joomla framework was tough.
01:29 PM Joe_Hildreth: I prefer red meat. No offense I hope.
01:29 PM seb_kuzminsky: somewhere on my ever-growing todo list is writing better architecture & developer's docs for linuxcnc...
01:30 PM Joe_Hildreth: I see what appears to be only a handful of developers writing core code. Would hate to distract them from something useful to ask lots of newbie questions.
01:30 PM Joe_Hildreth: archivist: maybe I need to take it in nibbles.
01:30 PM seb_kuzminsky: yeah there are only a few devs, but please feel free to ask anything that comes to mind
01:31 PM Joe_Hildreth: Well, hopefull over time I can be more useful to the project.
01:31 PM archivist: with some that come and go adding code for their itch
01:31 PM seb_kuzminsky: that would be very welcome :-)
01:32 PM seb_kuzminsky: yeah there are occasional drive-by developers, that's how we all started i think
01:32 PM seb_kuzminsky: some stick around
01:32 PM seb_kuzminsky: like any open source project, more or less, i'd guess
01:33 PM Joe_Hildreth: When I first started playing with EMC, I thought I didn't really fit in. In my use of a homebuilt gantry router was more toy like than anything serious.
01:33 PM seb_kuzminsky: i'm sorry to hear that
01:34 PM seb_kuzminsky: what could we do to make new users with small homebuilt machines feel more welcome, do you think?
01:34 PM seb_kuzminsky: (for the record, i didn't have any machine at all when i started hacking on linuxcnc)
01:34 PM Joe_Hildreth: Nothing personal to anyone. When I looked at the mailing lists most folks seem to have some pretty serious machinery out there. I was a hobbiest trying to infiltrate I guess. :-D
01:35 PM archivist: I was in the user channel for a year or more during building/making my mind up
01:36 PM Joe_Hildreth: I don't really know how to answer that. Most hobbiest folks coming onboard are overwhelmed. New OS to learn, CNC stuff to learn, integration. etc.
01:36 PM seb_kuzminsky: yeah
01:36 PM archivist: some are, can be hard to help too
01:37 PM archivist: often they dont know the right questions yet
01:37 PM Joe_Hildreth: I always thought if there were additional things to help people over the hump of the learning curve, then we could ask more intelligent questions. But the other side of the coin is that it doesn't really fit in what the project is.
01:37 PM seb_kuzminsky: every once in a while people talk about making a series of introductory youtube videos to help with the newbie learning curve, but no organized effort has materialized in that area yet
01:38 PM seb_kuzminsky: yeah, we've fallen into the trap of trying to be both a machine controller and a linux-for-newbies documentation project before, to our detriment i think
01:38 PM archivist: trouble with vids is most are not edited, so long drawn out and slow
01:38 PM seb_kuzminsky: yeah
01:39 PM seb_kuzminsky: it's easy to hit record & upload it, but it's hard to make good pedagogical videos with structure and quality editing and production values
01:39 PM Joe_Hildreth: Now, maybe that is a way I could help. I have a decent website www.myheap.com and a youtube channel youtube.com/c/myheap
01:40 PM archivist: grrrrrrrr slider error at page one
01:40 PM Joe_Hildreth: archivist: on my site?
01:40 PM archivist: I was talking about annoying sliders today, just looking and trying to read and it slides...wtf
01:41 PM archivist: yes
01:41 PM seb_kuzminsky: wfm
01:41 PM seb_kuzminsky: wow, 5k views on how to run latency-test!
01:42 PM seb_kuzminsky: yeah, speaking for myself as an old hand at this stuff, i'd never have guessed people would want that
01:42 PM seb_kuzminsky: but obviously i'm wrong about that
01:43 PM archivist: want what?
01:43 PM seb_kuzminsky: would want to watch a video to learn about running latency-test
01:43 PM seb_kuzminsky: on Joe_Hildreth's channel, https://www.youtube.com/watch?v=AzY3S1SCV3I
01:44 PM archivist: I never could get my viewing hits on yt
01:45 PM Joe_Hildreth: I was going to write and do a video series on how to add a touch probe using classic ladder and O routines from MDI commands, then I noticed I had wiring issues. Had to take a step back.
01:46 PM archivist: I see I have 88 on one vid and 666k on another
01:46 PM Joe_Hildreth: So that was when I wrote the wiring tutorial. Thought I would demonstate the noise issue, show my pretty but screwed up wiring, then do a series of videos on the rewire using the document I created.
01:47 PM archivist: complete case studies of a problem can be useful
01:48 PM Joe_Hildreth: I thought of maybe even wiring a switch to my Oscope an show what noise is.
01:48 PM archivist: but a picture of a scope diagram of the noise can be faster than a video and in the text
01:50 PM Joe_Hildreth: I agree with you partly. Back in the 90's when I was running slackware linux, I always got the RTFM response. An for the most part, if I would have read more I would have been better off. But 30 minutes of reading or a 10 minute video.....
01:51 PM Joe_Hildreth: ANd lets face it, Windows users are kinda lazy when it comes to that, and some folks learn better by demonstration.
01:53 PM seb_kuzminsky: how to best help new LinuxCNC users coming from Windows & Mach3 is not a solved problem yet...
01:53 PM seb_kuzminsky: lunch time here, bbl
01:54 PM archivist: one way is show them something impossible on mach :)
01:55 PM Joe_Hildreth: I think the biggest single thing that could have helped me starting out was a 5 mile fly over of how it works. Unless you read the developer section of the docs (which a new person wont) you don't understand that you simply have software blocks and hardware drivers that are all toed together with HAL, and that everything is poll based.
01:56 PM archivist: timed regular poll, that part that makes usb useless
01:57 PM seb_kuzminsky: no, usb is useless for other reasons too, mostly inherent latency
01:57 PM Joe_Hildreth: Originally I seen it as this magical script that handled everything. I seen all kinds of stuff about hal, the ini file, different drivers, but still didn't have a clue what the linuxcnc program done to make that all work.
01:57 PM seb_kuzminsky: Joe_Hildreth: that's really insightful, thank you
01:57 PM seb_kuzminsky: i think some docs like that would be really helpful
01:59 PM Joe_Hildreth: I also know that you don't want to drop a bomb on them with tons of information either until they are ready for it.
01:59 PM seb_kuzminsky: yeah, there's got to be a balance there
01:59 PM archivist: its the latency that stops timed regular, we are saying the same thing
01:59 PM seb_kuzminsky: ah, ok
02:00 PM seb_kuzminsky: ok, lunch, later
02:00 PM Joe_Hildreth: Well, maybe that is where I can eventually be a help to the project. Assuming you all survive my never ending stream of questions. HAHA
02:00 PM Joe_Hildreth: CYA seb.
02:01 PM archivist: I just tend to find typos and little things to poke people with and let them run with it
02:02 PM Joe_Hildreth: I tell ya, I have never been involved in a project like this. Most of my coding, what little I do, is for my work and it is either just me or sometimes another guy who helps me.
02:03 PM Joe_Hildreth: So, github, git, pull requests ... well I am still trying to master that enough to be productive.
02:08 PM archivist: it is amusing to look at a page I put together a decade ago http://www.collection.archivist.info/hobbing.html
02:09 PM archivist: linuxcnc can do hobbing now with some hal trickery, the differential now exists but I dont think it has been used in a hobbing setup yet
02:11 PM archivist: andypugh, have you seen the current model engineers workshop mag? has an article showing the maths for mechanical helical hobbing
02:12 PM andypugh: No, the only issues of that I have seen are ones I got as freebies.
02:13 PM archivist: heh I could have got it as a freebee at arc euro trade last week, already bought it though
02:27 PM andypugh: It tirns out I am getting my magazines confused, I got freebies of “Machinist’s Workshop” and “Digital Machinist” for a “Top Tip” I sent in.
02:30 PM andypugh: I have forgotten what this means: Package linuxcnc-dev is not available, but is referred to by another package.
02:30 PM andypugh: This may mean that the package is missing, has been obsoleted, or
02:30 PM andypugh: is only available from another source
02:32 PM andypugh: Aha! synaptic has the answer. linuxcnc-uspace-dev…
03:24 PM Joe_Hildreth: So it appears that the HAL parallel port documentation is only available as a link through the config stepper docs. Should a link exist in the HAL section so that it is easier to get to?
03:25 PM archivist: I think navigation could be improved
03:30 PM JT-Shop: any document could be improved... the difficult part is actually improving as everyone has a different idea what the docs should be
03:30 PM Joe_Hildreth: John: WHile you are here I have a question.
03:31 PM JT-Shop: shoot
03:31 PM Joe_Hildreth: I wrote a best practices for wiring a while back with help from folks on the forums. That document is done and I think it would be a good addition. Although I can see maybe it shouldn't go in the LinuxCNC documentation. I think people could find it helpful.
03:32 PM Joe_Hildreth: Where to put it, if your interested. I can email it or if you have a specific place could try to do it myself.
03:32 PM JT-Shop: something like that could be on the wiki and my website if you like
03:33 PM Joe_Hildreth: Either way or both. I planned on posting to my website as well. As a newbie to the CNC world, if I would have had the document, it would have helped me.
03:35 PM Joe_Hildreth: I would want to give it one last go through for spelling errors and the like. Should I email it to you?
03:35 PM JT-Shop: yes, I think my website gets a lot of traffic looking for linuxcnc stuff
03:35 PM Joe_Hildreth: Your email?
03:35 PM JT-Shop: is it a .txt file?
03:36 PM Joe_Hildreth: It can be. I think it is in LibreOffice
03:36 PM JT-Shop: yea a text file would be better unless you have a bunch of fancy stuff in the document
03:37 PM Joe_Hildreth: Nothing fancy. Just grab your email from emc-list? I will send it to you.
03:38 PM JT-Shop: I opened another dialog window with you
04:02 PM Joe_Hildreth: Forget the link for parallel port from HAL, it is there under hardware drivers. Mea Culpa.
04:35 PM andypugh: Is anyone feeling Pythonic?
04:35 PM andypugh: https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/drivers/mesa-hostmot2/resolver.c#L322
04:35 PM andypugh: Sorry, ignore that
04:35 PM andypugh: https://github.com/LinuxCNC/linuxcnc/blob/master/src/emc/usr_intf/pncconf/pncconf.py#L5472
04:35 PM andypugh: Is the link
04:36 PM andypugh: pncconf allows you to choose sserial_modes other than 1, but only checks for 1.
04:37 PM andypugh: clearly “elif … “m2” // + “2” would work, repeated for m3, m4, m5.. But that seems messy
04:38 PM jepler: are the alternatives all one digit long?
04:38 PM jepler: no m15 ?
04:38 PM jepler: two alternatives come to mind: looping for j in "12345": ... if ("m"+j) in ...:
04:39 PM andypugh: The final output to HAL is “sserial_port_0=1234x5xx” so defitely only one digit.
04:39 PM jepler: or using a regular expression search (sigh) for r"m(\d+)" or so, to find the (first) instance of m followed by digits, then use the corresponding .match() value
04:39 PM jepler: then take the + off the \d so it matches a single digit
04:40 PM andypugh: I was thinking regex, but the code doesn’t import regex, and it seems a lot to add for one test
04:40 PM andypugh: (actually needs to capture exactly one digit, so + is wrong…)
04:41 PM andypugh: Oops, you already said that
04:41 PM andypugh: Let me try the loop
04:44 PM jepler: $ python
04:44 PM jepler: >>> import sys
04:44 PM jepler: >>> 're' in sys.modules
04:44 PM jepler: True
04:45 PM jepler: you basically will pay no penalty for importing re, it's very likely to be imported by early startup of python
04:48 PM andypugh: I can’t actually see where the user is choosing the process data mode for the 7i76.
04:48 PM andypugh: But he is complainig that he can, but it is ignored.
04:55 PM memfrob: Hi seb_kuzminsky, here now. Can you post the link to the dmesg of the stall?
04:56 PM seb_kuzminsky: hi memfrob!
04:56 PM memfrob: You said you're using volcano but 3.4.55 is no longer supported by the official RTAI repo as that kernel has been removed.
04:56 PM seb_kuzminsky: long time no see
04:57 PM seb_kuzminsky: that message must have gotten garbled. on the wheezy live cd we ship an old version of the ShabbyX rtai, based on rtai.org's 3.9, with your and Shabby's patches on top
04:57 PM seb_kuzminsky: including your updating of the kernel patch from some ancient kernel to 3.4.55
04:58 PM seb_kuzminsky: that part's all working well, except for the weird servo-thread scheduling offset that CaptHindsight reported
04:58 PM memfrob: Oh so you're using the RTAI repo from the tree Shabby and I worked on from way back, both kernel patches and modules.
04:58 PM seb_kuzminsky: the stalls i'm seeing are all with 4.1.18 and the rtai.org 5.0-test2 modules
04:58 PM memfrob: Oh the stalls are not happening with 3.4.55?
04:58 PM seb_kuzminsky: details here: http://highlab.com/~seb/rtai/
04:58 PM seb_kuzminsky: right, 3.4.55 is very stable as far as i know
05:00 PM memfrob: That's paolo's new calibration code that I don't use.
05:00 PM seb_kuzminsky: ?
05:00 PM seb_kuzminsky: the scheduling offset that CaptHindsight reported is with 3.4.55 and RTAI 3.9+shabby+memleak
05:00 PM memfrob: He rewrote the entire x86 calibration process, it's got a lot of problems.
05:00 PM memfrob: the 4.1 kernel you're using is not using the same calibration method as 3.4.55
05:01 PM seb_kuzminsky: i don't know if the scheduling offset also happens on rtai.org's 5.0-test2, on that hardware
05:03 PM memfrob: http://highlab.com/~seb/rtai/stall.2016-08-18/dmesg <- that stall isn't happening on the tree I worked on. That's paolo's new stuff.
05:04 PM memfrob: Also why do you usually use lapic on the kernel command line?
05:06 PM memfrob: SCHED_MC and SCHED_SMT should also be disabled as well as all the ACPI options except for CONFIG_ACPI_REDUCED_HARDWARE_ONLY and CONFIG_X86_PM_TIMER
05:11 PM seb_kuzminsky: i don't explicitly say lapic on the kernel command line, where do you see that?
05:12 PM memfrob: I also suggest changing CONFIG_HZ to 300. CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT can safely be set to 1, CONFIG_BINFMT_MISC should be disabled, CONFIG_HZ_PERIODIC should also be set. And on the livecd / stock debian install.
05:18 PM memfrob: I understand you're not interested in using code anymore outside of the official RTAI repo, but for my own use I was going to update my tree and add in 4.1.39 (latest right now) support without the new goofy auto tuning latency feature.
05:19 PM memfrob: If you want to give that a try when it's done, feel free. I get all sorts of hangs and stalls with his new work.
05:31 PM seb_kuzminsky: BINFMT_MISC shouldn't matter
05:31 PM seb_kuzminsky: i'll make the other changes you suggested and try that
05:33 PM seb_kuzminsky: won't a bunch of stuff break if i turn off all the ACPI options except for ACPI_REDUCED_HARDWARE_ONLY?
05:40 PM memfrob: BINFMT_MISC is a security vulnerability that serves no purpose for linuxcnc, it is highly discouraged. Because you have everything else on, you can leave ACPI_REDUCED_HARDWARE_ONLY alone on a second thought.
06:04 PM memfrob: If it's still stalling after those changes, then it's most likely the new changes to base/arch/x86/calibration
06:05 PM memfrob: I'm heading off, been looking at too much kernel code for the day, the RTAI support I just added to 3.16.43 looks good, will test tomorrow.
07:09 PM cradek: seb_kuzminsky: if you use my install, it does configure grub to explicitly add lapic
07:17 PM seb_kuzminsky: ah, that must be what memfrob was talking about
08:54 PM CaptHindsight: seb_kuzminsky: yes, that's what memfrob was talking about
09:05 PM cradek: seb_kuzminsky: that seems to fix many machines but I've never seen it harm anything
09:29 PM cradek: specifically it fixes this error which used to be really common: http://wiki.linuxcnc.org/cgi-bin/wiki.pl?TroubleShooting#LinuxCNC_doesn_t_run_missing_lapic
09:30 PM cradek: if it's not needed anymore for whatever reason we can not do it when/if we make a distro again
09:47 PM KGB-linuxcnc: 03Joe Hildreth 052.7 fa0c172 06linuxcnc 03docs/man/man1/hal_parport.1 Add manpage for hal_parport realtime component. * 14http://git.linuxcnc.org/?p=linuxcnc.git;a=commitdiff;h=fa0c172
09:48 PM cradek: Joe_Hildreth: that looks great, thank you
09:49 PM Joe_Hildreth: Thanks cradek. I am happy getting to participate.
09:49 PM cradek: I bet a dozen times I've typed man hal_parport and then groaned at the thought of finding it on a webpage instead
09:51 PM Joe_Hildreth: Well I hope I done it justice. I included Fixes #58 thinking it would close Issue number 58, I guess it should have been done in the actual commit, huh?
09:52 PM cradek: oh hmm - maybe so...?
09:52 PM Joe_Hildreth: So if the merge and build is good then I suppose you can close it.
09:52 PM cradek: it closed the PR automatically
09:52 PM cradek: it didn't close a bug though
09:52 PM cradek: er "issue"
09:53 PM Joe_Hildreth: Maybe I misunderstood Seb. Though he meant that if I included fixes #xx that it would automatically close the issue too.
09:53 PM cradek: yeah I bet it does, if it's in the commit message
09:57 PM Joe_Hildreth: Well, I hosed that one then. Forgot about it until I made the PR. Then I remembered, thought I would try anyway.
09:57 PM cradek: heh it's fine, the commit was perfect, that's what counts
09:57 PM cradek: the rest is fluff
09:58 PM Joe_Hildreth: So who do I remind to close Issue 58 - Add a manpage for the hal_parport component
09:58 PM cradek: jeez I wish github was better
09:59 PM cradek: I can't type 58 somewhere to see the "issue"
09:59 PM cradek: I have to guess what page it's on
09:59 PM cradek: fortunately there are only 3 pages so far
10:01 PM Joe_Hildreth: on page 3
10:01 PM cradek: yeah, got it :-)
10:01 PM Joe_Hildreth: hahaha guess you did. I am a slow reader I guess.
10:02 PM cradek: if I put 58 in the lower search box, not the upper one, it gives me that one and some other things that aren't even issues I think
10:02 PM cradek: so ... I guess it has what I want ... sort of
10:02 PM cradek: I'm just whining, ignore me
10:02 PM cradek: it's better than sourceforge's tracker
10:03 PM Joe_Hildreth: I installed gitlab at work for use in in-house projects. I think the workflow will make for better projects we are working on at the hospital.
10:03 PM cradek: cool!
10:03 PM cradek: we've used git for years and years at my office, and now I can't imagine not having it
10:04 PM Joe_Hildreth: We have been using git and a central repository. But working with this project has taught me a lot. Especially working with branches and leaving the master branch alone.
10:05 PM cradek: I think the merging-up workflow with feature branches is hard to beat
10:05 PM seb_kuzminsky: yeah it's pretty great
10:05 PM Joe_Hildreth: I think having a lot of the tool available on github through gitlab and some changes in workflow and testing would help me and my employee very much.
10:06 PM Joe_Hildreth: So, I you and Seb a lot of thanks for the help you guys have given me along the way. So ... Thank you Chris.
10:06 PM cradek: welcome!
10:07 PM Joe_Hildreth: And you too Seb. Didn't see you there.
10:08 PM Joe_Hildreth: Not sure what to do next. Maybe a 5 mile flyover of how LinuxCNC works.
10:11 PM cradek: heh, keep using it and fix whatever irritates you, I guess - that's what the rest of us do :-)
10:12 PM Joe_Hildreth: I am not capable of writing code for the project, but docs and maybe some help for newbies. I can do those things.
10:12 PM cradek: sweet
10:15 PM seb_kuzminsky: Joe_Hildreth: when i was in your situation a few years ago i found this to be the most helpful picture of the architecture: http://linuxcnc.org/docs/devel/html/code/code-notes.html#_architecture_overview
10:16 PM Joe_Hildreth: Yes, I came across that a few days back. That cleared a LOT of the mystery up for me.
10:17 PM seb_kuzminsky: it's unfortunately out of date, it doesn't show HAL, which is a very import part of the architecture now
10:21 PM Joe_Hildreth: Maybe someone can update it. Who made the original diagrams?
10:26 PM Joe_Hildreth: CYA Folks, I need to get to bed.