0% found this document useful (0 votes)
226 views

CPX - AP-I - EtherNetIP - App Note

CPX Festo

Uploaded by

Omar Barraza
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
226 views

CPX - AP-I - EtherNetIP - App Note

CPX Festo

Uploaded by

Omar Barraza
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Application Note

CPX-AP-I with EtherNet/IP; Rockwell


Systems and Others

How to best commission a CPX-AP-I system on EtherNet/IP. A CPX-API-I-EP-I-EP


focus will be on integration with Rockwell Logix systems, but
much of the content is also applicable with any EtherNet/IP
master.

100299
Title ............................... CPX-AP-I with EtherNet/IP; Rockwell Systems and Others; Rockwell Systems and Others
Version ............................................................................................................................................................. 1.10
Document no. .............................................................................................................................................. 100299
Original .................................................................................................................................................................en
Author ............................................................................................................................................................. Festo

Last saved ............................................................................................................................................ 05.05.2020

Copyright Notice
This documentation is the intellectual property of Festo SE & Co. KG, which also has the exclusive copyright. Any
modification of the content, duplication or reprinting of this documentation as well as distribution to third par-
ties can only be made with the express consent of Festo SE & Co. KG.
Festo SE & Co KG reserves the right to make modifications to this document in whole or in part. All brand and
product names are trademarks or registered trademarks of their respective owners.

Legal Notice
Hardware, software, operating systems and drivers may only be used for the applications described and only in
conjunction with components recommended by Festo SE & Co. KG.
Festo AG & Co. KG does not accept any liability for damages arising from the use of any incorrect or incomplete
information contained in this documentation or any information missing therefrom.
Defects resulting from the improper handling of devices and modules are excluded from the warranty.
The data and information specified in this document should not be used for the implementation of safety func-
tions relating to the protection of personnel and machinery.
No liability is accepted for claims for damages arising from a failure or functional defect. In other respects, the
regulations with regard to liability from the terms and conditions of delivery, payment and use of software of
Festo SE & Co. KG, which can be found at www.festo.com and can be supplied on request, shall apply.
All data contained in this document do not represent guaranteed specifications, particularly with regard to func-
tionality, condition or quality, in the legal sense.
The information in this document serves only as basic information for the implementation of a specific, hypo-
thetical application and is in no way intended as a substitute for the operating instructions of the respective
manufacturers and the design and testing of the respective application by the user.
The operating instructions for Festo products can be found at www.festo.com/sp .
Users of this document (application note) must verify that all functions described here also work correctly in the
application. By reading this document and adhering to the specifications contained therein, users are also solely
responsible for their own application.

© (Festo SE & CO. KG, D-73726 Esslingen, 2020)


Internet: http://www.festo.com
Components/Software used

Table of contents
1 Components/Software used ................................................................................................................... 4

2 Introduction ........................................................................................................................................... 5

3 Terminal View for AP Modules ................................................................................................................ 6


3.1.1 AP-I System Primary and Secondary Branches ............................................................................... 6
3.1.2 AP - Terminal .................................................................................................................................. 7
3.1.3 AP Configuration - Firmware........................................................................................................... 9
3.1.4 AP Configuration – Username/Password ....................................................................................... 9

4 EtherNet/IP View for Commissioning .................................................................................................... 10


4.1.1 EtherNet/IP - Assembly Instances view for Exact and Fixed Size Instances .................................. 10
4.1.2 EtherNet/IP - EDS File .................................................................................................................. 12
4.1.3 EtherNet/IP - Rockwell L5X Project export function ..................................................................... 12
4.2 EtherNet/IP - Rockwell L5X Project Export Procedure ................................................................................ 13
4.2.1 Webserver Procedure ................................................................................................................... 13
4.2.2 Studio 5000 Procedure ................................................................................................................ 14
4.2.3 Transfer to the User Project ......................................................................................................... 15
4.2.4 Transferred Elements Description ................................................................................................ 18

5 System View for Diagnostics and Information ....................................................................................... 19


5.1.1 Diagnosis for Network and Communication ................................................................................. 19
5.1.2 Information .................................................................................................................................. 20
5.1.3 About ........................................................................................................................................... 20

6 Handling Diagnostic Events .................................................................................................................. 21


6.1.1 Use Case - Reading Diagnostics via process data ........................................................................ 21
6.1.2 Use Case – Use Status and Diagnostic Objects to access diagnostics with Service Data ............. 22
6.1.3 Use Case – Get Latest Trace Data Entry example ......................................................................... 24
6.1.4 Use Case – Recover from Comm Error .......................................................................................... 25
Some errors do not recover automatically. This is true for a link error in the AP-I bus. This is typically
indicated by an error code 0x0801_0127. Also, global status bit 8 will be on indicating
communication error. To recover from this error, recycle power will work. It is also possible to
recycle the connection from the PLC. ........................................................................................... 25

7 Handling Parameters with the CPX-AP System via the Parameter Object ................................................ 26
7.1.1 CPX-AP Parameter IDs and Instances; Use Case – Write to specific ID ........................................ 26
7.1.2 CPX-AP System Reading Parameter Object; Use Case – Read Parameters for use in HMI ............ 28

Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10 Seite 3 von 32
Components/Software used

1 Components/Software used

Type/Name Version Software/Firmware Date of manufacture

CPX-AP-I-EP-M12 Rev0.54.3 --
CPX-AP-I-4DI4DO-M12-5P Rev1.46.4 --
CPX-AP-I-8DI-M8-3P Rev1.46.4 --
VAEM-L1-S-24-AP Rev1.46.4 --
Rockwell Studio 5K V30, V31 --
Rockwell 1769-L30ERMS PLC V31 --
Google Chrome -- --

Table 1.1: 1 Components/Software used

Revision History Modified by Date

Rev 0 – initial document fpl May 2019


- Parameter instance added Fpl July 2019
- Password screens added fpl Sept. 2019

Seite 4 von 32 Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10
Introduction

2 Introduction

The CPX-AP-I-EP is an EtherNet/IP adapter that connects Festo CPX-AP-I modules to EtherNet/IP. This note will
cover web server based features of the CPX-AP-I-EP system to assist in configuration of the EtherNet/IP adapter
with Rockwell and other systems.

Festo provides documentation in a user manual to configure and use the AP-I system. This application note is
intended to provide details and hints for additional features possible when using a ControLogix or CompactLogix
PLC from Rockwell over EtherNet/IP, or any other EtherNet/IP master system. Therefore, it is a prerequisite to
this note that the user must use the Festo documentation of the AP-I system modules for valves, I/O, and Ether-
Net/IP. This is needed to become especially familiar with the following:
• Use of the Rotary switches of the CPX-AP-I-EP module
• Understanding of the LEDs of the system
• Understanding of the power, communication, and network cables used for the system
• Understanding power requirements, power distribution, and grounding of the system
• Understanding the use of module parameters

Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10 Seite 5 von 32
Terminal View for AP Modules

3 Terminal View for AP Modules

3.1.1 AP-I System Primary and Secondary Branches


The AP-I system starts with a network adapter that has 2 branches for distributing I/O.

Primary AP-I branch

The CPX-AP-I-EP adapter is always slot 1 of the AP system. The left AP-I connector is the primary branch. All
modules connected to the primary branch consume the next available slot numbers, in order of connection. The
leftmost AP-I connector is the incoming branch (topmost for pneumatic), the rightmost is the outgoing branch.

Slot 3 Slot 2 Slot 1

VAEM-L1-S-24-AP

CPX-AP-I-4DI4DO-M12-5P CPX-AP-I-EP-M12

Example of primary branch, modules in slots 1, 2, and 3.

Seite 6 von 32 Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10
Terminal View for AP Modules

Slot 3 Slot 2 Slot 1 Slot 4

VAEM-L1-S-24-AP

CPX-AP-I-4DI4DO-M12-5P CPX-AP-I-EP-M12 CPX-AP-I-8DI


-M8-3P

The right AP-I connector is the Secondary branch of the AP-I system. Modules connected to the Secondary
branch start consuming slot numbers after the last slot number of the Primary branch. The above example
shows the completed test system with all 4 slots consumed.

3.1.2 AP - Terminal

The CPX-AP-I-EP webserver shows the connected configuration of the modules, slots 1 to 4 in this example. The
module description, code, FW version, and serial numbers, and product key are displayed. The EP product key is
not displayed since this is the password for the web access. This is found on the label of the adapter. It is typi-
cally “AP_I_EP_xxx"

Sign-in access required. User: admin Password: the product key of the EP adapter found on label

Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10 Seite 7 von 32
Terminal View for AP Modules

Each module can be configured by clicking on it. For example, slot 1 is the EtherNet/IP adapter. One click on the
module opens the parameter selection list for the module.

Slot 1. The CPX-AP-I-EP module has configuration parameters for IP address maintenance and supply voltage
diagnostics.

NOTE: Each parameter has instance numbers for the CIP Parameter Object and AP ID instance. This facilitates
easy look-up for module parameters. Every module has this list. See Parameter Object section of App Note.

Slot 2 example. The CPX-AP-I-4DI4DO-M12-5P has configuration parameters for debounce time, and fail safe
state for outputs (default off or hold last state).

Some modules, such as the 4 channel analog input may have an extensive list of parameters. The 4AI module
has 52 parameters for configuring the 4 analog channels.

Seite 8 von 32 Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10
Terminal View for AP Modules

3.1.3 AP Configuration - Firmware


The CPX-AP-I-EP module can load new FW simply by browsing a FFWU file on a PC.

3.1.4 AP Configuration – Username/Password


The username / password can be changed. Follow user manual to reset to default values if forgotten.

Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10 Seite 9 von 32
EtherNet/IP View for Commissioning

4 EtherNet/IP View for Commissioning


4.1.1 EtherNet/IP - Assembly Instances view for Exact and Fixed Size Instances
The CPX-AP-I-EP has numerous Assembly Instances for configuration. The reason is to get the best commission-
ing experience based on the controller type of the user, and the types of modules connected to the EtherNet/IP
adapter.

Exact size instances (100 – 105 / 131 – 133):


• Use this to optimize the memory consumption of your controller. The Assembly view page shows the
I/O size of the different datatypes of the I/O Produce and Consume values. These values can be placed
directly in your commissioning software.
• Select the datatype that best matches the modules in your AP-I system. For example, mostly digital
modules may best fit the SINT datatype. Mostly analog modules will fit the INT datatype. More data
intensive modules like IO-Link may be best supported by the DINT datatype. DINT may also have other
benefits when manipulating data within a Rockwell controller.
o Data will always be padded in a datatype so a new module will start at the beginning of the
next datatype in an array.

Fixed Size instances (110 – 125 / 134 – 139):


• Use this to pre-allocate memory space in your controller so additional modules can be added at any
time. Select the appropriate fixed size for your application. You must at least exceed the I/O size being
produced or consumed. The physical configuration cannot exceed the instance chosen.
• The input and output sizes do not have to be equal.
• Instances exist to include diagnostics too. See description above for diagnostics
• Choose the appropriate datatype instance to match the modules chosen. In this case SINT and DINT are
available.

Configuration Instance (140):


• Always use 140. This will be populated if L5X export is used.

Status and Diagnostic Instances (129 – 130):


• Use these to include status and diagnostic information from the AP-I system.
o Instances 129 and 130 are separate instances that can be used specifically for Status Input of a
generic ethernet set-up
▪ Instance 129 includes both global and module status and diagnostics
▪ Instance 130 includes global status and diagnostics only
o Exact and Fixed instances with Status and Diagnostics place the Global only information at the
top of the input table.
• The Status and Diagnostic instances for both global and module data is structured as follows:

Seite 10 von 32 Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10
EtherNet/IP View for Commissioning

o The diagnostic field will be structured as follows: Size is 12 bytes + mod count * 12 bytes

Byte offset Len Description

0 4 Global diagnosis state

4 2 Count of currently active diagnosis


6 2 Module which has latest diagnosis
8 4 Latest diagnosis code
Array of Module Diagnosis with module number (=n) as index
12 + n * 12 1 Module no

13 + n * 12 1 Submodule
14 + n * 12 1 Channel

15 + n * 12 1 Module present state


16 + n * 12 4 Module diagnosis state

20 + n * 12 4 Diagnosis Code

• The Status and Diagnostic information for Global only are 12 bytes, offset 0-8 in the above table.

The Assembly View page shows useful information for commissioning the AP-I system. This includes:
• The I/O size of the system
• The bit padding of the individual modules
• Bit length and datatype of the channels
• Module / channel description

Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10 Seite 11 von 32
EtherNet/IP View for Commissioning

4.1.2 EtherNet/IP - EDS File


Select EDS file to download the EDS file to your PC. Install this in your communication commissioning software,
ie: EDS Hardware Installation Tool, so the device identity is recognized. This device provides a static EDS file.

4.1.3 EtherNet/IP - Rockwell L5X Project export function


The CPX-AP-I has a Web Server export function to create an L5X project based on the current configuration and
parameter settings. This function has multiple benefits for the user with Rockwell Automation Studio 5000:
• A Generic Ethernet Module template is generated with the correct I/O size, configuration size, configu-
ration values, and assembly instances for the AP-I system. No user mistakes.
• Optional Status and Diagnostic instance and size is generated automatically.
• Configuration data gets stored in the user project, and is downloaded upon connection with EIP. This
facilitates disaster recovery situations.
• User Defined Datatypes (UDTs) are generated with meaningful Tag Names, data types, and descrip-
tions. Clear and simple programming, no need for datatype conversions.
• Programming instructions to transfer data from UDT to generic module tag name. No need for extra
programming.

Simply enter a name for the project to be created, and select the desired check boxes:

Configuration Assembly:
• Default Enable. This will generate an Assy Instance size (number of array bytes) and populate the array
with data matching the parameters set in the web browser or external SW tool (future planned).
Status Assembly:
• Default is Global and Module Status. A Generic Ethernet Module with Status Inputs will be generated.
There will be 12 bytes global plus 12 bytes per module allocated for Status and Diagnostics. This in-
cludes the EtherNet/IP adapter as a module.
• User selects Global Only status. A Generic Ethernet module with Status Inputs will be generated. There
will be 12 bytes of data allocated for Status and Diagnostic.
• User selects no Status. A Generic Ethernet Module will be generated without Status inputs.
• Refer to section 4.1.1 under Status and Diagnostic Instances for the structure of the information.
Webserver:
• Default enable. The user can change this parameter so the webserver is disabled, if they wish to have
no webserver access.
• Write Access, default enabled. The user can disable write access. This is useful if the user wishes to
prevent someone from changing the parameters of the system, but still wants viewing access.
o If these are disabled when using the exported L5X project, each time the controller connects to
the system, the webserver will not be enabled or have no write access while the machine is
running. All of the exported parameter settings will be used.
SNMP:
• Default is enabled. SNMP is useful for troubleshooting purposes of ethernet networks. MIB browsers
use SNMP for providing access to diagnostic network info.
• SNMP can also be an avenue for security risk. Ethernet parameters can be changed with this protocol.
Therefore the user can disable this via the web browser.

Seite 12 von 32 Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10
EtherNet/IP View for Commissioning

To reverse these, the user can edit the project Config tag name in Studio 5000 Logix specific to the web server
access, webserver enable, or SNMP enable. One, 1, is enable; 0 is disable.

4.2 EtherNet/IP - Rockwell L5X Project Export Procedure


The procedure to export the L5X file for a CPX-AP-I-EP system has several simple steps. There are several steps
required from the webserver, and within Studio 5000.

4.2.1 Webserver Procedure


• Enter a suitable name for Studio Logix. No spaces, dashes, etc. to be used. Characters and under-
scores are acceptable
• Enable / Disable the selections as desired
• Submit. If the name is acceptable, Download will appear.
• Download. The file will be in the download folder of your PC.

Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10 Seite 13 von 32
EtherNet/IP View for Commissioning

4.2.2 Studio 5000 Procedure


1. Open a component of Logix Designer.
2. Go to File -> Open. Save Imported Project As…
• The name will be “cpx_ap_(user name entered)”
3. Select the revision you are working in, and press Import.
4. You have now created a project with the Generic Ethernet Module configuration, UDT, and Logic. Refer
to image Step 2.2.4 below. You now need to transfer this content to a working project to complete the
import.

Step 4.2.2.2

Step 4.2.2.3

Step 4.2.2.4

Seite 14 von 32 Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10
EtherNet/IP View for Commissioning

4.2.3 Transfer to the User Project


1. Right click on the Generic Ethernet Module in the created project and copy. Paste this into the user
project by Right Click on Ethernet and select paste. Be sure the IP address does not conflict with an ex-
isting IP address.
Step 4.2.3.1
Copy from Generated project: Paste to User Project:

2. Select all rungs of the created project, right click, and select “Export Rungs”.
Step 4.2.3.2

Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10 Seite 15 von 32
EtherNet/IP View for Commissioning

3. This will create a file name “Rungs0toN_from_MainRoutine_(user name entered).L5X”. Select Export.
Step 4.2.3.3

4. Import the file from the previous step into the user project. Right click on any rung, preferably in the
Main Routine, and select Import Rungs. A pop-up will confirm the import of the rungs, plus datatypes
and other components. Select OK.

Step 4.2.3.4

Seite 16 von 32 Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10
EtherNet/IP View for Commissioning

5. The L5X imported into the user project provides Tag names with custom datatypes (UDTs), and the logic
to copy this data to the raw I/O instances of the Generic Ethernet Module set-up. Move the logic as nec-
essary to suit your needs.
Step 4.2.3.5

Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10 Seite 17 von 32
EtherNet/IP View for Commissioning

4.2.4 Transferred Elements Description


The elements generated and transferred by the L5X includes:
1. A set of I/O tag names of the following:
i. “User name entered”_Inputs
ii. “User name entered”_Outputs
iii. “User name entered”_Status (if selected)
iv. The datatypes of these names are a user defined datatype (UDT) which has a custom
structure suited for the module types installed on the AP-I system.
1. Solenoids and digital I/O will be Boolean
2. Analog will be Integer
3. Specialty I/O can be SINT, DINT or other based on necessity
v. The elements will automatically be annotated in the Description Field to facilitate eas-
ier programming by the user.

Image 4.2.4.1, example of input and output tags with custom UDT descriptions

Image 4.2.4.2; Shows benefit of UDT. Transition from digital to analog device shows the appropriate datatype.
No conversions necessary when programming to UDT.

2. A set of rungs in ladder logic to do a Synchronous Copy of data from the custom tag names to the raw
I/O Assembly Instances of the Generic Ethernet Module. It is good practice to keep the CPS instruction
for the inputs or status near the top of the user logic, and the CPS instruction for the Outputs should be
near the bottom of the logic where setting outputs occurs.

Image 4.2.4.3

Seite 18 von 32 Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10
System View for Diagnostics and Information

5 System View for Diagnostics and Information


5.1.1 Diagnosis for Network and Communication
The diagnosis page provides network information and diagnostics. This can be used in addition to the user
manual description of network LEDs to solve communication and network problems.

Information useful for R&D can be found on the Diagnosis page:

The Outputs lost power

The Outputs regained power about 57 seconds later. Grey “X” means the problem was resolved.

Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10 Seite 19 von 32
System View for Diagnostics and Information

The user can copy this data and paste into Notepad to be used with Festo technical support:

5.1.2 Information
The information page provides basic information such as firmware version, product name, and network configu-
ration information such as IP address, netmask, gateway, etc.

5.1.3 About
This has license information of components used in the AP-I adapter.

Seite 20 von 32 Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10
Handling Diagnostic Events

6 Handling Diagnostic Events


6.1.1 Use Case - Reading Diagnostics via process data
The easiest and most comprehensive method for reading diagnostics is to use Assy Instance 129 which includes
Global and Module Diagnostics. By selecting this in the L5X export, the system will generate a UDT for status of
the CPX-AP system.

The configuration will include a status connection, and an array of bytes suitable for the amount of diagnostic
data. A UDT and logic is also generated for a proper data-structure and logic to pass the data to the structure.
This enables intuitive mapping of the diagnostic data to Logix.

The data-structure below contains an example of a diagnostic event, lost output power.

In this example:
• The top group is the Global data. The latest code reported is 0x0201_0106. In the manual, this
is an error with PL24vdc.
• Each other group is specific for a module, with the lowest module number on top. Only mod-
ules with an output report an error, others are error free. Note state=5 means voltage prob-
lem, but also communicating OK. See diagnostic bit table below.

NOTE: With Assy Instance 130, and Fixed Assy Instances with Global status, only the top group is available. This
is to limit the amount of PLC data.

Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10 Seite 21 von 32
Handling Diagnostic Events

If bit is set at least one diagnosis of this category is available.

Bit Description Bit Description

Device available
0 11 Software
(Communication ok)
1 Current 12 Maintenance
2 Voltage 13 Misc
3 Temperature 14 reserved
4 reserved 15 reserved
5 Movement 16 External Device
Configuration /
6 17 Security
Parameter
7 Monitoring 18 Encoder
8 Communication 19-31 reserved
9 Safety
10 Internal Hardware

6.1.2 Use Case – Use Status and Diagnostic Objects to access diagnostics with Service Data
Diagnostics are always available, even without access from process data. The Status and Diagnostic Object can
access diagnostic information with a n explicit message. This is optimally used in combination with Global diag-
nostics only. Therefore the process data for diagnostics are fixed at 12 bytes, and further detailed data can be
read via explicit message.

Status and Diagnostic Object Class = 0x65. Get the last active diagnosis per module.

Ac-
Attribute Name Type Description Value
cess

Class Attributes

1 Get Revision UINT Revision of the object 1

Max instances of the CIP ob- Module count of


2 Get Max instances UINT
ject AP-System

Num instances of the CIP ob- Modulecount of


3 Get Num instances UINT
ject currently created AP-System

Max Class At-


6 Get UINT 9
tribute

Max Instance 4 (Diagnostic


7 Get UINT
Attribute code)

Global Diagno-
8 Get UDINT see Global Diagnosis State
sis state

9 Get Bus status USINT

Instances

Seite 22 von 32 Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10
Handling Diagnostic Events

1..Number of Instance 1..Number of Mod-


Modules ules

Instance Attributes

Module diagno-
1 Get UDINT see Module Diagnosis State
sis state

2 Get Submodule USINT

3 Get Channel USINT

4 Get Diagnostic code UDINT

In addition, another valuable object is the Trace data object. The system will log up to 512 events which can be
retrieved by an explicit message. Instance 1 will retrieve the latest event.

Trace Object Class = 0x66.

Access Name Type Description Value


Attribute

Class Attributes, Instance = 0

Revision of the
1 Get Revision UINT 1
object

Max instances of Max number of trace en-


2 Get Max instances UINT
the CIP object tries

Num instances of
Current number of trace
3 Get Num instances UINT the CIP object
entries
currently created

6 Get Max Class Attribute UINT 9

Max Instance Attrib-


7 Get UINT 4 (Diagnostic code)
ute

0 = Overwrite
8 Get/Set Trace mode USINT
1 = Acknowledge

Instances

1..Number of trace entries Instance 1..Number of trace entries

Instance Attributes

1 Get Timestamp ULINT in ns

2 Get Module UINT

3 Get Submodule UINT

4 Get Channel UINT

Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10 Seite 23 von 32
Handling Diagnostic Events

5 Get Diagnostic code UDINT

1 = information
2 = maintainance required
6 Get Severity USINT
4 = warning
8 = error

0 = inform
7 Get Type USINT 1 = raise
3 = resolve

8 Get Acked USINT true / false

By using other CIP services, all attributes of one diagnostic trace can be accessed at once by the Get Member
service 0x18.

Service Name Description Service Class Instance

Get Attribute Sin- 0x18 0x66 1..Number of trace entries


0x0e
gle
Get all attributes of 1 instance
Get all attributes of
0x18 Get Member
one diag trace entry

Acknowledge
0x32
trace entry

The Data-structure for the response is as follows:

Item Datatype

Timestamp ULINT

Module UINT

Submodule UINT

Channel UINT

Diagnostic code UDINT

Severity USINT

Type USINT

Acked USINT

6.1.3 Use Case – Get Latest Trace Data Entry example

The following ladder code example shows how to set-up the MSG instruction and array for the Trace data Get
Member service. Instance 1 is the latest trace entry.

Seite 24 von 32 Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10
Handling Diagnostic Events

6.1.4 Use Case – Recover from Comm Error

Some errors do not recover automatically. This is true for a link error in the AP-I bus. This is typically indicated
by an error code 0x0801_0127. Also, global status bit 8 will be on indicating communication error. To recover
from this error, recycle power will work. It is also possible to recycle the connection from the PLC.

This shows the global diagnostic field where bit 8 is on for the status, and the lost link diag code is present.

The following 2 rungs can recover from this via the PLC logic. Triggering the open contact will inhibit the PLC
ethernet connection to the CPX-AP ethernet adapter. Once the physical connection is restored, removing the
trigger will allow the connection to restore. NOTE: inhibiting the connection will turn off all I/O.

Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10 Seite 25 von 32
Handling Parameters with the CPX-AP System via the Parameter Object

7 Handling Parameters with the CPX-AP System via the Parameter Object
7.1.1 CPX-AP Parameter IDs and Instances; Use Case – Write to specific ID
Parameter IDs are common IDs among the system modules. They can be read or written to via EtherNet/IP. A
partial list of parameters can be found in the user manual. The webserver lists the ID in parameter order num-
ber, from the first parameter of the first module (the EtherNet/IP adapter) to the last parameter of the last mod-
ule.

In the above example, we can see the following:


• There are 15 parameters based on the last parameter of the last module
• A common parameter ID is 20022. This is universal among modules for monitoring load supply
• Another common parameter ID is 20014 for Input Debounce Time.
• Each module has 1 instance of every parameter, instance 0.

Seite 26 von 32 Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10
Handling Parameters with the CPX-AP System via the Parameter Object

These parameters can be modified by the user program a variety of ways. One method is by the:

Parameter Object Service:


Object Class = 0x0F

Service Code Instance Attribute Data[0..1] Data[2..3] Data[4..7] Data[8..n]


Request

Read 100 / 0x64 -


AP Pa- AP Pa-
Module
0 - rameter rameter
Number Data to
Write 101 / 0x65 Instance ID
write

With these services the user can easily read or write to a parameter of the AP system.

The message instruction should have a source element large enough for the data

The element is populated according to the Parameter Object service. In this case, 0x4e36 is 20022dec, which is
the monitoring load supply parameter, of module 1. The data sent is 2, which is Load Supply monitoring active:

Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10 Seite 27 von 32
Handling Parameters with the CPX-AP System via the Parameter Object

7.1.2 CPX-AP System Reading Parameter Object; Use Case – Read Parameters for use in HMI
The Parameter set of the CPX-AP-I system also follows the Parameter Object of the CIP Common spec. The user
can get any pertinent information about the parameter set by querying the parameter object.

The Parameter Object Class is 0x0F. The table below has the various attributes per the specification, not all are
supported by the CPX-AP at initial release. Any parameter attribute 100 or more is vendor specific.

Object Class = 0x0F

Ac-
Attrib- Name Type Description Value
cess
ute

Class Attributes, Instance = 0

1 Get Revision UINT Revision of the object 1

depend on
Max instances of the CIP ob-
2 Get Max instances UINT configuration
ject
of AP system

depend on
Num instances of the CIP ob-
3 Get Num instances UINT configuration
ject currently created
of AP system

6 Get Max Class Attribute UINT 10

7 Get Max Instance Attribute UINT 24

Descriptor for Parameter Ob-


ject
Bit coded
8 Get Descriptor WORD 0x3
0 - Support Parameter In-
stances
1 - Support Full Attributes

9 Get Configuration Assembly UINT

0 - English
1=French
2=Spanish
Native Language Selec- 3=Italian
10 Get/Set USINT 0
tion 4=German
5=Japanese
6=Portugese
7=Mandarin Chinese

Instances

1..x Instance 1..x

Instance Attributes

Specified
by
1 Get/Set Parameter Value
Datatype
Attribute 5

Seite 28 von 32 Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10
Handling Parameters with the CPX-AP System via the Parameter Object

Always zero (no link path


2 Get/Set Link Path Size USINT
available)

Currently no link path support


3 Get/Set Link Path EPATH
available

Descriptor of Parameter In-


4 Get Descriptor WORD
stance

USINT or
Datatype definition of this in-
5 Get Datatype ARRAY of
stance
USINT

6 Get Datasize USINT

SHORT_S
7 Get Parameter Name String Max 16 chars
TRING

SHORT_S
8 Get Units string Max 4 chars
TRING

SHORT_S
9 Get Help string Max 64 chars
TRING

Specified
Minimum value of parameter
by
10 Get Minimum Value instance. For string types this
Datatype
represents minimal length.
Attribute 5

Specified
Maximum value of parameter
by
11 Get Maximum Value instance. For string types this
Datatype
represents maximal length.
Attribute 5

Specified
by
12 Get Default Value
Datatype
Attribute 5

13 Get Scaling Multiplier UINT

14 Get Scaling Divisor UINT

15 Get Scaling Base UINT

16 Get Scaling Offset INT

17 Get Multiplier Link UINT

18 Get Divisor Link UINT

19 Get Base Link UINT

20 Get Offset Link UINT

21 Get Decimal Precision USINT

Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10 Seite 29 von 32
Handling Parameters with the CPX-AP System via the Parameter Object

International Parameter
22 Get STRINGI
Name

International Engineering
23 Get STRINGI
Units

24 Get International Help String STRINGI

100 Get Module Number UINT

101 Get AP Parameter ID UDINT

102 Get AP Parameter Instance UINT

With the Parameter Object it is possible to read all parameters of the CPX-AP system in logic and place the data
in a data-structure, which can be used to display on an HMI, or other visualization. Festo can provide source
code with an AOI to help support this function:

Example of source code and AOI. When executed, the data-structure can be populated as follows. The AOI
simply needs the number of parameters in the system, found from the web server - last module.

Each MSG instruction needs to point to byte [0] of the data-structure, parameter name. Class, Instance, Attrib-
ute can be left 0, the AOI will populate these as required.

Seite 30 von 32 Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10
Handling Parameters with the CPX-AP System via the Parameter Object

The data-structure can be copied from a template provided with the AOI. Simply create an array size for the QTY
of parameters + 1. In this case, there were 15 parameters. Do not expand the variables called “buffer”.

The results are shown below for interesting parameters of the CPX-AP system. Array[1] through [15] are the data
of the parameters in order 1 – 15. Array[0] is a temporary storage, and not to be used by the user.

Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10 Seite 31 von 32
Handling Parameters with the CPX-AP System via the Parameter Object

Seite 32 von 32 Application Note – CPX-AP-I with EtherNet/IP; Rockwell Systems and Others – 1.10

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy