Alarms to PLC

  • I was just wondering if it is possible to send specific alarms to a PLC for monitoring purposes. Like lets say we have a 1325 Communication Alarm. Is there a way for the robot send that alarm code to the PLC or will I have to get crafty and write some type of background logic to run and send the information for each individual alarm in a binary system?

  • Not knowing what generation you are on, it is possible. There are M-registers that contain the alarm number. If you look in the Concurrent IO manual for your generation it will have the address. This could be passed to the External Outputs and on to the plc.

    I know a thing or two, because I’ve seen a thing or two. Don't even ask about a third thing. I won't know it.

  • If you use Modbus Tcp for communication between robot controller and PLC, you can send very easy the M-register that show alarm code.

    Alsoyou can send M-register data to external i/o but it need more i/o for it,

    There are other way and is use the Ethernet IP.

  • Not knowing what generation you are on, it is possible. There are M-registers that contain the alarm number. If you look in the Concurrent IO manual for your generation it will have the address. This could be passed to the External Outputs and on to the plc.

    I am on an NX100 right now and the M registers for alarm information are M340-M342. How would I write that into the ladder edit to send the M registers to a PLC? I've read through the concurrent IO manual but I can't quite figure out how to get the M registers output to a PLC. I'm using CC-link connectivity to the robot so it would most likely have to be binary correct? I'm just not sure how to write the instructions to output that information. Any help or clarification of my misunderstandings would be greatly appreciated.

  • Use the MOV instruction in the ladder to move the contents of the M-register to a relay word.

    I know a thing or two, because I’ve seen a thing or two. Don't even ask about a third thing. I won't know it.

  • Use the MOV instruction in the ladder to move the contents of the M-register to a relay word.

    I tried this but I get an error when I save. Where do I move the contents to so I don't get an error and so the PLC can read the information? Which outputs should I move the contents of the register to?

  • The error was probably when you compiled. If you set the output as a relay word, it is going to be 16 bit. You need to make sure the group you are using as the output and the next group are not used in the ladder.


    The outputs need to be on your CC-Link network.

    I know a thing or two, because I’ve seen a thing or two. Don't even ask about a third thing. I won't know it.

  • The error was probably when you compiled. If you set the output as a relay word, it is going to be 16 bit. You need to make sure the group you are using as the output and the next group are not used in the ladder.


    The outputs need to be on your CC-Link network.

    Ok thanks for the reply, however, virtually all of the outputs are being used somewhere in the ladder. For example: it will show a universal output # in a GRP instruction then an external output # on the bottom. I don't really understand what the point of this is or if it will destroy anything if I delete the instruction so that I can utilize the output. This is my first time actually modifying the ladder portion and it has been almost a decade since I took the class. My manual also doesn't clarify things very well so any help with this is greatly appreciated. Here is an example of the instruction I'm referring to. Ladder.png

  • Yes, you are needing to delete the next group from the ladder. The MOV instruction is a 16-bit instruction. To send over a 16-bit alarm code to 16 outputs (2 groups) the outputs can not be addressed somewhere else.


    Using the GRP addresses that are shown above. The MOV instruction would move the alarm register into relay word 30170. Group 30171 would need be removed from the ladder.

    I know a thing or two, because I’ve seen a thing or two. Don't even ask about a third thing. I won't know it.

  • none of that worked and I still get a fault that simply states "relay number" with no detail whatsoever. The relay isn't being used anywhere else and I just give up at this point. Getting the alarm information sent to a plc isn't going to happen I guess. Here are pictures for reference.

  • Need to move to an external output address. You can only output to a 0,3,4, or 7 address.


    0 Universal Input


    3 External Output


    4 Specific Input


    7 Auxiliary Relay.

    I know a thing or two, because I’ve seen a thing or two. Don't even ask about a third thing. I won't know it.

  • The relay isn't being used anywhere else and I just give up at this point.

    I feel your pain... but I din't give up. Double check if you don't have BMOV instruction used somewhere in the CIO file. If you have it ensure to release desired range of source/destination relays from it and then try again.


    I had BMOV #20520,158,#00500 and wanted to link 8 groups (64bits) of internal relays with general purpose inputs started from #00730. When I started I had an error during compilation, something about illegal, double use of relay. For some time, I couldn't find to what relays that alarm was related to. Because #00730 was in the middle of BMOV instructions I couldn't find it.

    So when I figure it out, I did below:

    1) Found BMOV instruction where desired inputs were used.

    2) Split it in two BMOV instructions:

    BMOV #20520,22,#00500

    BMOV #20740,114,#00730

    3) Compile and check if everything is still as it was.

    4) Release first 8 bytes from second instruction

    BMOV #20520,22,#00500

    BMOV #20830,106,#00810

    5) Compile and check if no error and release groups are free to use.

    6) Link groups of auxiliary relays (internal) with groups of GP Inputs

    STR #70017

    BMOV #20520,22,#00500

    GSTR #76650

    GOUT #00730

    GSTR #76660

    GOUT #00740

    GSTR #76670

    GOUT #00750

    GSTR #76680

    GOUT #00760

    GSTR #76800

    GOUT #00770

    GSTR #76810

    GOUT #00780

    GSTR #76820

    GOUT #00790

    GSTR #76830

    GOUT #00800

    STR #70017

    BMOV #20830,106,#00810

    7) Compile and check if everything works as I wanted.


    Good thing is that you need to do it only once, after that you can just use your CIO file with every other robot or just copy and paste this section to new robot's CIO file.


    Now, after above modification in the CIO file, if I would like to have on my GP Inputs alarms I could try this:

    1) Add these three lines

    MOV M340 W#76650

    MOV M341 W#76670

    MOV M342 W#76690


    or 2) remove links I did in step 6 and use instead:

    MOV M340 W#00730

    MOV M341 W#00750

    MOV M342 W#00770

    Edited once, last by mil3k ().

  • OP is on NX100 which doesn't have the BMOV instruction.

    I know a thing or two, because I’ve seen a thing or two. Don't even ask about a third thing. I won't know it.


  • Here it is is the simplest form. In this example I am writing to 30030. Since this is a 16-bit MOV instruction I need to make sure that addresses 30030 through 30037 and 30040 through 30047 are not used anywhere in the ladder. The only other item I add is another NO (A) contact in parallel that is my alarm reset button. This will reset M640 and clear the outputs.

    I know a thing or two, because I’ve seen a thing or two. Don't even ask about a third thing. I won't know it.

  • If your PLC and Robot are both using Ethernet/IP then there is an Explicit Message configuration in the PLC that you can use to read the Alarm. I believe this topic is addressed in one of the Ethernet/IP manuals.


    According to the manual it is not supported with any robot that has Safety Over Ethernet (FSU Ethernet Safety).


    I have tried to implement it in the past, but have never had the time to figure out how to make it work. We read the alarm codes out of Fanuc robots all day every day though with a similar process.

Advertising from our partners