#emc-devel | Logs for 2006-01-19

[01:08:59] <SWPadnos> Hi Ray
[01:09:07] <rayh> Hi Steven
[01:09:25] <rayh> logger_devel: bookmark
[01:09:25] <rayh> See http://solaris.cs.utt.ro/irc/irc.freenode.net:6667/emcdevel/2006-01-19#T01-09-25
[01:09:51] <SWPadnos> not too much interesting stuff since you left
[01:11:19] <rayh> lost your addy in the crash
[01:11:47] <SWPadnos> spadnos at sover dot net
[01:12:19] <SWPadnos> like that'll fool any self-respecting spambot
[01:20:30] <rayh> on the way
[01:21:16] <SWPadnos_> ok, thanks
[01:22:01] <rayh> gonna switch machines
[01:51:18] <SWPadnos_> at least kill -9 still works ;)
[01:53:19] <rayh> Yes it does
[01:54:59] <rayh> You should try bc in place of halcmd
[01:55:20] <SWPadnos_> ok - maybe I should recompile halcmd first, with the changes ;)
[01:55:32] <rayh> Sure.
[01:56:53] <SWPadnos_> I changed it to bc, and I get "Error: can't read "fid":no such variable"
[01:56:58] <SWPadnos_> I sent it 2+3
[01:57:19] <SWPadnos_> of course, it helps if I "open" it first
[01:57:47] <SWPadnos_> interesting. I send bc 2+3, and I get back "2+3"
[01:58:05] <SWPadnos_> I then sent "2+3=", and it hung
[02:04:19] <rayh> I think some of the twisted up garbage I added to read is causing the problem
[02:04:26] <SWPadnos_> could be ;)
[02:04:35] <rayh> I've got serious mouse problems here.
[02:04:47] <SWPadnos_> that's no excuse
[02:04:49] <rayh> the wheel sends all kinds of editing events to kwrite
[02:04:57] <SWPadnos_> ah - maybe it is an excuse :)
[02:04:59] <rayh> I can't edit at all now.
[02:05:16] <SWPadnos_> how is the wheel configured?
[02:05:24] <SWPadnos_> is it a ZAxisMapping?
[02:05:34] <rayh> Uh I know not.
[02:05:49] <rayh> It's whatever psmouse does.
[02:05:56] <SWPadnos_> SWMBO just arrived home, I may be a little slow for a few
[02:06:16] <rayh> no worries. I'm going to be away for a while also.
[02:06:25] <SWPadnos_> ok
[04:45:34] <SWPadnos> SWPadnos is now known as SWP_Away
[15:49:20] <SWP_Away> SWP_Away is now known as SWPadnos
[17:11:59] <SWPadnos_> hey there - would you like a copy of the (still not working right) test.tcl?
[17:12:36] <rayh> sure.
[17:13:06] <SWPadnos_> ok. I added console prints in every function, so we know what the args passed are
[17:14:33] <rayh> dcc?
[17:14:42] <SWPadnos_> yep :)
[17:15:56] <rayh> nothing to this irc stuff.
[17:16:04] <SWPadnos_> as usual, this works great with bc, but not with halcmd
[17:16:17] <SWPadnos_> heh - once you get all the firewalling set up correctly :)
[17:16:31] <rayh> I don't quite understand why bc works and halcmd doesn't.
[17:16:37] <SWPadnos_> me either
[17:16:49] <rayh> There was a lot of talk about using Don Libes Expect instead of tcl
[17:16:58] <SWPadnos_> I saw that
[17:17:04] <rayh> but I'd hate to have to add another package
[17:17:13] <SWPadnos_> yep
[17:17:28] <rayh> Don works a building north of Fred Proctor.
[17:17:38] <SWPadnos_> the other interesting thing is that the programs don't seem to get cleaned up when you hit "close"
[17:17:47] <SWPadnos_> hey - the transfer was aborted
[17:18:28] <rayh> darn I got a zero file. try it again.
[17:19:44] <SWPadnos_> I can probably email you if necessary
[17:20:50] <rayh> Says that it's done but 0 length file.
[17:21:01] <SWPadnos_> ok - I'll mail it
[17:21:09] <rayh> tnx
[17:23:10] <SWPadnos_> it should be on the way now
[17:23:19] <rayh> thanks
[17:23:39] <SWPadnos_> I added a quit button (bound to escape), and an edit box for the command to run
[17:24:02] <SWPadnos_> but the programs don't go away when you close the file
[17:24:38] <SWPadnos_> if you ctrl-Z, then ps axf, you see anything you've opened, even if you also closed it (within test.tcl)
[17:31:20] <SWPadnos_> did you get the email?
[17:32:29] <rayh> Yep. Trying your work now.
[17:32:53] <SWPadnos_> phone
[17:37:48] <SWPadnos_> ok - back
[17:55:30] <SWPadnos_> incidentally, one thing I found is that halcmd is getting the commands, it's the return information that I can't seem to locate :)
[17:55:42] <rayh> Right.
[17:55:56] <SWPadnos_> oh - and don't send a "quit" command ;)
[17:56:16] <rayh> And it reads the empty reply from a command properly.
[17:57:06] <rayh> It doesn't return an errror if halcmd fails. Is that the -k arg?
[17:58:23] <rayh> rayh@ray64:~/emcdevelop/emc2$ bin/halcmd -sk newsig MySig3 bit
[17:58:24] <rayh> HAL: ERROR: duplicate signal 'MySig3'
[17:58:24] <rayh> HAL:0: newsig failed
[17:58:27] <SWPadnos_> -k means "keep going after errors"
[17:58:35] <rayh> right.
[17:58:54] <rayh> above is the reply I get when I try to duplicate an existing sig
[17:59:03] <rayh> in a terminal
[17:59:16] <rayh> but see nothing in the tcl.
[18:01:54] <rayh> ah it is a definite buffering problem in halcmd.
[18:02:07] <rayh> let me edit a response and you can see what I mean.
[18:03:34] <rayh> Opened file25
[18:03:35] <rayh> show sig M
[18:03:35] <rayh> (no answer here)
[18:03:35] <rayh> show pin
[18:03:36] <rayh> %
[18:03:36] <rayh> ... Done
[18:03:37] <rayh> bit FALSE MySig1
[18:03:39] <rayh> ... Done
[18:03:41] <rayh> bit FALSE MySig2
[18:03:43] <rayh> ... Done
[18:03:45] <rayh> bit FALSE MySig3
[18:03:47] <rayh> ... Done
[18:10:39] <SWPadnos_> phone
[18:14:35] <rayh> Looks like a 2.4-2.7k buffer
[18:14:46] <rayh> I got that from "show pin"
[18:14:56] <rayh> and it got about half way through the list.
[18:15:56] <SWPadnos_> hey - you actually got output :)
[18:17:49] <rayh> Oh yea.
[18:17:58] <rayh> Just not enough of it.
[18:18:02] <SWPadnos_> heh
[18:18:16] <SWPadnos_> I get 0, which is also not enough
[18:18:28] <rayh> Is there a way to tell halcmd to flush the buffer on each output.
[18:18:43] <rayh> Try show pin
[18:18:43] <SWPadnos_> halcmd does no buffering
[18:19:02] <SWPadnos_> I was using status, which always generates some output
[18:19:06] <rayh> you'll see about half the pins
[18:19:08] <SWPadnos_> had no config loaded
[18:19:20] <rayh> oh I see.
[18:19:45] <rayh> i'd bet if you enter an empty command a couple times after the status you'll see it.
[18:20:18] <rayh> nope
[18:20:36] <SWPadnos_> nope
[18:20:50] <SWPadnos_> what did you change to get some output? (if anything)
[18:21:33] <rayh> status
[18:21:34] <rayh> %
[18:21:34] <rayh> ... Done
[18:21:34] <rayh> HAL locking status:
[18:21:35] <rayh> ... Done
[18:21:35] <rayh> current lock value 0 (00)
[18:21:36] <rayh> ... Done
[18:21:38] <rayh> HAL_LOCK_NONE - nothing is locked
[18:21:40] <rayh> ... Done
[18:21:42] <rayh> HAL memory status
[18:21:44] <rayh> ... Done
[18:21:46] <rayh> used/total shared memory: 31177/65500
[18:21:54] <rayh> It's there.
[18:22:33] <SWPadnos_> maybe I'll just rebuild emc2 - this is a bit out of date
[18:22:52] <SWPadnos_> I'll load up the univstep config and see if a big buffer gets me anything
[18:24:00] <rayh> k
[18:24:40] <SWPadnos_> back in a minute - might as well get the mail while it's compiling
[18:26:34] <rayh> I had to issue "status" 11 times to get a response.
[18:27:10] <rayh> 12 times
[18:28:56] <rayh> 29 times to get a return from "show sig M"
[18:30:44] <cradek> does halcmd write to stdout or stderr?
[18:30:59] <SWPadnos_> stdout, I think
[18:31:44] <SWPadnos_> but it does mix printf with rtapi_print
[18:32:10] <cradek> hmm
[18:32:27] <SWPadnos_> rtapi_print uses puts (..., stdout)
[18:32:40] <SWPadnos_> fputs
[18:32:41] <rayh> changed -buffering to none and it made no difference.
[18:32:44] <cradek> maybe you should put fflush() after that
[18:32:45] <rayh> phone
[18:32:55] <SWPadnos_> I just tried that as well - same here
[18:34:59] <cradek> you put fflush in halcmd?
[18:35:07] <SWPadnos_> nope
[18:35:36] <SWPadnos_> I wonder if bc uses that?
[18:35:44] <SWPadnos_> bc works fine, halcmd doesn't
[18:35:59] <cradek> dunno
[18:39:31] <SWPadnos_> yep - they do use it - I'll add it to halcmd
[18:41:01] <cradek> yay
[18:42:12] <rayh> Wah, another death defying act.
[18:42:22] <rayh> Thanks guys.
[18:42:39] <SWPadnos_> hey - that did it. thanks, Chris
[18:43:35] <SWPadnos_> looks like I need to clean up a thing or two woth script mode though
[18:43:38] <SWPadnos_> with
[18:43:57] <cradek> sure, np
[18:44:41] <rayh> How about a val mode while you're at it!
[18:44:53] <SWPadnos_> oh what now? ;)
[18:45:03] <SWPadnos_> whazzatfer?
[18:45:13] <rayh> send a name and get it's value
[18:45:59] <SWPadnos_> what, it isn't enough that you can say "name = newvalue" ?
[18:46:22] <rayh> I was thinking of a querry.
[18:46:37] <SWPadnos_> I know. I'll look into it
[18:46:51] <rayh> How about if there is nothing after the equals it replies with the current value
[18:46:55] <SWPadnos_> I think it's not so simple though
[18:47:13] <rayh> then make that a part of 2.2 or later.
[18:47:15] <SWPadnos_> it may be that simple - I'll check
[18:47:40] <rayh> wow, you guys are awesome.
[18:48:28] <SWPadnos_> I guess you can get rid of all that debugging code now ;)
[18:49:05] <rayh> all we need are a couple of the proc's. I'll put em into halconfig.
[18:49:14] <rayh> and do some testing.
[18:49:41] <rayh> On second thought we ought to build a routine that gets replies from a list of pins or sigs.
[18:49:42] <SWPadnos_> I'm assuming that you only want this query to work for pins and signals
[18:49:50] <rayh> let me add that here and get it to you.
[18:50:08] <SWPadnos_> the fileevent thing is pretty cool - did you leave that in?
[18:50:34] <rayh> Yes.
[18:50:48] <rayh> The problem with it was that there was no event.
[18:50:55] <SWPadnos_> yep ;)
[18:51:14] <rayh> Tried it the other day with no success.
[18:52:22] <SWPadnos_> ah
[18:54:06] <SWPadnos_> ok - doing the name only query could get weird. what order would you like it to check for pins / params / signals?
[19:01:23] <SWPadnos_> ok - I have it doing the value thing, but it still returns the full line like you'd get from show
[19:01:35] <SWPadnos_> like "bit FALSE MySig1"
[19:03:02] <SWPadnos_> it also does partial matches, since that's what show does anyway
[19:03:06] <rayh> That should be good. the bit tells what kind of widget to use
[19:03:15] <rayh> right.
[19:03:23] <SWPadnos_> so the command "MySig" is equivalent to "show all MySig"
[19:03:34] <rayh> That works for me.
[19:03:47] <SWPadnos_> ok - I'll commit this, along with the fflush and script mode changes
[19:03:59] <rayh> Fantastic.
[19:04:57] <rayh> You're not using the eof at all?
[19:06:00] <SWPadnos_> nope - you would use that when interpreting results
[19:06:17] <SWPadnos_> or if you want to use "read" instead of "gets"
[19:06:25] <SWPadnos_> that would be a useful test
[19:08:08] <rayh> gets is fine for me.
[19:09:02] <rayh> But we do return the %?
[19:09:14] <SWPadnos_> yes
[19:09:20] <rayh> Great.
[19:09:24] <SWPadnos_> it's "%\n", so you actually get it with gets
[19:12:02] <SWPadnos_> interesting - the halcmd manpage says nothing about show all
[19:13:06] <SWPadnos_> do you know how to get bold underlined text in troff (man format)?
[19:14:02] <rayh> Not a clue.
[19:14:06] <SWPadnos_> heh -thanks
[19:14:13] <cradek> I wonder what it would take to add halcmd to emcsh
[19:14:14] <SWPadnos_> I think I'll eliminate the need instead
[19:14:26] <rayh> Sorry. I believe there is a troff formatter for Lyx.
[19:14:30] <SWPadnos_> shouoldn't be too much actually
[19:14:34] <SWPadnos_> shouldn't
[19:14:51] <cradek> that's probably the better, but harder, solution
[19:14:54] <SWPadnos_> the hard part would be removing all the parsing stuff, and just using the hal access functions
[19:14:59] <cradek> yeah
[19:15:49] <cradek> there should be a C API common to emcsh/cmdline frontend/other gui frontend
[19:16:03] <rayh> How would you use "halcmd to emcsh"
[19:16:43] <rayh> Oh. I see. You'd make a button that issued a halcmd.
[19:17:03] <SWPadnos_> well - you'd have the halcmd commands added to emcsh
[19:17:05] <rayh> Right out of the gui.
[19:17:11] <SWPadnos_> so you can access emc and HAL from the same pipe
[19:17:34] <cradek> i.e. so there are tcl commands that do hal things
[19:18:20] <rayh> Since tcl can open a channel to halcmd from the emcsh shell there should be no need.
[19:18:45] <SWPadnos_> it would eliminate any possible problems with zombie child processes though
[19:18:53] <SWPadnos_> this code will break if halcmd dies for some reason
[19:20:59] <SWPadnos_> argh - the commit message got lost
[19:21:47] <cradek> fix it with cvs admin
[19:22:02] <SWPadnos_> can a non-admin do that?
[19:22:14] <cradek> one way to find out
[19:22:20] <SWPadnos_> heh
[19:22:44] <cradek> it's not really admin
[19:23:00] <cradek> it's the functions you do with the rcs program (not co/ci) if you're using rcs
[19:23:09] <SWPadnos_> do you know what cvs command would be used?
[19:23:26] <cradek> cvs admin -m1.2.3.4:'this is my checkin message' filename
[19:23:37] <cradek> fill in the appropriate version, message, filename of course
[19:23:49] <SWPadnos_> hmmm - OK. I'll try that.
[19:26:05] <SWPadnos_> do I have to checkin or anything after that?
[19:26:14] <cradek> no, just look at the log and see if it changed
[19:28:27] <SWPadnos_> ok - that worked. thanks
[19:29:23] <cradek> np
[19:29:33] <cradek> I'm quite the problem solver today
[19:29:34] <SWPadnos_> I'm sure jmk wil lhave something to say about the new feature though ;)
[19:29:36] <SWPadnos_> heh
[19:29:55] <cradek> tell him either this, or you'll stick it in emcsh and make him write tcl
[19:30:14] <SWPadnos_> nah - you tell him. You're chairman of the board.
[19:30:33] <cradek> bah
[19:30:39] <rayh> a tcl interpreter can create subinterpreters with specific sets of defined commands.
[19:32:42] <SWPadnos_> you'd likely get a big efficiency boost by making a "halsh"
[19:33:16] <SWPadnos_> emcsh.cc is a big file
[19:34:54] <rayh> yes it is.
[19:35:30] <rayh> I think alex was talking about building something that paralleled iocontrol
[19:35:51] <rayh> but used the command set from emcsh.
[19:36:01] <SWPadnos_> for userspace commands?
[19:36:07] <rayh> Right.
[19:36:10] <SWPadnos_> odd
[19:37:00] <rayh> cycle start would be one example
[19:37:37] <rayh> The idea would be pins into emc
[19:43:53] <SWPadnos_> interesting
[20:24:50] <rayh> * rayh shovels snow to prepare for the next batch.
[21:21:03] <alex_joni> hello
[21:21:09] <SWPadnos> gah
[21:21:11] <SWPadnos> um - hello
[21:21:29] <alex_joni> * alex_joni just woke up..
[21:21:41] <SWPadnos> must have been a late night
[21:22:55] <alex_joni> yeah.. early morning :D
[21:23:01] <alex_joni> but it's late night now ;)
[21:29:23] <SWPadnos> midafternoon, you meas :)
[21:29:28] <SWPadnos> mean
[21:36:17] <alex_joni> who owns a motenc or motenc lite card around here?
[21:37:09] <SWPadnos> Ray, probably
[21:37:26] <SWPadnos> but I think he said they're "all out on loan"
[21:39:51] <alex_joni> that was about the STG afaik
[21:40:00] <alex_joni> s/afaik/iirc/
[21:40:15] <SWPadnos> OK - my memory certainly isn't infallible
[21:42:42] <alex_joni> certainly, I wouldn't wanna argue you on that
[21:43:01] <SWPadnos> heh - thanks
[22:58:28] <rayh> rayh is now known as rayh_away
[23:37:42] <rayh_away> rayh_away is now known as rayh
[23:47:35] <SWPadnos> hmmm - I was just thinking about the halcmd changes I made
[23:47:53] <rayh> and
[23:48:00] <SWPadnos> I think jmk won't like them because they change the semantics of halcmd
[23:48:16] <SWPadnos> it used to be command parameters
[23:48:23] <SWPadnos> now it can also be "parameter"
[23:48:38] <rayh> I thought it was param
[23:48:46] <SWPadnos> additionally, the method breaks if you want something with the same name as a command
[23:49:04] <SWPadnos> ie, you make a signal named "show" for example
[23:49:18] <rayh> okay.
[23:49:56] <SWPadnos> or, we add a command called "mysig" later :)
[23:50:25] <SWPadnos> I'll leave them in until he complains though
[23:50:46] <rayh> did you put the new stuff in man?
[23:50:52] <SWPadnos> I did
[23:50:57] <SWPadnos> I forgot to update the help text though
[23:51:04] <SWPadnos> (from -h or help)
[23:53:12] <SWPadnos___> SWPadnos___ is now known as SWP_Away
[23:53:41] <SWP_Away> SWP_Away is now known as SWPadnos
[23:53:49] <SWPadnos> hmm - that was odd.
[23:53:54] <SWPadnos> what was the last thing you got?
[23:55:19] <rayh> Signoff: SWPadnos (Nick collision from services.)
[23:55:19] <rayh> SWP_Away is now known as SWPadnos
[23:55:19] <rayh> <
[23:55:34] <SWPadnos> I mean from me :)
[23:55:50] <SWPadnos> I didn't see anything from you after the question about the manpages
[23:56:06] <rayh> <SWPadnos> I did
[23:56:06] <rayh> <SWPadnos> I forgot to update the help text though
[23:56:06] <rayh> <SWPadnos> (from -h or help)
[23:56:13] <SWPadnos> ah
[23:56:20] <SWPadnos> it would be interesting to make a script mode for help, so a script can find out the available ocmmands
[23:56:22] <SWPadnos> commands
[23:57:41] <rayh> Sort of like the "discovery" methods used in halconfig.
[23:58:03] <SWPadnos> sort of
[23:58:25] <SWPadnos> also useful if a comand is added to halcmd, and a script depends on it (can refuse to run if it's not available)
[23:58:42] <rayh> sure
[23:59:36] <rayh> just a [string first *save*] sor of thing.
[23:59:42] <rayh> sort