Determine EtherNet/IP support
Verify that your machine supports providing data over the EtherNet/IP protocol, and that the data items you want to expose are properly configured.
Please Note: If you have any uncertainties about the EtherNet/IP capabilities of your machine control, please reach out to your vendor for further guidance.
Control Support
The EtherNet/IP adapter is generic but its support of the protocol is incomplete and will not work with all controls. Support for a given control cannot be definitively determined until it has been tested. We have determined the support level for the following controls:
Allen Bradley MicroLogix
Not supported, these controls advertise EtherNet/IP support but are not compatible with the library we use.
Allen Bradley CompactLogix
Supported. All ComplexLogix controls implicitly connect with slot 0 due to the processor being integrated into the head of the control.
Allen Bradley ControlLogix
Supported. In the configuration, you must specify the backplane slot that the control processor is plugged into (which will be different than the slot that the EtherNet/IP interface card is plugged into). Use the slot parameter in the config.
All Other Controls
Unknown, must be tested on a case-by-base basis. The EtherNet/IP library our adapter is built around was primarily developed to communicate with CompactLogix and ControlLogix controls, but it may work with some others.
Connectivity Test
Once you’ve established that EtherNet/IP should be available on your control, you should test communication with it before trying to configure it in MachineMetrics. Collect the following information:
- The IP address of your control
Additionally, make sure that nothing on your network, the machine control, or the computer you’re testing the connection from, would block TCP port 44818, which is the well-known port for EtherNet/IP.
Connect a computer to the same network that the machine control is on, and use an EtherNet/IP scanner to try and open a connection to the machine. If you don’t already have a scanner for managing or exploring the data on your machine, your vendor may be able to recommend one.
EtherNet/IP Parameters
The main global parameter that may need to be changed is the scan interval, which determines how frequently data will be polled. By default the scan interval is set to 0.2 seconds, meaning data will be polled 5 times per second. You may want to increase this value if the frequency is putting too much work on the PLC, but higher values may also time out the connection on some controls.
For some controls, you may need to specify the slot that the control processor is attached to on the control backplane. AB CompactLogix will always be slot 0 because the processor is integrated into the main module, and thus does not need to be specified, whereas AB ControlLogix will have the processor plugged into a numbered slot in the backplane.
EtherNet/IP Tags
EtherNet/IP exposes data in the form of “tags”. Tags represent simple data types like numbers and dates, and may also represent strings or more complex entities. There is no need to specify the exact data type within the tag configuration.
Tags are specified by a path that represents their location in a hierarchy of data. Tags may be nested within several layers of objects, or indexed within arrays. Tags also have a scope, which is either global, or local to a specific program modules.
Here are several examples of tag locations:
# Globally scoped tag
AssemblyIndex
# Globally scoped tag within object Module10
Module10.ModeAuto
# Globally scoped tag at index 2 of PositionAxis array within object Module10
Module10.PositionAxis[2]
# Locally scoped tag to program Station1
Program:Station1.FaultNumber
EtherNet/IP Configuration Example
Here’s an example EtherNet/IP adapter script with a mix of global and local scoped tags of varying data types (booleans, numbers, strings). Variables transform some of the tag data into MTConnect-specific representations.
To learn more about V2 Adapter Scripts see below:
EtherNet/IP V2 Adapter Script
version: 2
scan-interval: 0.25
tags:
recipe_loaded: RecipeLoaded
mode_auto: Module10.ModeAuto
fault_ind: Module10.FaultInd
peak_force: Program:Station1.Values.Reals[0]
press_force: Program:Station1.Values.Reals[2]
fault_code: HMI1.StaData.FaultNumber
fault_msg: HMI1.StaData.FaultDescription
variables:
execution:
- state:
- ACTIVE: mode_auto and fault_ind == 0 and recipe_loaded
- READY: true
controller_mode:
- state:
- AUTOMATIC: mode_auto
- MANUAL: true
data-items:
- recipe_loaded
- controller_mode
- execution
- press_force
- force
conditions:
system:
- code: gen_fault
message: Machine is in fault
value:
FAULT: fault_ind > 0
- code: ${fault_code}
message: ${fault_msg}
value:
FAULT: fault_ind > 0
Troubleshooting
Your team can connect to the adapter’s 90xx diagnostic port and issue an info command to see what errors are being produced by the EtherNet/IP connection.
Errors will be specified as a code/subcode combination. A table of error codes is published here by Automation Direct. The codes are for their CLICK controls, but there is a large amount of overlap with other vendors. Specific codes from other vendors like Allen Bradley will not appear in the table however.
If an error occurs after connecting, the info output will usually list both a connection error and another error – in this case the connection error is a byproduct of trying to reconnect after encountering the real error. A common error is code 0x04, path segment error
, which means an invalid tag path has been specified.
ControlLogix controls will issue code 0x08, service not supported
when attempting to connect to the wrong slot of the control.
Timeouts reading tags with no other errors present may indicate that the scan-interval is set too high and the connection is timing out before the scan happens. CompactLogix has a short timeout window by default (128ms? [ref]), so try a scan-interval of 0.1 if timeouts are the problem.
Note: that this can still vary by control and a short scan-interval of 0.1 may be too much load for some controls.
Have Questions?
Reach out to support@machinemetrics.com.
Comments
0 comments
Please sign in to leave a comment.