585,758 active members*
4,316 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Fagor Automation > Anyone Have A Basic PLC Program For a F8025MSI (Mill With An Integrated PLC)???
Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2008
    Posts
    154

    Anyone Have A Basic PLC Program For a F8025MSI (Mill With An Integrated PLC)???

    Hey Folks,

    I'm working on an overhaul of a standard 3 axis mill that has a Fagor 8025MSI installed. I have the machine moving and can home all 3 axes. But, when I try to run a simple program in either Single Block mode or in Automatic Mode the machine hangs within the first line or two of the code. It gets stuck "In Execution" after just one or two lines of code.

    I suspect the M, S & T strobe handling in the PLC is not correct. I do not know the background of the PLC program, who wrote it, or if it ever worked properly. I am also new to writing PLC program code, but I've done a lot of reading and studying the past 3-4 weeks and I've already fixed several things I've found in the PLC code. I also got good enough to get 4 of the external panel switches to operate correctly with the PLC code (coolant on, coolant off, external cycle start and external cycle stop).

    But, the code in the PLC program for handling the M,S & T strobe seems strange and harder than it has to be. So, if anyone has a copy of a PLC program for a basic 3 axis mill (with the PLCI) that you can send me, I would really appreciate it. It will give me something to compare my code to - something that I know works. You can send it as a file, or just take some pictures or screen shots of the PLC listing on the control. Any help would be a great help.

    If you can help me, let me know and I will PM you my direct email address.
    Thanks.
    Todd

  2. #2
    Join Date
    Dec 2003
    Posts
    24220
    The PLC for the 8025 is very different from any other PLC system or training you may learn about, it is not complicated, just different.
    It has been a very long time since I had to do any, the manuals should all still be on the Fagor site, they all were at one point.
    Unless this has a 3rd party PLC instead of the internal?
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  3. #3
    Join Date
    Dec 2008
    Posts
    154

    Nope. It's the Internal (Integrated) PLC.

    Hey Al,

    No, it is the internal PLC. Quite frankly, I wish the control didn't have the PLC at all. This application really doesn't need one. But, it's the control that my buddy got with the mill, so I'm working with it.

    Yup. I got all the manuals I could hog, err hold.

    So, the PLC code to handle the M,S & T strobes seems like it could be a lot simpler. Here's the section that handles the M, S & T strobes (the comments are mine and may be wrong - there were no comments that came with the code):

    26. I61 . . . . . . . . . ;IF T Strobe
    27. OR I62 . . . . . . .;OR If S Strobe
    28. OR I63 . . . . . . .;OR if M Strobe
    29. = SET M10 . . . .;THEN Set New Strobe Flag HI
    30. M10 . . . . . . . . .;IF M10 = "1"
    31. = TG2 10 100 . .;THEN T10 goes Set/HI after 1 sec.
    32. T10 . . . . . . . . .;IF T10 = "1"
    33. = O50 . . . . . . .;THEN M-done = "1"
    34. = O49 . . . . . . .;THEN Transfer Inhibit = "1"
    35. NOT M10 . . . . ;IF M10 = "0"
    36. = O35 . . . . . . ;THEN Feed Hold = "1"
    37. M10 . . . . . . . . ;IF New Strobe Flag = "1"
    38. AND T10 . . . . . ;AND 1 sec after M10 = "1"
    39. = TG2 11 100...;THEN T11 goes Set/HI after 1 sec
    40. M10 . . . . . . . . ;IF New Strobe Flag = "1"
    41. AND T11 . . . . .;AND IF 2 sec after M10 = "1" (one sec after M10 AND T10)
    42. = RES M10 . . .;THEN RESet M10 (also resets T10 and T11)

    Here are the definitions:
    I61 = T Strobe
    I62 = S Strobe
    I63 = M Strobe
    O50 = M-done
    O49 = Transfer Inhibit
    O35 = Feed Hold (appears to be a complement of M10)
    M10 = Appears to be a "New Strobe" Flag
    T10 = Goes active "1" one second after a new M10
    ;stays "1" until M10 is reset
    T11 = Goes active "1" one second after T10 AND M10 is true (2 sec after M10)
    ;stays "1" until M10 is reset (T10 also reset when M10 is reset)

    Be darned if I can figure out what this code is trying to accomplish.

    After more studying of the F8025M OEM/Install manual I found this:

    TRANSFER INHIBIT
    This INPUT must be normally high (24V) and
    * If while executing a motionless block this signal (TRANSFER INHIBIT) is set low
    (0V), the CNC interrupts the program execution at the end of the block currently
    in execution.
    When this signal is brought back high, the CNC resumes program execution.

    This seems to be related to the problem I'm having with the machine. It gets stuck in execution at the end of the 1st or 2nd block of code. Although, at one point I deleted all of this code from the PLC and tried it. The part program wouldn't run at all (the PLC program seems OK with it gone). But, then I put the code back in and I got the machine to run most of the simple part program in single block mode - before it eventually got stuck "In Execution".

    So, I think the handling of O50 and O49 in lines 32-34 is causing a bug. Looking at the timing diagrams that are in the manuals, O50 and maybe O49 should go to "0" one second after the M10 flag goes HI (actually a few mSec after). As written, the code has M-done and Transfer Inhibit go HI after 1 sec and they should already be HI!?!?

    I'm OK with the Feed Hold being the complement of the New Strobe Flag - just holds feed until while the M funct is being processed. But even that should be handled by the CNC as needed and doesn't have to be controlled by the PLC - unless there is a particular reason to hold it. In this application there is not currently any need to control feed hold in the PLC.

    Thankfully, I took a bunch of low level programming in college all those years ago - or I wouldn't have a clue about PLC programming. Of course, back then BASIC was a "High" level language...LOL.

    Thanks,
    Todd

  4. #4
    Join Date
    Dec 2003
    Posts
    24220
    As I say, it has been a long time, but I seem to remember that M codes were set/reset in some 16Bit? words.
    I would have to dig out my old notes to see if I can revive my memory!
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  5. #5
    Join Date
    Dec 2008
    Posts
    154

    Got It Working - Problem Solved (Sort Of).

    Well, after several gyrations of PLC code writing, I finally got the machine working.

    The first thing I did was spent about a week reading 2 of Fagor's PLC manuals. Thankfully, there was not a locking code that was used previously, so I didn't have to fight that battle.

    Then, the first order of business was to modify the code to handle the E-Stop Input and Output signals to work with the new wiring. I had changed the wiring of the E-Stop system to what is recommended in the Fagor manual. The PLC code needed a little tweaking to handle those signals a little differently.

    Next, I modified the code in the PLC program to handle the new switches that the new(er) panel has that the old panel did not have. The new panel has an external Cycle Start button and a Cycle Stop button. It also has a momentary switch for Flood Coolant ON and All Coolant OFF. Finally, I got those all to work correctly.

    At this point, if I tried to run a part program, the control would still hang after a few lines of code (stuck "In Execution"). So, I went back to the manuals and found all the example programs I could find that were related to handling M, S or T functions. I then realized that the machine I was working on has a HI and LO gear range that has to be set. To work correctly, the gear range selector should have a switch installed to tell the PLC which gear the machine is in. So, I re-wrote the code to handle M, S & T functions and also added the code that would handle the gear selector.

    When I loaded the code into the PLC, it didn't work. Major bummer! So, I went back and cut out the code that dealt with the gear selector, since that is not actually even on the machine yet and working yet - I was just "pre-loading" the code. So, I took it out. Tried it again and still no joy. Back to the books. At some point I realized that this control had been in pieces several times and that I never check to see if there was any tool assigned (in the holder). I also found a couple of bugs in the code so I fixed those. Tried it again and it ran almost all the way through the part program before hanging. It seemed that now I was making some progress.

    I noticed that each time that I had tried the PLC program when running a part program, I had a spindle command in the part program. I wrote a part program that did not have any spindle or tool codes in it. When I tried that - it all ran.

    Ah-HA!! The S functions calls were causing the problem. Not wanting to debug my code, I deleted it all from the PLC program and re-installed the code that was in the PLC program originally. I figured that it must have worked at one point, or it would not have been in there, right !?!? (That is the code that is in my second post above.) I added a spindle call (simply an S500 M3) into the part program that had previously run with just G codes and M codes. FINALLY, IT RAN!!!!

    It took a while to get there, but now I understand how more about how PLC programs work and what they do. Thanks for your help Al.

    R/Todd

Similar Threads

  1. F8025MSI - Error 060 : Hardware
    By TAProwler in forum Fagor Automation
    Replies: 6
    Last Post: 08-14-2013, 04:37 AM
  2. CAD-DWG basic program question
    By BigChief in forum Uncategorised CAD Discussion
    Replies: 3
    Last Post: 06-13-2013, 09:53 PM
  3. Recomendation for 'Basic' CAM program
    By gambit101 in forum DIY CNC Router Table Machines
    Replies: 14
    Last Post: 11-18-2011, 05:50 AM
  4. Looking for a basic dry run program
    By X7racer in forum Haas Mills
    Replies: 0
    Last Post: 04-03-2008, 06:24 PM
  5. Replies: 11
    Last Post: 10-09-2005, 05:45 AM

Posting Permissions

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