On 4/1/14 11:51 , Billy Huddleston wrote:
> OKay, some discussion going around on the thread about using Python.. I gave 
> up on that.. was too complicated.. I really wanted to use it though.. and no 
> clear documentation no how
> to read AND set pins...
>
> So, I'm now I'm back to using O-code -- and have a complete working script in 
> my simulator.
>
> So, my question is: How do you all normally handle the presence of a tool in 
> the spindle between reboots / linuxcnc restarts?  What about when it's time 
> to shutdown for the day?

On a "random toolchanger", such as a carousel, linuxcnc keeps track of 
the location of each tool, including the one in the spindle.  This 
information is stored in the tool table file, where the spindle is 
represented as pocket 0.  The file is updated whenever you change tools, 
and is loaded on startup.  So when you start up linuxcnc, it remembers 
which tool you have in the spindle.


> Here is what I've done so far.  I have a button that we can press to home the 
> machine.  I set a global variable to let us know it's homed.  IF the system 
> is given a tool change
> command without homing, it auto homes first.  After the homing procedure is 
> complete, it checks for the presence of a tool, and then checks a persistent 
> variable to get the last
> known pocket. (presumably the pocket the current tool goes in) and then 
> rotates the carousel to that pocket.

To see if the machine is homed you can also check the axis.N.homed pins 
coming out of motion, see the motion(9) man page.  Checking those pins 
instead of your global variable might be more reliable because linuxcnc 
can un-home the axes in some situations (if the stepper amps lose power, 
for example).


> What other buttons do I need?  How's the best way to load the carousel?  It 
> has a loading window... but, I've seen some systems that allow you to load 
> using the spindle.. Maybe
> make a tool loading button that lets you put the tool into the spindle, touch 
> it off, and the loads it in the current carousel slot and update the tool 
> table with the tool offset.
> Can that be done? Can I ask the user questions like, What's the tool number 
> and the Diameter and Description via some sort of dialog?

I'm not sure about this part.

I've heard of carousel toolchanger machines where you add a tool to a 
pocket in the carousel by first loading the tool in the spindle, then 
exchanging it  with an empty carousel pocket.

I'm not sure how the new tool information (diameter, tlo, etc) is 
inserted into the tool table in that situation, though i'd assume it's 
by using the standard tool table editor (accessible from the File menu 
in the Axis GUI).


-- 
Sebastian Kuzminsky

------------------------------------------------------------------------------
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to