- Posts: 4819
- Thank you received: 0
Fanuc-Style Toolchange
2 years 1 month ago #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?
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?
Attachment not found
Please Log in to join the conversation.
- Jakemestre1
- Offline
- Junior Member
-
Less
More
- Posts: 25
- Thank you received: 0
2 years 1 month ago #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.
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.
Please Log in to join the conversation.
1 year 4 months ago #330556
by endian
Replied by endian on topic Fanuc-Style Toolchange
Hello gentelmen,
how is it with the manual tool change...
I have sometime issue with precision after tool change +-0.01mm with OWT grinded tool post fixtures with manual toolchange .hal stuff.. I noticed that in the default tool table for lathe is not the waer offsets .. I can switch on them by
where I can define them for the each tool separately
And then add the the remapping ?
Then I will need to change T1 G43 to T01XX in the postprocessor I think ..
Thanks,
Regards
how is it with the manual tool change...
I have sometime issue with precision after tool change +-0.01mm with OWT grinded tool post fixtures with manual toolchange .hal stuff.. I noticed that in the default tool table for lathe is not the waer offsets .. I can switch on them by
Code:
LATHE_WEAR_OFFSETS = 1
where I can define them for the each tool separately
And then add the the remapping ?
Then I will need to change T1 G43 to T01XX in the postprocessor I think ..
Thanks,
Regards
Please Log in to join the conversation.
1 year 4 months ago #330568
by Aciera
Replied by Aciera on topic Fanuc-Style Toolchange
You don't really need the expanded tool editor for this:
Have a look at the sim config:
configs/sim/axis/lathe-fanucy
Attachment not found
Have a look at the sim config:
configs/sim/axis/lathe-fanucy
Please Log in to join the conversation.
1 year 4 months ago #330753
by endian
Replied by endian on topic Fanuc-Style Toolchange
okay thanks ...
If I want to fanuc style tool offsets .. I will do remap
change tool table
then allow the wear offsets
all other files have to be in the same folder too?
I want to move from 2.8.4 to 2.9.4 and I am searching for updates which should improve my life
thanks
If I want to fanuc style tool offsets .. I will do remap
Code:
[RS274NGC]
SUBROUTINE_PATH = ./:../
REMAP = T prolog=get_T_number ngc=toolchange
PARAMETER_FILE = sim-lathe.var
Code:
[EMCIO]
TOOL_TABLE = lathe-fanucy.tbl
Code:
# for details see nc_files/subroutines/maco_instructions.txt
[DISPLAY]
LATHE = 1
BACK_TOOL_LATHE = 0
LATHE_WEAR_OFFSETS = TRUE
all other files have to be in the same folder too?
I want to move from 2.8.4 to 2.9.4 and I am searching for updates which should improve my life
thanks
Please Log in to join the conversation.
1 year 4 months ago #330757
by Aciera
Replied by Aciera on topic Fanuc-Style Toolchange
usually you would have the files in your config folder but the main thing is that they can be found where the file paths in the ini file point to, so don't forget to add the [PYTHON] section and contents to your ini file and set the appropriate paths.
See the sim configs for how to set things up.
See the sim configs for how to set things up.
Please Log in to join the conversation.
Time to create page: 0.410 seconds
