Emco 365MC with Siemens 840D User Cycle (How to)
Close
Login to Your Account
Likes Likes:  0
Results 1 to 1 of 1
  1. #1
    Join Date
    Dec 2018
    Country
    UNITED STATES
    State/Province
    Michigan
    Posts
    134
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    28

    Default Emco 365MC with Siemens 840D User Cycle (How to)

    I have spent a bunch of time learning and programming my (model year) 2000 Emco 365MC that has a Siemens 840D controller. I thought I would share some of the things I have learned so far.

    The Emco 365/Siemens 840D has a "Travel to fixed stop" (FXS) mode that allows you to reduce torque and push against a stop. It is probably most often used to push a tailstock (or live/dead center in the sub-spindle) into the end of a workpiece with a known force. But it can also be used as a probe.

    Below I create a user cycle for probing. This particular cycle (I called PROBE_PART) is one I can call in a program that sends my sub-spindle over to push on the end of a workpiece in order to probe it's Z coordinate. That way, I only need to roughly place stock in the chuck for a workpiece and the cycle sets my selected WCS Z position automatically and precisely.

    -------------------
    Disclaimer:

    These instructions may only apply to Siemens 840D controllers that are from around the year 2000, I have no newer or older controllers to verify them on. There are parameters and values in the files below that may only pertain to my machine. Careful knowledge and testing on your own machine is required before using the information contained herein. Use at your own risk!

    In order to create a user cycle you must put a subprogram (_SPF) in the User Cycle directory and modify a file called UC.COM in that same directory. In order to get to that directory in the user interface you first have to go into the Hamburger -> Startup menu and enter your machine's password. If you have the will to build a user cycle and to program your machine you probably already know this and know your machine's password. If not, you should contact your machine builder or control maker for instructions.
    -------------------

    To use my cycle I type "PROBE_PART()" into a program. I hit the "RECOMPILE" horizontal key (if RECOMPILE isn't showing you need to press the ">" key to see the rest of the menu). When I do that a window pops up with variables that the cycle needs. As you highlight each option a short description appears on the bottom of the screen.
    img_9923.jpg

    img_9925.jpg

    After you select OK it fills in the parameters as below. You can also just enter the values yourself rather than use RECOMPILE like so:
    PROBE_PART(1, 14.25, 0.0, 0.3, 6.327, 1.3, 6.3395)
    img_9926.jpg

    The cycle takes these parameters:

    1) WCS number where 0=none 1=G54, 2=G55, 3=G56, 4=G57. If you set 0 the routine returns without setting any WCS values. The values it finds for part location can be looked up in system arithmetic ("R") variables, R9 and R10 specifically.

    2) Machine coordinate for start of the probe. This should be near the end of the workpiece. The sub-spindle rapids to this location so you want it to be a bit off the end of the stock! On my machine if you were to enter a value less than 12.75 here the two spindles would crash, so I limit the value that can be entered in this filed to be greater than 12.75. You can still crash into the part though, so be careful here.

    3) The % Torque you will apply when looking for the stop. If too low the machine won't be able to move the axis, or it will trip prematurely. If too high you may push your workpiece back into the chuck. On my machine I have found 9% to be sweet spot for enough torque but not too much.

    4) The window (distance) in which the stop will be looked for. If you move beyond that distance the machine will throw an alarm saying it didn't find the stop. That means you have to be at least this close after your rapid move or you won't hit the part to trigger the probe.

    5) Sub-spindle chuck offset. This is the distance that the face of the sub-spindle jaws (or whatever you are pushing with) is from the zero location of the Z2 (sub-spindle) axis. This value is subtracted from the MCS of the part to set the WCS value.

    6) Minimum stick out. This value ensures that the reading you get is AT LEAST as long as you were expecting. If example, I have a part that has an operation very close the the chuck jaws. Min stick out guarantees that if I don't start with my stock at least x" out, the operation will fail so I don't cut my chuck jaws.

    7) Main chuck offset from MCS zero point. This is the MCS location of the face of your main spindle jaws

    Here is a quick (boring) video of the probe on the machine:
    YouTube

    Below I show that the Z offset in G56 is set after PROBE_PART is called.
    img_9929.jpg

    There is a file in the user cycle directory called UC.COM. This file contains the variables that will brought up in the user interface when your "Recompile" a user function. If you don't care about using the popup menu (and RECOMPILE) to enter variables you do not need to edit this file. The user cycle will still be available and work.

    Below is my user cycle and below that, at the bottom, is what I added to the UC.COM file. I won't go into the syntax of the UC.COM lines below. You can probably figure them out just by looking at them and what comes up on the input screen. If you have questions please ask.

    -Tom


    Here is the file I created in the User Cycles directory called PROBE_PART_SPF:

    =============================== PROBE_PART ==========================================
    ;%_N_PROBE_PART_SPF
    PROC PROBE_PART (REAL WCS_NUM, REAL STRT_PROB_Z2, REAL FXS_TRQ, REAL FXS_WNDW, REAL SUBSP_CHUCK, REAL MIN_STKOUT, REAL MAIN_CHUCK) SAVE

    DEF REAL SSCK, FXS_STATUS, MCS_Z2, TRAVELTO, STICK_OUT

    FXS[Z2]=0 ;FIXED STOP MODE OFF

    ;MSCK=6.3395 ;MAIN SPINDLE CHUCK/JAW THICKNESS/LOC.
    ;SSCK=6.3270 ;SUB SPINDLE CHUCK/JAW THICKNESS

    TRAVELTO = 0 - (FXS_WNDW + 0.100) ;TRAVEL BEYOND FXS WINDOW
    SSCK = SUBSP_CHUCK

    M2=26 ;CLOSE SUB SPINDLE CHUCK
    SPOS[1]=0
    SPOS[2]=30

    G0 G53 D0 Z2=STRT_PROB_Z2 ;MOVE SUB SPINDLE TO NEAR END OF PART

    COUPDEF(S2,S1,-1,1,"IPO","DV") ;COUPLING DEFINITION
    M1=103
    ;READ LOCKOUT UNTIL SPEED REACHED
    SPCON(1)
    SPCON(2)
    COUPON(S2,S1,0)

    G1 G94 G91 Z2=TRAVELTO F5 FXS[Z2]=1 FXST[Z2]=FXS_TRQ FXSW[Z2]=FXS_WNDW

    FXS_STATUS = $AA_FXS[Z2] ;GET FXS STATUS CODE

    IF FXS_STATUS == 1
    MCS_Z2=$AA_IM[Z2] ;GET Z2 MCS POSTION
    R9 = MCS_Z2 ;SET R9 TO LOCATION
    R10 = MCS_Z2 - SSCK ;SET R10 TO LOCATION WITH CHUCK OFFSET
    R11 = FXS_STATUS ;SAVE STATUS IN R11 FOR DEBUG
    STICK_OUT = R10 - MAIN_CHUCK
    MSG("PROBE SUCCESS - MCS LOC: "<<R9<<" WORK OFFSET: "<<R10)
    G4 F5
    IF STICK_OUT >= MIN_STKOUT
    IF WCS_NUM == 4
    $P_UIFR[4]=CTRANS(Z, R10)
    ELSE
    IF WCS_NUM == 3
    $P_UIFR[3]=CTRANS(Z, R10)
    ELSE
    IF WCS_NUM == 2
    $P_UIFR[2]=CTRANS(Z, R10)
    ELSE
    IF WCS_NUM == 1
    $P_UIFR[1]=CTRANS(Z, R10)
    ELSE
    IF WCS_NUM == 0
    MSG("PROBE SUCCESS, NO WCS SELECTED, MCS LOC. STORED IN R9")
    G4 F8
    ENDIF
    ENDIF
    ENDIF
    ENDIF
    ENDIF
    ELSE
    MSG("! MIN STICK-OUT FAIL ! EXTEND STOCK & RETRY. MEAS: "<<STICK_OUT)
    G4 F8
    ENDIF
    ELSE
    MSG("! PROBE FAILED, NOTHING SET! CODE: "<<FXS_STATUS)
    G4 F8
    ENDIF

    FXS[Z2]=0 ;FIXED STOP MODE OFF
    G90
    G53 G0 Z2=29.6110 D0 ;RETURN Z2 TO PARK LOC.

    COUPOF(S2,S1)
    SPCOF(1)
    SPCOF(2)

    M17
    ================================================== =======================


    Added this to the UC.COM file:
    ================================= UC.COM ========================================
    //C550(PROBE_PART)
    (I/*0 1 2 3 4/0/WCS 0=None 1=G54 2=G55...)[ WCS_NUM/WCSN]
    (R/12.75 29.9//Z2 MCS Start Location > 12.75!)[ Z2_STRT_PROB/Z2STR]
    (R/0 100.000/9.0/FXS Torque %)[ FXS_TRQ/TORQ]
    (R/0 9.9999/.25/FXS Window Value)[ FXS_WNDW/WNDW]
    (R/0 99.9999/6.3270/Subspindle Chuck Offset)[ SUBSP_CHUCK/SBCHK]
    (R/0 99.9999//Min Stock Stick-Out)[ MIN_STKOUT/MINSO]
    (R/0 99.9999/6.3395/Main Spindle Chuck Offset)[ MAIN_CHUCK/MNCHK]


Tags for this Thread

Bookmarks

Posting Permissions

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