Fanuc-Style Toolchange

More
22 Sep 2024 13:30 - 22 Sep 2024 13:33 #310599 by Aciera
Replied by Aciera on topic Fanuc-Style Toolchange
1. regarding documentation:
linuxcnc.org/docs/devel/html/remap/remap.html

2. I'm afraid that error message is somewhat out if my depth.

3. Question: Before we started modifying 'index_lathe_tool_with_wear' did the adding of wear tool offsets work for you but just the physical toolchange on the lathe did not work?

4. I've had a play around with 'index_lathe_tool_with_wear ' as remap for T on my simulation PC and I've noticed that the wear offset would only be added to the tool offset for a moment and then revert back to the pure tool offset. Do you get this as well?

 
Attachments:
Last edit: 22 Sep 2024 13:33 by Aciera.

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

More
27 Sep 2024 17:04 #310907 by Jakemestre1
Replied by Jakemestre1 on topic Fanuc-Style Toolchange
I Solved it! Holy cow! it was crazy simple.  So here's the lowdown of what needed to happen.  The ngc in the remap had to be lowercase.  That's it.  I had no idea that you couldn't use an upper case ngc name when remapping.  Is this a bug or it's supposed to be that way?  Goodness that would have saved me about a year of challenge. 

I believe Andy has a more elegant solution using pure python as: index_lathe_tool_with_wear but I can't write in python so I was in too deep.  
So here's my road to success with T.   Paths and directories are very important and you need to pay attention to where your python and subroutine code lives (mine is home/jake/linuxcnc/python, and ./) respectively.
Since I had already put together a M6 remap it got pretty tricky with what to do.  I kept thinking that remapping with the fanucy lathe example was creating a circular loop but it wasn't. 
My turret has a closed loop stepper with fault output an air cylinder to lock/unlock the turret, an index, and a inductive sensor to see if the hirth joint is locked.  With that my m6 remap ngc just goes through and rotates the stepper motor as joint 2/axis A and I scaled everything so that one tool pocket is equal to one unit on A. ex: T0=A0 T1=A1.0 T4=A4.0  It has an exit if the stepper is faulted for whatever reason, or the turret hirth fails to lock.  The downside to using this method and not a carosel component is that g30 causes the A axis to want to go home so use G28 instead. In the end I leave the remapped M6 alone.
Next up was making sure the remap.py in the python directory had the remap.py with has an added"get_t_number" from the fanucy_lathe example config. 
Also make sure you've got stdglue.py and toplevel.py in that same directory.  
Modify your ini file to remap T using the prolog=get_t_number and then this is where I made the fatal mistake I named an ngc Ttotool.ngc
(I always got this weird error "file not open" with that name)  the name ended up ttotool.ngc and it worked perfectly.
Next make sure you copy the toolchange.ngc that's called out in the lathe_fanucy example remap T but rename it with the exact subroutine you plan on having in your subroutine directory.  MAKE SURE IT IS ALL LOWERCASE. 
Remapped T should theoretically work after you complete these steps.  If you get issues with python crashes, just go through the remap linuxcnc.org/docs/devel/html/remap/remap.html and reimport the python directories and try again editinging with the lathe_fanucy python changes.  
Good luck. 
The following user(s) said Thank You: Aciera

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

Time to create page: 0.088 seconds
Powered by Kunena Forum