587,161 active members*
3,277 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Fanuc > singular M Code not activating its R adress (strange)
Results 1 to 10 of 10
  1. #1
    Join Date
    Feb 2024
    Posts
    17

    singular M Code not activating its R adress (strange)

    I'm decently comfortable with Fanuc's ladder (Thanks in part to this wonderful community) But I've stumbled on a small annoyance that challenges my understanding of how M-codes are supposed to be handled by the CNC and PMC

    On our new Star SB20R Lathes, there is a rung (picture attached) with a simple Holding circuit that looks to be started by M183M (R42.7)
    But when i MDI M183 The machine just halts and doesn't clear the block. It never stops or alarms out due to missing FIN, cycle start lamp just stays on and the Coil R1740.1 is never activated

    M183 From head2 (R142.7) makes the machine behave exactly the same way and This R adress isn't present in the ladder at all.

    The relevant Decode blocks handles up to M200 for both paths and adjacent codes work as expected Both M182 (R42.6) and M184 (R43.0) Alarms out due to missing FIN. And after i add them to the MFIN net the block is cleared as per usual.

    The only other occurrence of R42.7 is in said MFIN net And R1740.1 is only to be found in the net in the picture.

    is There something in the CNC's software that can prohibit certain M-codes fron being sent to the PMC?

    Context:
    I've installed Air blow valves in a bunch of our lathes to clean both parts and tools from swarf and used M-codes 180-185 since they were free on all the machines i checked. On these machines I was going to close off this seemingly useless Rung with a Keep relay and repurpose M183

    Just for Operator comfort i'd like all machines to use the same commands. I can and probably will have to extend/create new DECB blocks to get what i want. But that's kind of a hassle and people will have to relearn codes and alter old programs.

    Biggest thing though, is probably that i need to know wtf is happening.

    TIA for Anything. I'm losing sleep over this little thing haha

  2. #2
    Join Date
    Apr 2009
    Posts
    108

    Re: singular M Code not activating its R adress (strange)

    Can you post a picture of the decode function? I'm assuming that this a SUB25. Do any of the M-Codes associated with this function statement work? Are there any JMP or COM functions used before it?

  3. #3
    Join Date
    Feb 2024
    Posts
    17

    Re: singular M Code not activating its R adress (strange)

    I thank you, oh legendary Shoprag, for your response, and beg thee for forgiveness in my late reply. I,ve been unsure how to reliably share my information and haven't taken the time to put something together.

    Yes. SUB25. All other tested codes both before and after 183 have worked. . I'm unable to find any JMP or COM functions that i believe would cause this behavior.

    I'm attaching my System data for review and also an Imgur link with a couple images where i've tried to be as straightforward as possible with the comments

    https://imgur.com/a/ZcImraA

  4. #4
    Join Date
    Apr 2009
    Posts
    108

    Re: singular M Code not activating its R adress (strange)

    I was able to open the ladder. Try moving the rung containing the R1740.1 output past the P5 sub-routine. This must be past network 1383.

    Network 1366 reads the M-code and turns on R42.7 (M183M)
    The ladder scan returns to the top and reads Network 794 where R50.6 (MFINM7) is called.
    Network 804 calls R19.1 (MFX)
    Network 806 calls G5.0 (MFIN). This turns off R42.7
    Network 1055 calls R1740.1. By the time this network is read, R42.7 (M183M) has been reset.

    This all may be happening in under 8ms. That is likely the reason that the trace is not seeing it properly.

    Let me know if this works.

  5. #5
    Join Date
    Feb 2024
    Posts
    17

    Re: singular M Code not activating its R adress (strange)

    You make perfect sense! But that does not explain why M183S (from HEAD2) creates exactly the same scenario

    Also, Ive tried removing R42.7 from Net 799 and 1073. And then it should never have been able to be turnt off. (?)

    Sent from my BE2029 using Tapatalk

  6. #6
    Join Date
    Apr 2009
    Posts
    108

    Re: singular M Code not activating its R adress (strange)

    Try moving the network. M183 will likely hang on a FIN if it's not in the ladder.

    You can also look at the settings in Data addresses D4000-4018. These are comparing the M-code called by F10 and could potentially turn on the FIN. This would depend upon other keep relays and inputs.

  7. #7
    Join Date
    Feb 2024
    Posts
    17

    Re: singular M Code not activating its R adress (strange)

    Sadly, moving the rung changed nothing. And I can't see anything suspicious in the anywhere in the data table

    https://photos.app.goo.gl/RdzownPvbvimMLsm6

    sorry for switching subject now. But I'm about ready to give up and migrate over to new M codes. The sad thing is that these were the only 6 consecutive free M-codes in the normal range (0-199)
    200-999 are wait codes so I'm looking at above 1000. which is totally fine except on the 18i machines that only accepts three digit codes (ALARM 003 TOO MANY DIGITS).

    Our 16i accepts four digits. So I'm fairly certain that it should be possible to "unlock" on the 18i's as well. any clues?

    EDIT: Found parameter 3030 "M-CODE DIGITS"

    Sent from my BE2029 using Tapatalk

  8. #8
    Join Date
    Apr 2009
    Posts
    108

    Re: singular M Code not activating its R adress (strange)

    That's odd. I'm afraid that my time is limited for the next few weeks. Parameter 3030 sets the allowable digits for an M-code on the i-series.

  9. #9
    Join Date
    Apr 2009
    Posts
    108

    Re: singular M Code not activating its R adress (strange)

    Sorry, I gave you some bad information regarding the M-code. Subroutine P5 (M-Codes) is called on Network 81 and jumps down to Network 1366 to turn on M183M. The scan returns to where it left off and continues to cycle. The same issue with G5.0 turning off M183M is still true. However, placing R1740.1 where I suggested places it inside of subroutine P9. This is called before the M-code subroutine resulting in the M-code resetting. You can place the R1740.1 at the end of the P5 subroutine (before the SUB72 SPE command) or directly after the SUB66 CALLU function that is calling P5.

  10. #10
    Join Date
    Feb 2024
    Posts
    17

    Re: singular M Code not activating its R adress (strange)

    I FOUND THE REASON

    There's system parameters for custom macro calls

    I'm going to dive a bit deeper into how those are supposed to work. Thank you so much for your time and tips!!<3

    https://photos.app.goo.gl/32awGVUoyLeTuEPy6

    Sent from my BE2029 using Tapatalk

Similar Threads

  1. Just strange.... - Too change g-code missing
    By itolond in forum CamWorks
    Replies: 2
    Last Post: 10-15-2018, 03:14 PM
  2. strange error code
    By joeyjrc in forum Tormach Personal CNC Mill
    Replies: 1
    Last Post: 07-18-2017, 01:27 PM
  3. Strange code issue!
    By EmeraldIsleforg in forum Milltronics
    Replies: 4
    Last Post: 10-06-2016, 03:46 AM
  4. New CNC Singular - Airbrush version
    By quak in forum Videos
    Replies: 0
    Last Post: 02-19-2016, 12:25 AM
  5. TurbocadCAM generates strange g-code?
    By mikeschn in forum Uncategorised CAM Discussion
    Replies: 10
    Last Post: 12-13-2005, 07:11 AM

Tags for this Thread

Posting Permissions

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