585,877 active members*
3,573 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Fanuc > ATC weirdness on a 6MB. Maybe build a custom toolchange macro workaround?
Results 1 to 14 of 14
  1. #1
    Join Date
    Feb 2006
    Posts
    58

    ATC weirdness on a 6MB. Maybe build a custom toolchange macro workaround?

    I've been restoring a bed mill from 1981, and on advise from this forum I kept the Fanuc 6MB control (vs a retrofit). I took everything apart, cleaned it, replaced all of the bearings and everything is back together.

    I was tracking down a weird toolchange issue with the original machine builder (Very helpful guys over there in Shizuoka, Japan), but since the machine is so old they did not keep more than the bare minimum of documentation. I have the Machine manual, the Fanuc maintenance and operator's manual, but no wiring manual.

    So here are the details that lead to my question (at the end): (and I'm probably totally wrong in what I'm trying to do, so feel free to taunt me)

    The machine is a Shiuoka B-3V bed mill with a 20 tool carousel and a pneumatically driven single swing-arm changer.

    This unit does not use a PLC for tool change as far as I can see, nor does it have the PC A or B boards (which I am told are the fanuc onboard PLC).

    The toolchanger operates when commanded, but not intuitively.

    T01 will rotate the carousel one position CW
    T11 will rotate the carousel one position CCW
    T02 will rotate the carousel two positions CW
    T12 will rotate the carousel two positions CCW
    and so on except
    T10 will rotate the carousel 10 positions CCW.
    T00 does not rotate the carousel.

    Combining the codes with an M06, e.g.

    Txx M06 will take the tool from the spindle and insert it into the current tool pod, rotate the carousel in the pattern described above, then take the tool from the new pod, and put it into the spindle.

    The machine builder is certain that T codes should behave as expected (T06 calling tool 6)

    My hope is that I can build a tool change macro that still calls T codes... (I know nothing about this, but here's my thoughts)

    According to the maintenance manual, the 6MB has a parameter (p306 bit 1), called TMCR, for defining a custom macro called by T code.

    Code:
    TMCR 1: Custom macro is called by T code. (O9000)
         0: No custome macro is called by T code.
    So my question is:

    If T codes work as stated above, can I define a custom macro that calls the original T code?

    And more of a DIY question, what documentation do machine builders have? For example if I was building a new machine and wanted to use Fanuc controls, do they have manuals that go deeper into the control than the maintenance manual?

  2. #2
    Join Date
    Feb 2009
    Posts
    6028
    being a side mount ATC, you sure its not a random style ATC? Pot may not correspond to tool number.

    Sent from my Quantum using Tapatalk

  3. #3
    Join Date
    Feb 2006
    Posts
    58
    I'm pretty sure its not random style because this uses a single swing arm.

    On a commanded tool change, it always takes the current tool in the spindle, inserts it into current pod, then indexes to an offset grabs it and puts it in the spindle.

  4. #4
    Join Date
    Jan 2005
    Posts
    16
    Hi guys,
    please anyone help how to set tools in a random access tool changer on fadal fanuc 18i control.when tool change it is putting in diffrent pocket and very hard to locate tools.thank you.my email id- [email protected]
    Guna

  5. #5
    Join Date
    Mar 2005
    Posts
    816
    There's plentiful of sample of M6 macros for the ATC on here that could be modified to work.

    Macro programming isnt that hard but it can be done.

    Theres good books on the subjet.

    My particular macros I use on that are sort of a mix match of that I found on here.

  6. #6
    Join Date
    Feb 2006
    Posts
    58
    Hey gbowne1! I saw your Fanuc 6MB restore thread, how is that going?

    So that sort of leads me to another question...

    On this machine, I had the factory parameter sheet and I restored everything to factory defaults (the previous owner had played quite a bit with settings)...
    The problem is that the factory sheet did not have any parameters past 160 or so... In conversations with the machine builder, we got everything going, but
    I'm not sure how to tell what Macro modes are supported (either A or B) given the ROMs on my card.

    A blurry picture of the overall card



    And a closer pic which is legible



    (AFAICT this is running 901 Revision 12)

    Also assuming that I have Macro B (or can upgrade to it somehow)

    I figured I'd be able to set Parameter 306 bit 1 (Custom macro called by T code, stored in O9000)

    Then do something like the following? (Assuming #500 is the persistent variable I set for the current tool)

    Code:
    O9000
    #1=#4120-#500 (Commanded tool minus current tool)
    #2=ABS[#1]
    IF[#1 LT 0] THEN #1=#2+10 (if the value is negative go the other way)
    T#2
    #500=#4120
    %
    if something like this works, I can write a longer fancier one that handles more than 10 tools by flipping the direction one more time.

  7. #7
    Join Date
    Mar 2005
    Posts
    816
    You can add as many parameters as you see fit.

    My machines since they are all custom, have a pretty extensive parameter file. I wanted to make sure the was enough data to run it. The hard part was the ball screw data.

    The only surefire way to know what Macro type is enabled is to write and run a test macro. If it doesnt output what is expected then its not enabled.

  8. #8
    Join Date
    Feb 2006
    Posts
    58
    Did you end up having to source the ROMs for Macro B in your build?

    See, when the parameters were restored, I did not have any of the 300 option parameters that shipped with this machine.
    I left the 2 Macro A/B bits off and was hoping someone could tell me by visually looking at the ROM chips whether either Macro A or B was installed originally.

    Actually, if anybody knows what the 300 series parameters are, that'd be helpful. I've only pieced together a few values (Macro A = 300 bit 0, Macro B = 300 bit 1)


    Quote Originally Posted by gbowne1 View Post
    You can add as many parameters as you see fit.

    My machines since they are all custom, have a pretty extensive parameter file. I wanted to make sure the was enough data to run it. The hard part was the ball screw data.

    The only surefire way to know what Macro type is enabled is to write and run a test macro. If it doesnt output what is expected then its not enabled.

  9. #9
    Join Date
    Mar 2005
    Posts
    816
    Option parameters aren't really all that secret anymore. Some people have pieced together a listing.

    Perhaps someone will email the spreadsheet.

    It's floating around the net. Theres actually a couple lists around.

    Someone spent time recording each option parameter bit turning them on to see what they do.

    My system has just about every option that I would conceivably ever use.

    I recall hearing that FANUC kept lists of what options were sold to the OEM / MTB when the control was shipping from FANUC. You might inquire with them to see if they have records.

    Then it would be a matter of just entering them once they be known.

    Make sure all your data tables are set right.

    I had a person help me with the ladders, I/O and sorting cables as well as development of the parameters, tables, etc. The hard part was entering all the data on the ball screws. Lose that part of the data and your screwed. Timers and Keeprelays are easy once you know how they're structured.
    Diagnosis stuff too.

    I've seen on here at least no less than a dozen different toolchanger macros so one of thode could work with some mods.

    Ive built a dozen different control's over the past 10 years. I'm looking forward to finishing my 18i.

    Your option 300s may have been on another sheet you didn't get.

    The only other thing I can say is try finding another machine like yours to steal the missing parameters from. eBay is a good place to find this data but theres always Google search of your model and make of machine.
    Maybe someone out there is willing to give out their options.

  10. #10
    Join Date
    Feb 2006
    Posts
    58
    Yeah, I was just curious about the other options, I don't think I need any other options besides custom macros on this machine as it has everything I care about.

    Mainly, I'm hoping someone can tell me if I have the right roms or which roms I would actually need if I don't have the right ones.

    I tried Fanuc, but because it was Fanuc Japan and sold to Tokyo Yamazen, they didn't have anything about it... Even my official fanuc cert is all gibberish.


  11. #11
    Join Date
    Feb 2006
    Posts
    58
    Based on a PM I received, I flipped the bit and... somewhat anti-climatically... Macro B works just peachy!
    Also enabled parameter 308 bit 6 (MSFT) which lets me use ABS/INC as Shift in EDIT mode.

    I've gathered a bunch of examples of toolchange code, but haven't found one that is trying to do what I hope to do
    I'm wishing Macro B had a modulus function at the moment...

  12. #12
    Join Date
    Feb 2006
    Posts
    58
    Half the challenge I think is dealing with the weird tool selection behavior by the Shizuoka PLC.



    The image above shows the relationship table I used to make the following macro.


    Code:
    %
    :9000
    #1=#4120 (STORE COMMANDED TOOL VALUE)
    #2=#530 (PERSISTENT VARIABLE STORING CURRENT TOOL VALUE)
    
    IF[#2NE0]GOTO10
    	#3000=11 (CURRENT TOOL, MACVAL 530 UNSET)
    N0010
    
    IF[#1EQ0]GOTO9999 (T0, NONEXISTENT TOOL FOR OUR PURPOSES)
    
    IF[#1EQ#2]GOTO9999 (IDENTITY)
    
    IF[#1LT#2]GOTO3333
    	(CASE, NEW COMMANDED TOOL GREATER THAN CURRENT TOOL)
    	#3=#1-#2
    
    	IF[#3LE10]GOTO2222
    		(CASE, OFFSET GREATER THAN 10)
    		#3=[[20-#1]+#2]+10
    		(cCW BY OFFSET)
    		GOTO9999
    	N2222
    		(CASE, OFFSET LESS THAN OR EQUAL TO 10)
    		(CW BY OFFSET)
    		GOTO9999
    N3333
    	(CASE, NEW COMMANDED TOOL LESS THAN CURRENT TOOL)
    	#3=#2-#1
    
    	IF[#3LT10]GOTO5555
    		(CASE, OFFSET GREATER THAN 10)
    		#3=[[20-#2]+#1]
    		(CW BY OFFSET)
    		GOTO9999
    	N5555
    		(CASE, OFFSET LESS THAN OR EQUAL TO 10)
    		(cCW BY OFFSET)
    		#3=#3+10
    N9999
    T#3
    #530=#1
    M99
    %

  13. #13
    Join Date
    Mar 2005
    Posts
    816
    Yeah thats strangeness!!

    How would you get to 3, 4 and 8, 9, 14, 18, 19, 20

    At least you got the Cert.

    Option parameters can be really helpful if you pick out the right set.

    My PLC choice was one of the FANUC 90 series. Got it at a good price. Runs the toolchanger and support equipment.

  14. #14
    Join Date
    Feb 2006
    Posts
    58
    Solved!!!

    In the end, this is the live code that I ended up going with. You can replace #130 with #530 if you want your carousel position to be persistent across machine restarts.

    Code:
    % 
    :9000
    #1=#4120 
    #2=#148
    IF[#2NE0]GOTO1111
    #3000=11 (CAR. POS NOT DEFINED IN 130)
    N1111
    IF[#1EQ0]GOTO9999
    IF[#1EQ#2]GOTO9999 
    IF[#1LT#2]GOTO3333 
    #3=[#1-#2] 
    IF[#3LE10]GOTO9999 
    #3=[[20-#1]+#2]+10 
    GOTO9999 
    N3333
    #3=[#2-#1] 
    IF[#3LT10]GOTO5555 
    #3=[[20-#2]+#1]
    GOTO9999 
    N5555
    #3=[#3+10] 
    N9999
    T#3
    #148=#1
    M99
    %

Similar Threads

  1. Replies: 2
    Last Post: 12-19-2012, 01:28 PM
  2. Leadwell MCV-550 toolchange macro
    By gbowne1 in forum Fanuc
    Replies: 5
    Last Post: 02-19-2012, 11:00 PM
  3. Replies: 3
    Last Post: 02-13-2012, 07:20 PM
  4. Toolchange macro/sub for OSP5000L
    By nlh in forum Okuma
    Replies: 7
    Last Post: 10-02-2010, 11:31 AM
  5. KIWA excel 510 toolchange macro help
    By bensoli in forum Uncategorised MetalWorking Machines
    Replies: 0
    Last Post: 12-29-2009, 06:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •