Hello!

In my attempts to reduce operators' errors due to leaving machine in
joint mode after homing all joints, I am trying to create a button in
Axis GUI that would switch to world mode. I am trying to add it right
next to "Home axis" and "Touch off" buttons in "Manual Control" tab to
make it as convenient as possible - press "Home All" and then "World
mode".
The reason for this is that I am getting sick of customer complaining
about "why are there those 2 modes and why can't it switch them
automatically then, none of our existing machines has such a
weirdness". There are hundreds of employees for that client and I have
no idea, how many of them have to work with that machine (they are
constantly rotating from one task to another), I suspect that it is
more than 10, but I have no way to check and they would not tell me.
There is a small instruction attached to machine about the basic steps
to get it going (including a sentence in bold of _mandatory_ switching
to world mode after homing all joints), but apparently they do not
seem very eager to read it and they keep ignoring my reminders about
the purpose of that instruction.
I tried classicladder for automatic switching to world mode after all
joints are homed. I can get the logics correct and it actually works
correctly. But the thing is that it is all fine until LinuxCNC
finishes running a g-code file - Axis GUI will set it to maual/joint
mode as Axis GUI was never told to be in teleop mode - neither Shift+4
nor View -> World mode was pressed and there is no HAL pin that I
could trigger from classicladder for this purpose...
I am blaming Axis GUI, because, when classicladder triggers
halui.mode.teleop pin, joint numbers in DRO and on Manual Control tab
switch over to axis letters, and machine behaves correctly -
kinematics are applied etc, but when I open "View" menu, I see that of
those 2 radiobuttons at very bottom - "Joint mode" and "World mode",
the bullet is still next to "Joint mode". So after running a g-code
file is finished, it switches from "auto" to "manual" mode, but
remains in "joint" mode", just as the bullet next to "Joint mode" mode
tells it to do.

So I copied both axis and axis.tcl files in their respective
directories, renamed them to cnc and cnc.tcl respectively, set the INI
file to use cnc for DISPLAY and started playing with them in "monkey
see, monkey do" manner - trying to copy the code that creates existing
buttons and rename appropriate parts. I gave a name of "world" to that
button and kept it in the same $_tabs_manual.jogf.zerohome frame,
where "Home axis" and "Touch-off" buttons already reside.

The thing is that I am receiving this error startup of LinuxCNC:

Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/share/linuxcnc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.5
LINUXCNC - 2.5.1-33-g03be66a
Machine configuration directory is '/home/vie/linuxcnc/configs/sim/axis'
Machine configuration file is 'cnc.ini'
INIFILE=/home/vie/linuxcnc/configs/sim/axis/cnc.ini
PARAMETER_FILE=sim.var
TASK=milltask
HALUI=halui
DISPLAY=cnc
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
Starting TASK program: milltask
Starting DISPLAY program: cnc
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=736
Killing task milltask, PID=773
ERROR CLASSICLADDER-   Error intializing classicladder user module.
creating ladder-state
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done

Debug file information:
Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Can not find -sec EMC -var NML_FILE -num 1
GANTRYKINS: joints[0] = 0
GANTRYKINS: joints[1] = 1
GANTRYKINS: joints[2] = 2
GANTRYKINS: joints[3] = 3
GANTRYKINS: joints[4] = 4
GANTRYKINS: joints[5] = 5
GANTRYKINS: joints[6] = -1
GANTRYKINS: joints[7] = -1
GANTRYKINS: joints[8] = -1
Traceback (most recent call last):
  File "/usr/bin/cnc", line 2864, in <module>
    root_window.tk.call("setup_widget_accel", widgets.worldmode,
_("World mode"))
_tkinter.TclError: invalid command name
".pane.top.tabs.fmanual.jogf.zerohome.world"
736
  PID TTY      STAT   TIME COMMAND
773
  PID TTY      STAT   TIME COMMAND
Stopping realtime threads
Unloading hal components


I suspect that this is the crucial line:
_tkinter.TclError: invalid command name
".pane.top.tabs.fmanual.jogf.zerohome.world"

What is puzzling me is where does "fmanual" part of that string come
from? Searching both usr/bin/axis and usr/share/axis/tcl/axis.tcl do
not show such a word, so I am out of any ideas, where to look.

I would appreciate any pointer to the cause of this childish mistake
that I am making here.

-- 
Viesturs

If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to