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