#linuxcnc-devel | Logs for 2015-05-21

Back
[00:25:00] <kwallace> cradek, I was pretty much looking at the price. I should be able to make one from hardware store materials.
[06:01:53] <jthornton> mozmck, no I missed it
[06:04:46] <jthornton> mozmck, yes I agree
[06:23:41] <jthornton> the only caveat is the section titles have to get back to being short so as to not take up the whole page
[08:06:35] <jthornton> mozmck, yes I can do that... now that I know how
[11:03:42] <mozmck> So it seems haltcl is inserting brackets and \ in the arguments passed to loadrt, but loadrt doesn't know what to do with them.
[11:12:22] <pcw_home> did you figure out your USB rt issue?
[11:13:05] <mozmck> I'm not sure yet. I may have, but it will take more testing
[11:13:45] <mozmck> It could have been a problem with old firmware and a buffer overflow.
[11:17:44] <mozmck> Somehow I need to be able to strip the tcl braces and stuff when passing arguments to loadrt.
[11:19:54] <mozmck> If I do this: loadrt $::HOSTMOT2(DRIVER) board_ip=$::HOSTMOT2(IPADDR) config="num_encoders=0 num_pwmgens=0 num_stepgens=6"
[11:20:07] <mozmck> It tells me it has an error executing this: loadrt $::HOSTMOT2(DRIVER) board_ip=$::HOSTMOT2(IPADDR) config="num_encoders=0 num_pwmgens=0 num_stepgens=6"
[11:20:34] <mozmck> oops!
[11:20:48] <mozmck> this instead: hal loadrt hm2_eth board_ip={\"10.10.10.10\"} config=\"num_encoders=0 num_pwmgens=0 num_stepgens=6\"
[11:22:38] <mozmck> bbl
[11:25:48] <jepler> one problem I perceive is the way you are using double-quotes
[11:26:03] <jepler> in Tcl, a double-quote is special at the beginning of a word, but not in the middle
[11:26:11] <jepler> proc show_args {args} {
[11:26:12] <jepler> puts "# args: [llength args]"
[11:26:13] <jepler> foreach arg $args { puts "argument: [list $arg]" }
[11:26:13] <jepler> }
[11:26:29] <jepler> given this routine that will show each of its arguments in turn, compare the result of
[11:26:33] <jepler> % show_args foo "x=a b c"
[11:26:34] <jepler> and
[11:26:37] <jepler> % show_args foo x="a b c"
[11:26:52] <jepler> oops, should be [llength $args]
[11:28:06] <jepler> in the latter case x="a is its own distinct argument, and it is represented as x=\"a
[11:29:12] <jepler> haltcl and halcmd quoting rules are different
[11:29:34] <jepler> now consider using loadusr to show what the arguments are -- put this script in a bin directory and mark it +x
[11:29:39] <jepler> http://emergent.unpythonic.net/files/sandbox/printargs
[11:30:29] <jepler> now compare
[11:30:29] <jepler> halcmd: loadusr -w printargs x="a b c"
[11:30:31] <jepler> and
[11:30:36] <jepler> haltcl: loadusr -w printargs x="a b c"
[11:31:23] <jepler> which are both different from a shell
[11:31:23] <jepler> bash$ printargs x="a b c"
[11:33:24] <jepler> so I guess there's no other lesson but that each system is different and you have to learn each system you're gonna use
[11:39:40] <jepler> one more insult is that rtapi_app and modprobe deal with module parameters slightly differently
[11:40:42] <jepler> modprobe gathers up everything after the module name into the single 'const char *param_values' parameter of the init_module syscall
[11:40:58] <jepler> so bash$ modprobe hm2_eth foo="a b c"
[11:41:10] <jepler> is equivalent to $ modprobe hm2_eth foo=\"a b c\"
[11:41:53] <jepler> in the init_module call. Both get the C string "foo=\"a b c\"" even though one invocation of modprobe had 5 arguments to its main() and the other had 3
[11:42:49] <jepler> .. while roughly speaking, rtapi_app depends on argv being arranged appropriately, with one key=value in each positional argument
[12:06:17] <skunkworks> zlog
[12:21:36] <jthornton> mozmck, http://gnipsel.com/linuxcnc/html/navcol.html
[12:23:18] <skunkworks> Tom_itx, this doesn't look quite right..
[12:23:18] <skunkworks> http://pastebin.com/ZYHg6bZw
[12:23:51] <skunkworks> oh wait - yes it does.. (confused by i/o number...)
[12:24:01] <skunkworks> cool
[12:24:04] <skunkworks> Thank you
[12:34:54] <skunkworks> Yep - they seem to count
[12:39:41] <Tom_itx> skunkworks are the pins where you wanted them?
[12:41:50] <skunkworks> looks like it. thanks again
[12:41:54] <Tom_itx> np
[12:44:37] <Tom_itx> i noticed after i did it wrong the first time he had put the pin numbers beside the IO in the .vhd file
[12:45:06] <Tom_itx> makes it alot easier to map when you don't have one
[12:46:44] <skunkworks> a bit of noise makes them count. Now I just need to hook something up.
[12:55:31] <Tom_itx> maybe some extra pullups would help that
[12:55:35] <Tom_itx> not sure
[12:55:53] <Tom_itx> debounce would but that may interfere with what you're doing
[12:57:22] <mozmck> jepler: thanks, reading your comments now.
[13:00:08] <mozmck> jepler: the reason I put the double quotes in there is that loadrt seems to need the config argument to have them. If they are not there I get errors about unknown arguments.
[13:07:00] <mozmck> jthornton: that looks pretty nice, but the toc box overlaps the main one in firefox here.
[13:09:25] <mozmck> I was also more thinking of the whole TOC (http://buildbot.linuxcnc.org/doc/scratch/v2.7.0~pre6~2.7-Docs~7158ed2/html/) being persistent so you never have to go up a level - is that doable?
[13:13:04] <mozmck> jepler: thanks for the help - I'll play with it some more. It seems if I don't pass config="num_encoders=0 num_pwmgens=0 num_stepgens=6" exactly with the quotes and all to the hm2_eth module, it does not recognize the arguments. So far I haven't figured out how to get that exact string passed using haltcl, especially if the string is in the inifile. When pulling from the inifile it wants to add braces as well.
[13:34:17] <mozmck> pcw_home: no, looks like I haven't resolved the usb rt issue. the firmware issue I was thinking of would not have caused this anyways.
[13:34:48] <mozmck> I tried setting the usb to a different IRQ, and moved the connection to different ports, but it still does it.
[13:36:27] <mozmck> over in #linux-rt someone said that usb traffic is usually not the problem, "the problem comes when devices are plugged/unplugged or the hub decides to reenumerate"
[13:39:47] <skunkworks> you would see that in dmesg though
[13:41:53] <JT-Shop> mozmck, can you give me a screen shot of that, it looks fine in my firefox :(
[13:44:06] <mozmck> http://pasteboard.co/DiThXoq.png
[13:44:43] <mozmck> JT-Shop: ^^^ Firefox 38.0 on linux mint 17.1
[13:53:49] <jepler> oh dear, that design is framed so if you send a link to a particular spot in the documentation (e.g., http://gnipsel.com/linuxcnc/html/gcode/machining_center.html#_control_and_data_components) you lose the navigation
[13:54:16] <jepler> on my linux (iceweasel 38.0.1) the black box around the navigation overlaps the documentation too
[13:55:46] <jepler> also the documentation doesn't extend all the way to the bottom of the screen, there's a blank area down there
[14:34:54] <JT-Shop> need some work yet I see
[15:05:10] <mozmck> jepler: working through your mini tutorial, and I get an error trying to run haltcl loadusr -w printargs x="a b c" - it says "loadusr": no such file or directory
[15:05:54] <jepler> mozmck: first guess, you either didn't put it in a binary on your path or you didn't make it +x
[15:06:08] <mozmck> It works using halcmd
[15:06:27] <mozmck> halcmd loadusr -w printargs x="a b c"
[15:06:27] <mozmck> # args: 2 -- note: arguments printed using python repr() notation
[15:06:27] <mozmck> argv[0]: '/home/moses/bin/printargs'
[15:06:27] <mozmck> argv[1]: 'x=a b c'
[15:07:01] <jepler> I don't immediately know why that would be
[15:10:44] <mozmck> oh, it works if I run haltcl, and then from that run loadusr -w printargs x="a b c"
[15:51:32] <mozmck> Ok, between help from jepler and dgarr, I got my loadrt line to work! Thanks a bunch!
[15:51:43] <mozmck> loadrt $::HOSTMOT2(DRIVER) board_ip=[lindex $::HOSTMOT2(IPADDR) 0] config=[lindex $::HOSTMOT2(CONFIG) 0]
[15:53:00] <mozmck> Now I can work on making it tell the user something like "Could not connect to the 7i92 board, check and make sure it is powered on", instead of 10 pages of guru level kernel message dump :)
[15:54:18] <jthornton> mozmck, see if the navigation is correct for you now
[15:55:28] <jthornton> I still can't figure out how to have the right click to open in a new tab... basically I need both an anchor and a onclick
[15:55:32] <mozmck> jthornton: you mean this page? http://gnipsel.com/linuxcnc/html/navcol.html
[15:56:15] <jthornton> yes
[15:56:34] <mozmck> The TOC box still overlaps the document area...
[15:57:13] <jthornton> I actually removed the navigation box and it does not show up locally but does on line :(
[15:57:37] <jthornton> maybe the iframe is the wrong approach to take
[15:58:34] <mozmck> I don't know about that at all.
[16:00:32] <mozmck> I wonder how they do it on this site: http://html.net/tutorials/html/
[16:02:54] <jthornton> with about 25 java scripts lol
[16:04:29] <mozmck> I looked at the page source but it looks like most of it is ad stuff.
[16:04:34] <jthornton> and php
[16:06:57] <jthornton> I gotta run and get the bike ready for tomorrow
[16:56:21] <JT-Shop> mozmck, did you refresh the page with Ctrl shift r?
[16:56:58] <mozmck> Oh, no, just F5
[16:57:07] <mozmck> Now it looks right!
[16:57:49] <mozmck> If you can do that for the whole TOC, that will be great!
[16:58:57] <JT-Shop> yes, I just did a small sample until I worked out the bugs
[17:00:22] <JT-Shop> I just found that linux secret reload the other day, in windoze I use Ctrl F5
[17:19:18] <Tom_itx> FF on both?
[17:22:32] <mozmck> interesting, I think Ctrl F5 works in linux, but on my system it's tied to changing workspaces :)
[18:10:44] <mozmck> pcw_home: I switched computers to a Lenovo desktop with a little faster core2-duo cpu, and it is so far working fine with the usb device running.
[18:11:35] <mozmck> This lenovo tested really bad at first, then I remove the ATI graphics card it came with and the latency was very good with the onboard video.