Purpose of this thread:
This thread has an attached example Allen Bradley PLC program which goes over most of the explicit messaging commands detailed in the Ethernet/IP manual. This program was tested on real hardware (A 5069-L306ERMS2 Compact GuardLogix running v32.11, and a Fanuc LR Mate running LR HandlingTool V9.30P/11).
The reason I created this thread is that explicit messaging is incredibly useful to extract or write data to/from the robot, and I don't see it being used a lot in the field. The best part is that no setup on the robot side to be done besides having the Ethernet/IP option installed, and comms active with the PLC.
What is Ethernet/IP Explicit Messaging:
Explicit messaging allows the PLC to explicitly read or write a chunck of data to the robot. This data can include registers, position registers, alarms, the current position of the robot, robot inputs and outputs, flags, and more. This method is slower than implict messaging, which typically runs the IO you normally use on the robot (digital IO, and/or the UOPs). Also, I don't recommend running a lot of these at once, as it will slow down non critical portions of the robot, such as refreshing the teach pendant.
What is in the attached .zip file:
In the attached .zip file is a Logix Designer program with only 1 routine in it, with a examples of most of the explicit messaging commands detailed in the Ethernet/IP manual.
These message commands include:
- Read from:
- A single register in integer or real format
- A block of registers in integer or real format
- A single string register
- A block of string registers
- A single position register in joint or Cartesian format
- A block of position register in joint or Cartesian format
- The robot's current position, in joint or Cartesian format
- The robot's active alarm, as a string, or as Fanuc's entire alarm format (included as a UDT)
- The robot's 2nd most active alarm, as Fanuc's entire alarm format
- The robot's robot inputs and outputs
- The robot's internal flag bits
- Write to:
- A single register in integer or real format
- A block of registers in integer or real format
- A single string register
- A block of string registers
- A single position register in joint or Cartesian format
- A block of position register in joint or Cartesian format
In addition to the program are exports of all the Fanuc UDTs created, the tags, the program, and the routine in the event you are not running V32 or higher.
Limitations:
The position examples will not work on robots running software earlier than V8. None of these will work on robots running software earlier than V7.
Please let me know if you have any questions about the implementation of the logic.