Results 1 to 5 of 5

Thread: M119 Spindle Orientation?

  1. #1
    Registered
    Join Date
    Jan 2010
    Location
    USA
    Posts
    23
    Downloads
    0
    Uploads
    0

    Default M119 Spindle Orientation?

    We have some pallet tools, and need the spindle to orientate to 90 degrees as opposed to M19 spindle at 0 degrees. I tried giving the machine an
    M119A90. but that acts just like a M19... anyone have any experience being able to orientate the spindle to any position needed? Thanks.

    Similar Threads:


  2. #2
    Registered
    Join Date
    Feb 2006
    Location
    United States
    Posts
    305
    Downloads
    0
    Uploads
    0

    Default

    For our FA400's we got this macro from toyoda. Note the red section, and #7 needs to be set with the value for 4077 from each machine it is used on.

    There are risks for using this, but we have not had any issues. We use the standard M19 with this so it ALWAYS sets 4077 each use instead of only when M119 is used. This makes sure it is correct when doing tool changes.

    Code:
    O9025(1 DEG SPINDLE ORIENT MACRO) 
    (SET PARA #6085 = 19)
    (K.S. 2-11-03) 
     
    (TO USE PROGRAM M19 A-- S--) 
    (VACANT A=0) 
    (VACANT S=0) 
     
    (CHECK A ARGUMENT, #1) 
    (MUST BE A VALUE BETWEEN 0 AND 359)
    IF[#1EQ#0]THEN#1=0.
    IF[#1EQ360.]THEN#1=0.
    IF[#1GT359.]GOTO998
    IF[#1LT0.]GOTO999
     
    (CHECK S ARGUMENT) 
    (CANNOT BE LT 7 OR GT 118) 
    IF[#19EQ#0]GOTO500 
     
    IF[#19LT7.]GOTO996 
    IF[#19GT118.]GOTO997 
    GOTO501
    N500#19=0. 
    N501 
     
    (SET STANDARD ORIENTATION POSITION)
    (THIS IS THE VALUE FOR 0 DEGREES  )
    (********************************)
    (#2 IS A SAFTY CHECK)
    (SET #2=7.0 AFTER #7 IS SET FOR MACHINE)
    #2=0.
    IF[#2NE7.0] THEN GOTO 995 
    #7=2540.(ZERO POSITION - STD VAL)
    (OF PARAMETER 4077 W-DRIVE KEYS) 
    (ALIGNED FOR ATC)
    (********************************) 
    (MUST BE ENTERED PER MACHINE)
    (********************************) 
    #8=[4096./360.](PULSES PER DEGREE )
    #12=[[#1*#8]+#7](NEW 4077 VAL  ) 
    #12=ROUND[#12] 
    M20
    (#12=FIX[#12]) 
     
    (SET ORNT SPEED) 
    (SET ORIENTATION POS TO #12 DEG) 
    #620=0 (FLAG FOR NON-ZERO ORIENTATION)
    G10L50(PARAMETER SET MODE) 
    N4038P1R#19(SET ORNT SPEED)
    N4077P1R#12(SET 4077 TO #12DEG)
    G11(END SETTING MODE)
    M20
     
    M5 
    G4X1.
    M20
     
    M19(ORIENT TO #12 POSITION)
     
     
    M20
    (SET ORIENT POSITION BACK) 
    (TO DEFAULT VALUE) 
    G10L50 
    N4077P1R#7 
    G11
    M20
     
     
    M99
    
    N995 (PRM 4077 NOT SET TO #7)
    #3006=7(SET #7= PRM 4077 AND #2=7.0)
    M19
    M99
    
    N996#3000=1(M19 S IS LESS THAN 7)
    N997#3000=2(M19 S IS GREATER THAN 118) 
    N998#3000=3(M19 A IS GREATER THAN 359) 
    N999#3000=4(M19 A IS LESS THAN 0)


    Last edited by dpuch; 08-12-2011 at 12:39 AM. Reason: Missed the error codes section of g-code


  3. #3
    Registered
    Join Date
    Aug 2011
    Location
    USA
    Posts
    48
    Downloads
    0
    Uploads
    0

    Default

    Does Toyoda have a version of this macro that will work with the newer 31 or 32 control?

    This one worked fine on our 18, but throws an illegal address alarm on our 31i.



  4. #4
    Registered
    Join Date
    Feb 2006
    Location
    United States
    Posts
    305
    Downloads
    0
    Uploads
    0

    Default

    I don't know, but there really is only a few parameters it could have a problem with.
    - It uses #1-#33 for internal variables, these should not be an issue.
    - #620 is used to remember the current orientation number is not standard IE. tool change orientation. Do you have the option for macro variables 600-699? This can be changed to any 500+ unused variable... Oh, that was one I added coupled with a change in our M6 macro to only reset orientation if not already set for a tool change. I should have included this with the macro. See the code below.
    - System variables: 4038 and 4077 make sure these are the same on the 31 and 32 controls!
    N4038P1R#19(SET ORNT SPEED)
    N4077P1R#12(SET 4077 TO #12DEG)


    M6 macro code at the beginning of the macro to assure correct M19 rotation for the tool change after using the macro.
    Code:
    M20
    IF [#620EQ1.0] GOTO 9
    M20
    G4X1.0
    M3 S100
    #620=1.0
    
    N0009




  5. #5
    Registered
    Join Date
    Nov 2007
    Location
    Canada and Nothern ireland
    Posts
    132
    Downloads
    0
    Uploads
    0

    Default

    Most fanuc controls use M19 for spindle oreintation by parameter 4077 ---M119 and then maybe the next three are set postions from it
    They are usually set as D postion values in you data screen ---------Go into system screen and move to the screen where the counter/data/keep relays are ---the Data values is where the 2nd/3rd and 4th position is placed
    First make sure the m code is valid and if it is you need to find the d value to adjust it



Posting Permissions

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


About CNCzone.com

    We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

Follow us on

Facebook Dribbble RSS Feed