halshow?
- rafferty
- Offline
- Premium Member
Less
More
- Posts: 83
- Thank you received: 11
28 Dec 2016 06:26 #84792
by rafferty
halshow? was created by rafferty
Wanting to put some gpio bits to work on 51i25's extra DB25 (P2) and found HALSHOW not working.
Does ADMIN HALSHOW work for you?
I get the following message in ~/gcode/logfiles/pathpilotlog.txt
couldn't read file "/home/rogge/repos/tormach_linuxcnc/linuxcnc/tcl/bin/halshow.tcl": no such file or directory
while executing
"source /home/rogge/repos/tormach_linuxcnc/linuxcnc/tcl/bin/halshow.tcl"
(file "/home/operator/tmc/bin/halshow" line 2)
ADMIN HALMETER and ADMIN HALSCOPE both work OK
I'm running v1.9.7.
Does ADMIN HALSHOW work for you?
I get the following message in ~/gcode/logfiles/pathpilotlog.txt
couldn't read file "/home/rogge/repos/tormach_linuxcnc/linuxcnc/tcl/bin/halshow.tcl": no such file or directory
while executing
"source /home/rogge/repos/tormach_linuxcnc/linuxcnc/tcl/bin/halshow.tcl"
(file "/home/operator/tmc/bin/halshow" line 2)
ADMIN HALMETER and ADMIN HALSCOPE both work OK
I'm running v1.9.7.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23310
- Thank you received: 4858
28 Dec 2016 09:49 #84796
by andypugh
Replied by andypugh on topic halshow?
I don't recognise "admin" as a command, is this a PathPilot thing?
No real surprise that it can't find a file via a path that only exists on Daniel Rogge's PC
The "normal LinuxCNC" way would be to open a terminal, and then run
No real surprise that it can't find a file via a path that only exists on Daniel Rogge's PC
The "normal LinuxCNC" way would be to open a terminal, and then run
halcmd -kf
loadusr halshow
Please Log in or Create an account to join the conversation.
- rafferty
- Offline
- Premium Member
Less
More
- Posts: 83
- Thank you received: 11
28 Dec 2016 11:02 #84799
by rafferty
Replied by rafferty on topic halshow?
"ADMIN" is an MDI command, for instance typing "ADMIN HALSCOPE" in the MDI window will open a halscope over the top of PathPilot. There are about 20 admin commands as of v1.9.7. Can also run python progs from the MDI window with "PY".
I'm familiar with how halcmd, halrun etc work on a normal linuxcnc machine and have had a bit of play with hal and pyvcp as a learning exercise.
Trying a variation of your suggestion, "ADMIN HALCMD -KF" in the MDI window will run halcmd in the terminal used to start PathPilot (with args -KF because lowercase can't be entered in the MDI window) but then entering "halshow" at the "halcmd:" prompt reports
"<stdin>:1: Unknown command 'halshow'"
Surprisingly the path through Daniel Rogge's home directory exists on my PC and probably on all the PCs that have installed PathPilot using Tormach's install disk.
As the MDI ADMIN commands HALMETER, HALCMD and HALSCOPE do run I was hoping someone had looked into why HALSHOW doesn't before I have ago myself.
I'm familiar with how halcmd, halrun etc work on a normal linuxcnc machine and have had a bit of play with hal and pyvcp as a learning exercise.
Trying a variation of your suggestion, "ADMIN HALCMD -KF" in the MDI window will run halcmd in the terminal used to start PathPilot (with args -KF because lowercase can't be entered in the MDI window) but then entering "halshow" at the "halcmd:" prompt reports
"<stdin>:1: Unknown command 'halshow'"
Surprisingly the path through Daniel Rogge's home directory exists on my PC and probably on all the PCs that have installed PathPilot using Tormach's install disk.
As the MDI ADMIN commands HALMETER, HALCMD and HALSCOPE do run I was hoping someone had looked into why HALSHOW doesn't before I have ago myself.
Please Log in or Create an account to join the conversation.
- smgvbest
- Offline
- Elite Member
Less
More
- Posts: 311
- Thank you received: 51
28 Dec 2016 18:55 #84817
by smgvbest
Replied by smgvbest on topic halshow?
it looks like V1.9.5 was only version to have a "valid" halshow cmd in ~/tmc/bin
all others have a stub which called /home/rogge/repos/tormach_linuxcnc/linuxcnc/tcl/bin/halshow.tcl
of course this doesn't exist.
in v1.9.5 halshow is simply a version of halshow.tcl.
So I tried to copy the v1.9.5 to my v1.9.7 directory (cp ~/v1.9.5/bin/halshow ~/tmc/bin )and it doesn't error, but it doesn't work either
it executes and leaves a process running but no display. I'm not a python/tcl person (though thinking I should learn) so not sure what's going on with it.
in the log is just this
LinuxCNC status.task_mode change was MODE_MANUAL is now MODE_MDI
status.task_state was STATE_ESTOP is now STATE_ON
ADMIN HALSHOW
from the cmdline I see it running
operator@tormachpcnc:~$ ps -ef | grep halshow
operator 18785 1 99 12:18 pts/0 00:00:30 /bin/sh /home/operator/tmc/bin/halshow
I've used ADMIN HALCMD SHOW and it works but is not what you're after
all others have a stub which called /home/rogge/repos/tormach_linuxcnc/linuxcnc/tcl/bin/halshow.tcl
of course this doesn't exist.
in v1.9.5 halshow is simply a version of halshow.tcl.
So I tried to copy the v1.9.5 to my v1.9.7 directory (cp ~/v1.9.5/bin/halshow ~/tmc/bin )and it doesn't error, but it doesn't work either
it executes and leaves a process running but no display. I'm not a python/tcl person (though thinking I should learn) so not sure what's going on with it.
in the log is just this
LinuxCNC status.task_mode change was MODE_MANUAL is now MODE_MDI
status.task_state was STATE_ESTOP is now STATE_ON
ADMIN HALSHOW
from the cmdline I see it running
operator@tormachpcnc:~$ ps -ef | grep halshow
operator 18785 1 99 12:18 pts/0 00:00:30 /bin/sh /home/operator/tmc/bin/halshow
I've used ADMIN HALCMD SHOW and it works but is not what you're after
Please Log in or Create an account to join the conversation.
- rafferty
- Offline
- Premium Member
Less
More
- Posts: 83
- Thank you received: 11
29 Dec 2016 09:42 #84844
by rafferty
Replied by rafferty on topic halshow?
On my computer v1.9.5 and v1.9.7 have the same two line halshow, as does v1.9.1 which is the oldest version I have, but...
I have ADMIN HALSHOW running on a virtual machine PathPilot sim install, not extensively tested but it seems OK, I assume it will run on a "real" PathPilot machine, I'll try it soon.
All the missing files came off a v1.7.2b PathPilot source disk that cost $30 (I think) about two years ago, with the correct shared object versions it seems.
I'm constantly urged to learn python and I should but I don't ever get around to it.
I have ADMIN HALSHOW running on a virtual machine PathPilot sim install, not extensively tested but it seems OK, I assume it will run on a "real" PathPilot machine, I'll try it soon.
All the missing files came off a v1.7.2b PathPilot source disk that cost $30 (I think) about two years ago, with the correct shared object versions it seems.
mkdir -p /usr/lib/tcltk/linuxcnc/
copied into this dir hal.so, linuxcnc.so, linuxcnc.tcl from the PP source disk /linuxcnc/tcl/
NOTE: linuxcnc.so is NOT the one in ~/tmc/lib/python/
copied from PP source disk /linuxcnc/tcl/bin/halshow.tcl to ~/tmc/bin/
changed line 2 in ~/tmc/bin/halshow
from
source /home/rogge/repos/tormach_linuxcnc/linuxcnc/tcl/bin/halshow.tcl
to
source /home/operator/tmc/bin/halshow.tcl
change line 21 in ~/tmc/bin/halshow.tcl
from
source [file join [file dirname [info script]] .. linuxcnc.tcl]
to
source /usr/lib/tcltk/linuxcnc/linuxcnc.tcl
I'm constantly urged to learn python and I should but I don't ever get around to it.
The following user(s) said Thank You: racedirector
Please Log in or Create an account to join the conversation.
- smgvbest
- Offline
- Elite Member
Less
More
- Posts: 311
- Thank you received: 51
07 Jan 2017 00:39 #85376
by smgvbest
Replied by smgvbest on topic halshow?
I tried this on mine and it still didn't work
halshow executes but the window never shows up
halshow executes but the window never shows up
Please Log in or Create an account to join the conversation.
- rafferty
- Offline
- Premium Member
Less
More
- Posts: 83
- Thank you received: 11
07 Jan 2017 03:44 #85386
by rafferty
Replied by rafferty on topic halshow?
When you say "still didn't work" you mean ADMIN HALSHOW and not halshow in a terminal?
After first success with ADMIN HALSHOW I did the exact steps listed (to verify I hadn't left something out) on the real mill machine and it worked.
All I can suggest is verify that files have ended up where they should be, have a look at gcode/logfiles/pathpilotlog.txt, dmesg or systlog, there might be something there.
Failing that I can post md5sums of the files, or even the binaries.
After first success with ADMIN HALSHOW I did the exact steps listed (to verify I hadn't left something out) on the real mill machine and it worked.
All I can suggest is verify that files have ended up where they should be, have a look at gcode/logfiles/pathpilotlog.txt, dmesg or systlog, there might be something there.
Failing that I can post md5sums of the files, or even the binaries.
Please Log in or Create an account to join the conversation.
- smgvbest
- Offline
- Elite Member
Less
More
- Posts: 311
- Thank you received: 51
07 Jan 2017 06:29 #85390
by smgvbest
Replied by smgvbest on topic halshow?
Ok, I got it working but I had to make one additional change.
i needed to edit the linuxcnc.tcl file and point to my sources. by default it was pointing to /home/rogge/...
my sources where in $HOME/src so I made that change and now it works
My sources where from the 1.8.2 release and FWIW, I paid $10 to tormach for the sources
it seems the one file you don't have without the sources is the hal.so file
I change this block from
to
i needed to edit the linuxcnc.tcl file and point to my sources. by default it was pointing to /home/rogge/...
my sources where in $HOME/src so I made that change and now it works
My sources where from the 1.8.2 release and FWIW, I paid $10 to tormach for the sources
it seems the one file you don't have without the sources is the hal.so file
I change this block from
namespace eval linuxcnc {
variable HOME /home/rogge/pathpilot_source/path_pilot/linuxcnc
variable BIN_DIR /home/rogge/pathpilot_source/path_pilot/linuxcnc/bin
variable TCL_DIR /home/rogge/pathpilot_source/path_pilot/linuxcnc/tcl
variable TCL_LIB_DIR /home/rogge/pathpilot_source/path_pilot/linuxcnc/tcl
variable TCL_BIN_DIR /home/rogge/pathpilot_source/path_pilot/linuxcnc/tcl/bin
variable TCL_SCRIPT_DIR /home/rogge/pathpilot_source/path_pilot/linuxcnc/tcl/scripts
variable HELP_DIR /home/rogge/pathpilot_source/path_pilot/linuxcnc/docs/help
variable RTLIB_DIR /home/rogge/pathpilot_source/path_pilot/linuxcnc/rtlib
variable CONFIG_PATH {~/linuxcnc/configs:/home/rogge/pathpilot_source/path_pilot/linuxcnc/configs}
variable NCFILES_DIR /home/rogge/pathpilot_source/path_pilot/linuxcnc/nc_files
variable LANG_DIR /home/rogge/pathpilot_source/path_pilot/linuxcnc/src/objects
variable IMAGEDIR /home/rogge/pathpilot_source/path_pilot/linuxcnc
variable REALTIME /home/rogge/pathpilot_source/path_pilot/linuxcnc/scripts/realtime
variable SIMULATOR no
variable CONFIG_DIR {}
foreach _dir [split {~/linuxcnc/configs:/home/rogge/pathpilot_source/path_pilot/linuxcnc/configs} :] {
lappend CONFIG_DIR [file normalize $_dir]
}
unset _dir
variable USER_CONFIG_DIR [lindex $CONFIG_DIR 0]
variable _langinit 1
}
to
namespace eval linuxcnc {
variable HOME ~/src/linuxcnc
variable BIN_DIR ~/src/linuxcnc/bin
variable TCL_DIR ~/src/linuxcnc/tcl
variable TCL_LIB_DIR ~/src/linuxcnc/tcl
variable TCL_BIN_DIR ~/src/linuxcnc/tcl/bin
variable TCL_SCRIPT_DIR ~/src/linuxcnc/tcl/scripts
variable HELP_DIR ~/src/linuxcnc/docs/help
variable RTLIB_DIR ~/src//linuxcnc/rtlib
variable CONFIG_PATH {~/linuxcnc/configs}
variable NCFILES_DIR ~/src/linuxcnc/nc_files
variable LANG_DIR ~/src/linuxcnc/src/objects
variable IMAGEDIR ~/src/linuxcnc
variable REALTIME ~/src/linuxcnc/scripts/realtime
variable SIMULATOR no
variable CONFIG_DIR {}
foreach _dir [split {~/linuxcnc/configs:~/tmc/configs} :] {
lappend CONFIG_DIR [file normalize $_dir]
}
unset _dir
variable USER_CONFIG_DIR [lindex $CONFIG_DIR 0]
variable _langinit 1
}
Please Log in or Create an account to join the conversation.
- rafferty
- Offline
- Premium Member
Less
More
- Posts: 83
- Thank you received: 11
07 Jan 2017 11:52 #85395
by rafferty
Replied by rafferty on topic halshow?
Ahh, mistake on my part. The linuxcnc.tcl copied into /usr/lib/tcltk/linuxcnc/ came from Ubuntu LinuxCNC sources not from PathPilot sources.
Your modifications to linuxcnc.tcl didn't work for me because I don't have the PathPilot sources installed on either the virtual or real machine, they are on another virtual machine.
Further examination of my running linuxcnc.tcl revealed most of the variable assignments were to directories that don't exist, like
variable RTLIB_DIR /usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc
Obviously many of the assignments are not needed so I culled them down to minimum that allowed ADMIN HALSHOW to run, I ended up with
Further cutting gives really minimal linuxcnc.tcl that still runs (for me)
Not suggesting any of the above is "correct", just trying to understand a bit more.
Your modifications to linuxcnc.tcl didn't work for me because I don't have the PathPilot sources installed on either the virtual or real machine, they are on another virtual machine.
Further examination of my running linuxcnc.tcl revealed most of the variable assignments were to directories that don't exist, like
variable RTLIB_DIR /usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc
Obviously many of the assignments are not needed so I culled them down to minimum that allowed ADMIN HALSHOW to run, I ended up with
namespace eval linuxcnc {
variable BIN_DIR ""
variable TCL_LIB_DIR /usr/lib/tcltk/linuxcnc
variable LANG_DIR ""
variable _langinit 1
}
Further cutting gives really minimal linuxcnc.tcl that still runs (for me)
namespace eval linuxcnc {
variable TCL_LIB_DIR /usr/lib/tcltk/linuxcnc
}
# Arrange to load hal.so when the 'hal' command is requested
proc hal {args} {
load $::linuxcnc::TCL_LIB_DIR/hal.so
eval hal $args
}
Not suggesting any of the above is "correct", just trying to understand a bit more.
Please Log in or Create an account to join the conversation.
Time to create page: 0.063 seconds