Tool Changer

More
20 May 2011 21:19 - 22 Oct 2012 11:49 #9956 by BigJohnT
Tool Changer was created by BigJohnT
On my Hardinge CHNC I have an 8 station tool turret. I was always fumbling around to spin the turret to put a tool in or change an insert when it hit me I needed some buttons on my pyvcp panel to do that for me. The advantage is on click tool changes and I don't have to leave the manual screen.

The XML to create the buttons
<pyvcp>
<labelframe text="Tool Changer">
<font>("Helvetica",16)</font>
    <hbox>
      <button>
      <halpin>"tool-1"</halpin>
      <text>"T1"</text>
      <bd>3</bd>
      </button>
      <button>
      <halpin>"tool-2"</halpin>
      <text>"T2"</text>
      <bd>3</bd>
      </button>
      <button>
      <halpin>"tool-3"</halpin>
      <text>"T3"</text>
      <bd>3</bd>
      </button>
      <button>
      <halpin>"tool-4"</halpin>
      <text>"T4"</text>
      <bd>3</bd>
      </button>
    </hbox>

    <hbox>
      <button>
      <halpin>"tool-5"</halpin>
      <text>"T5"</text>
      <bd>3</bd>
      </button>
      <button>
      <halpin>"tool-6"</halpin>
      <text>"T6"</text>
      <bd>3</bd>
      </button>
      <button>
      <halpin>"tool-7"</halpin>
      <text>"T7"</text>
      <bd>3</bd>
      </button>
      <button>
      <halpin>"tool-8"</halpin>
      <text>"T8"</text>
      <bd>3</bd>
      </button>
    </hbox>
  </labelframe>
<pyvcp>

The Post GUI hal file entries
# MDI Commands
net tool-1 halui.mdi-command-00 <= pyvcp.tool-1
net tool-2 halui.mdi-command-01 <= pyvcp.tool-2
net tool-3 halui.mdi-command-02 <= pyvcp.tool-3
net tool-4 halui.mdi-command-03 <= pyvcp.tool-4
net tool-5 halui.mdi-command-04 <= pyvcp.tool-5
net tool-6 halui.mdi-command-05 <= pyvcp.tool-6
net tool-7 halui.mdi-command-06 <= pyvcp.tool-7
net tool-8 halui.mdi-command-07 <= pyvcp.tool-8

The ini file entries (if you don't have the HALUI section just add it)
[HALUI]
# MDI commands
MDI_COMMAND = T1 M6 G43
MDI_COMMAND = T2 M6 G43
MDI_COMMAND = T3 M6 G43
MDI_COMMAND = T4 M6 G43
MDI_COMMAND = T5 M6 G43
MDI_COMMAND = T6 M6 G43
MDI_COMMAND = T7 M6 G43
MDI_COMMAND = T8 M6 G43

The Screen Shot of the buttons.

John
Attachments:
Last edit: 22 Oct 2012 11:49 by BigJohnT.

Please Log in or Create an account to join the conversation.

More
24 May 2011 20:08 #10034 by andypugh
Replied by andypugh on topic Tool Changer
Looks familiar. :-)

I have very similar buttons on my lathe config.

Please Log in or Create an account to join the conversation.

More
30 Jan 2012 20:58 - 30 Jan 2012 21:24 #17281 by submicro
Replied by submicro on topic Tool Changer
Forgive the newbie questions but where does the xml go? Does it go in the .stepconf file? What I really want is to figure out the joypad one but i'm starting small..

Submicro

I thought I figured it out but I cannot get it to work I copied the xml portion to my custompanel.xml file but it causes a fatal error.
Last edit: 30 Jan 2012 21:24 by submicro.

Please Log in or Create an account to join the conversation.

More
30 Jan 2012 21:09 - 31 Jan 2012 01:44 #17282 by submicro
Replied by submicro on topic Tool Changer
Sorry I reread the integrators manual and I figured out what I was doing wrong. I know I know RTFM!
I get in a hurry sometimes thanks anyway :-)
SubMicro
Last edit: 31 Jan 2012 01:44 by submicro.

Please Log in or Create an account to join the conversation.

More
20 Oct 2012 15:32 #25485 by tkamsker
Replied by tkamsker on topic Tool Changer
Hi
I am quite sucessful (due to the forum ;)-
With the toolchanger
But i followed your example to automate the 12 Buttons ,..
When it starts i can see the buttons but then i get an error
it tells me that the command is not valid "net too1-1 halui.mdi-command-00 <= pyvcp.tool-1"

is it possible that something between 2.4 and 2.5 has changed ? Due to another thread i was under the impression that 2.5 will eliminate the need of the o<ww> call command after Tx M6
but thats another story ;)
So if anybody has an hint for me it would be nice
thx
thomas :S

Please Log in or Create an account to join the conversation.

More
20 Oct 2012 17:10 #25492 by andypugh
Replied by andypugh on topic Tool Changer
tkamsker wrote:

When it starts i can see the buttons but then i get an error
it tells me that the command is not valid "net too1-1 halui.mdi-command-00 <= pyvcp.tool-1"

What are the exact words?
My guess is that you don't have the MDI commands defined in the INI file.

Due to another thread i was under the impression that 2.5 will eliminate the need of the o<ww> call command after Tx M6
but thats another story ;)

That's "remapping" and isn't due until 2.6 (2.5.1 is the current released version)

Please Log in or Create an account to join the conversation.

More
20 Oct 2012 22:05 #25509 by BigJohnT
Replied by BigJohnT on topic Tool Changer
Yuck, did I actually call that signal too1-1 or is it a typo for tool-1?

John

Please Log in or Create an account to join the conversation.

More
21 Oct 2012 12:58 #25540 by tkamsker
Replied by tkamsker on topic Tool Changer
Hi,
oh my bad ,...
sorry it seems standing freehand at the machine (no internet there ) i made an typo

But i corrected it and now it should be exact as your example ,..

But linuxcnc is still not happy unknown command ? (so i milled the pcbs "manually" using the atc ... so the scripts and rest setup works fine.

Error Reads like this
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/realtime-2.6.32-122-rtai/modules/linuxcnc
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
Machine configuration directory is '/home/tkamsker/linuxcnc/configs/Heiz400T-3WZW'
Machine configuration file is 'Heiz400T-3WZW.ini'
INIFILE=/home/tkamsker/linuxcnc/configs/Heiz400T-3WZW/Heiz400T-3WZW.ini
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=halui
DISPLAY=axis
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: axis
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=1834
Killing task milltask, PID=1881
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
custom_postgui.hal:4: Unknown command 'net tool-1 halui.mdi-command-00 <= pyvcp.tool-1'
1834
PID TTY STAT TIME COMMAND
1881
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components

Kernel message information:
[ 667.102407] I-pipe: Domain RTAI registered.
[ 667.102420] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[ 667.102423] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[ 667.102432] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 667.102435] PIPELINE layers:
[ 667.102439] f9165e20 9ac15d93 RTAI 200
[ 667.102443] c085cb20 0 Linux 100
[ 667.131743] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 667.131959] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 667.131967] RTAI[sched]: hard timer type/freq = APIC/8311960(Hz); default timing: periodic; linear timed lists.
[ 667.131971] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 2925916000 hz.
[ 667.131975] RTAI[sched]: timer setup = 999 ns, resched latency = 2944 ns.
[ 667.132168] RTAI[usi]: enabled.
[ 667.263218] RTAI[math]: loaded.
[ 667.373495] config string '0x378 out '
[ 673.272798] RTAI[math]: unloaded.
[ 673.372537] SCHED releases registered named ALIEN RTGLBH
[ 673.389231] RTAI[malloc]: unloaded.
[ 673.488040] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 673.493095] I-pipe: Domain RTAI unregistered.
[ 673.493108] RTAI[hal]: unmounted.


So any hint would be nice or an link to an how to
thx in advance
thomas
Ps: I do have a working pendant using arduino ,... so if someone is interested ,.. (it is work in progress )

Please Log in or Create an account to join the conversation.

More
21 Oct 2012 14:33 #25545 by ArcEye
Replied by ArcEye on topic Tool Changer
Andy Pugh wrote:

My guess is that you don't have the MDI commands defined in the INI file.


or you don't have the .xml file in your .ini file under
[DISPLAY]
PYVCP = custom_postgui.xml

You are trying to link 2 things, so one or both of them must be missing

regards

Please Log in or Create an account to join the conversation.

More
21 Oct 2012 15:26 #25551 by BigJohnT
Replied by BigJohnT on topic Tool Changer
That was my typo and copy and paste error not yours.

John

Please Log in or Create an account to join the conversation.

Time to create page: 0.105 seconds
Powered by Kunena Forum