Module 07 EthernetIP Agenda EthernetIP Overview Terminal Configuration

  • Slides: 56
Download presentation
Module 07 – Ethernet/IP

Module 07 – Ethernet/IP

Agenda § § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC

Agenda § § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC EDS file and RSLinx RSNetworx for Ethernet/IP Watch-Outs Sample Program - Floating Point - Integer § § Shared Data Access Troubleshooting Assessment Exercise 1

Ethernet/IP Overview Developed in the 1990's by Control. Net International. Released in 2001, the

Ethernet/IP Overview Developed in the 1990's by Control. Net International. Released in 2001, the standard is currently managed by ODVA. Common Industrial Protocol (CIP) based. Two standards speeds, 10 MBPS and 100 MBPS. Message scheduling not necessary because of the use of smart switches and higher network speeds. RSNetworx for Ethernet/IP generally not needed with MT Industrial Devices Device Level Ring (DLR) topology NOT available on Industrial Terminals because of single port Module. EDS File only needed to identify device for RSLinx Module supplied by HMS DON'T USE the EDS file as an EDS AOP!! Cyclic messages are referred to as "Class 1", "Implicit", or "Scheduled" messages Acyclic messages are referred to as "Class 3", "Explicit", or "Unscheduled" messages (requires Message Instructions) The same as Control. Net (and that's no accident)! 2

Ethernet/IP Overview - Continued Works with standard RJ-45 Ethernet cables, as well as cables

Ethernet/IP Overview - Continued Works with standard RJ-45 Ethernet cables, as well as cables with M 12 connectors. Works with standard Ethernet switches and ruggedized switches Works with standard Routers But should NOT be used with an Ethernet HUB! (control networks don't tolerate collisions very well) The Ethernet architectures have the widest array of topology configurations available. Please review Module 02 - Section 01 - Fieldbus Network Overview - Topology Overview for details. 3

Qo. S and IGMP Snooping Two important terms that we must be aware of

Qo. S and IGMP Snooping Two important terms that we must be aware of on Ethernet/IP are Qo. S and IGMP Snooping. Qo. S – Quality of Service Quality of service determines how packets are marked, classified, and treated based on traffic type. Ether. Net/IP devices can prioritize traffic internally. Qo. S does not increase bandwidth. Implementing Qo. S at the switch level adds another level of prioritization, and gives preferential treatment to some network traffic at the expense of others. Qo. S is used for streaming types of data, such as voice and video. It also works well with implicit (cyclic) data, which is actually a form of streaming data. IGMP – Internet Group Management Protocol IGMP is a communication protocol used to manage the membership of IP multicast groups. Much of Ether. Net/IP implicit (I/O) messaging uses IP multicast to distribute I/O control data, which is consistent with the CIP produced/consumer model. Without IGMP, switches treat multicast packets like broadcast packets, so that multicast packets will be retransmitted to all ports. IGMP Snooping The behavior of an unmanaged switch is to flood multicast packets to all ports within the same VLAN. This is not typically desirable. To resolve this IGMP Snooping implements the following: • A Querier manager maintains a table that lists the devices that are participating in multicast groups. • Snooping functionality inspects packets and forwards multicast data only to the devices that requested the data. IGMP snooping constrains the flooding of multicast traffic by dynamically configuring switch ports so that multicast traffic is forwarded to ports associated with only a particular IP multicast group. Note: The Querier must reside on a router or centrally located IGMP capable device, such as a switch. 4

Terminals that Support Ethernet/IP is supported on all of the following terminals: * Limited

Terminals that Support Ethernet/IP is supported on all of the following terminals: * Limited Variable (Shared Data) Access All terminals use the same Ethernet/IP module 5

Agenda § § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC

Agenda § § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC EDS file and RSLinx RSNetworx for Ethernet/IP Watch-Outs Sample Program - Floating Point - Integer § § Shared Data Access Troubleshooting Assessment Exercise 6

Ethernet/IP – Terminal Configuration 1. In Setup, navigate to "Communications | PLC Interface" 2.

Ethernet/IP – Terminal Configuration 1. In Setup, navigate to "Communications | PLC Interface" 2. Navigate to "Ethernet/IP – Modbus/TCP" 3. Most times, a static IP address will be used. In those cases, enter the desired IP Address, Subnet Mask, and Gateway Address. 7

Ethernet/IP – Terminal Configuration Continued 1. Navigate to "PLC Interface | Data Format" 2.

Ethernet/IP – Terminal Configuration Continued 1. Navigate to "PLC Interface | Data Format" 2. Set Format to "Floating Point" and Byte Order to "Word Swap" 3. Press the Message Slot Edit button 4. Make sure that a scale is defined. If one is not defined, use the Add button. 8

Agenda § § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC

Agenda § § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC EDS file and RSLinx RSNetworx for Ethernet/IP Watch-Outs Sample Program - Floating Point - Integer § § Shared Data Access Troubleshooting Assessment Exercise 9

Ethernet/IP – Define in PLC Make sure that the Bridge module is physically in

Ethernet/IP – Define in PLC Make sure that the Bridge module is physically in the slot specified by the PLC Program (Slot 2 – slot numbering starts at zero)! The PLC rack must have an Ethernet/IP Bridge installed in the chassis The individual nodes must be defined under the module - can be a "Generic Control. Net Module" or an Add On Profile (AOP). This is where the Ethernet/IP Network's implicit (cyclic) data configuration is set up. Note that this has nothing to do with the EDS file!!! 10

Ethernet/IP – Configure Nodes in PLC 2 different ways to define a node in

Ethernet/IP – Configure Nodes in PLC 2 different ways to define a node in the PLC program 1. Generic Ethernet Module 2. Add On Profile (AOP) Look up values in manual Configure from Pull Down menu I/O Shows up here 11 (more details on this later)

Agenda § § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC

Agenda § § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC EDS file and RSLinx RSNetworx for Ethernet/IP Watch-Outs Sample Program - Floating Point - Integer § § Shared Data Access Troubleshooting Assessment Exercise 12

EDS File and RSLinx Loading the EDS file into RSLinx allows it to identify

EDS File and RSLinx Loading the EDS file into RSLinx allows it to identify the Device. Net device on the network. If the EDS file has not been loaded, then the device will show up with a Question Mark in the Network View. To install the EDS file into RSLinx, you need to: 1. Shut Down RSLinx. 2. Use the EDS Hardware Installation tool to load the EDS file. 13

Agenda § § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC

Agenda § § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC EDS file and RSLinx RSNetworx for Ethernet/IP Watch-Outs Sample Program - Floating Point - Integer § § Shared Data Access Troubleshooting Assessment Exercise 14

RSNetworx for Ethernet/IP is primarily used for: § § Set up Device Level Ring

RSNetworx for Ethernet/IP is primarily used for: § § Set up Device Level Ring (DLR) topology Set up Producer/Consumer network data Set up I/O Scanner (rack) Monitor or troubleshoot a network. With Industrial Terminals, we are not concerned about those things. So, we won't use RSNetworx for Ethernet/IP 15

Agenda § § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC

Agenda § § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC EDS file and RSLinx RSNetworx for Ethernet/IP Watch-Outs Sample Program - Floating Point - Integer § § Shared Data Access Troubleshooting Assessment Exercise 16

Rememeber this Ethernet/IP Gotch-ya! WARNING!!! Not all PLC's can use Ethernet/IP cyclic data!!! SLC

Rememeber this Ethernet/IP Gotch-ya! WARNING!!! Not all PLC's can use Ethernet/IP cyclic data!!! SLC Micro. Logix 1200 Micro. Logix 1000 Micro. Logix 1400 These PLC's can only use discrete (also known as explicit or acyclic) message instructions. These PLC's should NOT directly control a feed themselves (the weight data comes back too slowly and with unpredictable time delays), but should use the onboard target logic of the Terminal.

And this … The EDS - Add On Profile Control. Logix (version 20 and

And this … The EDS - Add On Profile Control. Logix (version 20 and higher) has a feature that allows AOP's to be created from a device's EDS file. DO NOT USE THIS!!! At present, the EDS Hardware Installation Tool does not handle the many different configuration possibilities of Mettler-Toledo's terminals. The result is an AOP that will not function as expected. Instead, use the Custom AOP 18

Agenda § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC RSNetworx

Agenda § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC RSNetworx for Ethernet/IP Sample Program - Floating Point - Integer § § Shared Data Access Troubleshooting Assessment Exercise 19

Define a Floating Point IND 780 using the AOP Leave only "Communication" checked Enter

Define a Floating Point IND 780 using the AOP Leave only "Communication" checked Enter a name Enter the IP Address Check only "Mettler-Toledo" Click "Change" to setup the module Select Format Select "New Module…" Select IND 780 Ethernet/IP Select how many message slots 20

AOP I/O Data Tags Integer Floating Point Select "Controller Tags" and then Right Click

AOP I/O Data Tags Integer Floating Point Select "Controller Tags" and then Right Click "Monitor Tags" Data. Select FROM IND 780 Data TO IND 780 21

Agenda § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC RSNetworx

Agenda § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC RSNetworx for Ethernet/IP Sample Program - Floating Point - Integer § § Shared Data Access Troubleshooting Assessment Exercise 22

Floating Point Program First, we're going to go over the Floating Point program sample.

Floating Point Program First, we're going to go over the Floating Point program sample. The Floating Point example is contained in this subroutine. The Floating Point example uses this Ethernet/IP Module 23

Floating Point: Rung 1 For a detailed explanation of the Data OK and the

Floating Point: Rung 1 For a detailed explanation of the Data OK and the Data Integrity bits, see this discussion: Industrial Terminal Overview. pptx - Floating Point Special bits Check the Terminal Status Check the Data Integrity "Controller Tags" View Note that the CPS instruction automatically copies BOTH FPdata 1 and FPData 2 into the Floating. Point_Data Tag. Also note the use of a SYNCHRONOUS Copy Instruction to make sure that we get BOTH words of data at the same time! 24

Floating Point: Rung 2 For a detailed explanation of the Command Acknowledge, see this

Floating Point: Rung 2 For a detailed explanation of the Command Acknowledge, see this discussion: Industrial Terminal Overview. pptx - Floating Point Command Acknowledge When the IND 780 receives a command from the PLC, it changes the states of the Cmnd. Ack 1 and Cmnd. Ack 2 bits in the message slot Command status word. "Controller Tags" View The program uses these bits to drive a Command Acknowledged bit that will be used in later rungs 25

Floating Point: Rung 3 causes the PLC program to mimic the operation of the

Floating Point: Rung 3 causes the PLC program to mimic the operation of the Terminal in that the value in the command register being transmitted to the terminal must change before the terminal will act on the command. This rung copies the new command to the Command Output tag… … and the command data (if any) to the Output Data tags. "Controller Tags" View 26

Floating Point: Rung 4 Each command bit - initiates a move that transfers a

Floating Point: Rung 4 Each command bit - initiates a move that transfers a Floating Point Command value into the "Command" Tag, which is processed on the previous rung (rung 3 – see previous slide). When the Command is acknowledged (see rung 2, 2 slides back - the bit that triggered the command sequence is cleared. The "IND 780_Data_Displayed" value - is generated on the next rung. 27

Floating Point: Rung 5 For a detailed explanation of the Floating Point Indicator, see

Floating Point: Rung 5 For a detailed explanation of the Floating Point Indicator, see this discussion: Industrial Terminal Overview. pptx - Floating Point Indicator The 5 Floating Point Input Indicator bits Should be treated as an Integer value between 0 and 31. This rung converts the bits - into an Integer value. "Controller Tags" View 28

Agenda § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC RSNetworx

Agenda § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC RSNetworx for Ethernet/IP Sample Program - Floating Point - Integer § § Shared Data Access Troubleshooting Assessment Exercise 29

Integer Program Now we'll go over the Integer program sample. The Integer example is

Integer Program Now we'll go over the Integer program sample. The Integer example is contained in this subroutine. The Integer example uses this Ethernet/IP Module 30

Define an Integer IND 780 using the AOP Leave only "Communication" checked Enter a

Define an Integer IND 780 using the AOP Leave only "Communication" checked Enter a name Enter the IP Address Check only "Mettler-Toledo" Click "Change" to setup the module Select Format Select "New Module…" Select IND 780 Ethernet/IP Select how many message slots 31

Integer: Rung 1 Reading basic data from the Terminal "Controller Tags" View Value that

Integer: Rung 1 Reading basic data from the Terminal "Controller Tags" View Value that converts the Integer data to Floating Point data. The value is hard coded by the program. The Update. In. Progress is similar to the Data Integrity bit in that it indicates that the IND 780 is currently updating the buffer and that the data should not be used. Check the Terminal Status with the Data. OK bit. Calculated Working Data based off of Integer data from the terminal and the hard-coded 'Increment' value. If the Data. Ok bit is off, flag the problem by writing -9999. 0 to the Working Data. 32

Integer Program Command to Tare the Scale To cause the scale to Tare, set

Integer Program Command to Tare the Scale To cause the scale to Tare, set this bit to 1 (true) either from an operator interface, or from the PLC program. Then the flag is cleared here As a result, the Integer number 32 (bit 5 = On) is moved to the Command Word Output. The scale should Tare immediately 33

Integer Program Commands to Clear and Zero the Scale Then the flag is cleared

Integer Program Commands to Clear and Zero the Scale Then the flag is cleared here To cause the scale to Clear the Tare, set this bit to 1 (true) either from an operator interface, or from the PLC program. As a result, the Integer number 16 (bit 1 = On) is moved to the Command Word Output. To cause the scale to Zero, set this bit to 1 (true) either from an operator interface, or from the PLC program. As a result, the Integer number 128 (bit 7 = On) is moved to the Command Word Output. Then the flag is cleared here The scale should respond immediately to each command. 34

Integer Program Commands to return different kinds of data. These commands work like the

Integer Program Commands to return different kinds of data. These commands work like the previous rungs This MOV command is used only to display the data coming back from the Terminal. Set the corresponding bit for the desired data Move the corresponding command into the Command Output register Then clear the command flag 35

Integer Program Command to do a Preset Tare Again, this works like the previous

Integer Program Command to do a Preset Tare Again, this works like the previous commands – with one change But we have an additional step where the amount that we want to Pre-Tare by is moved to a Staging Variable where it can be converted to units that the scale will understand. See the next rung. To cause the scale to do a Preset Tare, set this bit to 1 (true) either from an operator interface, or from the PLC program. Then the flag is cleared here As a result, the Integer number 8 (bit 3 = On) is moved to the Command Word Output. 36

Integer Program Normalize the Floating Point Data Output This rung converts the Floating Point

Integer Program Normalize the Floating Point Data Output This rung converts the Floating Point data to Integer Data so it can be written to the Terminal The data to be converted is in this "staging variable" Divide the "staging variable" by the same value we used to convert the incoming Integer data to Floating Point. The result goes to the Output data register, which is written directly to the Terminal. 37

Agenda § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC RSNetworx

Agenda § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC RSNetworx for Ethernet/IP Sample Program - Floating Point - Integer § § Shared Data Access Troubleshooting Assessment Exercise 39

Shared Data Access is nearly identical to what we did for Control. Net. But

Shared Data Access is nearly identical to what we did for Control. Net. But let's review the whole thing anyway. Shared Data is memory reserved inside of the Terminal that holds configuration and process information, and it is updated constantly. Shared Data Gross Weight Request Units NET Weight 0. 001 KG Rate Units The PLC can Read from OR Write to Shared Data using Discrete (Explicit) message commands. 40

Shared Data Access Overview In order to access Shared Data, a program must provide

Shared Data Access Overview In order to access Shared Data, a program must provide the following information to the Read and Write message instructions: • • Class Code Instance Number Attribute Number Length This information can be found in the Shared Data Reference Manual for each Shared Data variable. For a link to the IND 780's Shared Data Reference Manual, click here For example, here is how you would find the information for a ‘WT’ type Shared Data variable: The Shared Data Variable name is constructed from much of that information: NOTE: Other terminals such as the IND 570 and the IND 131/331 follow a similar concept. Also note: The IND 131/331 has only a small set of variables that it can access using this method. Please see Appendix B in the IND 131/331's PLC manual: 64067815_R 10_IND 131 -331_PLC_EN. pdf 41

Shared Data Access Subroutine Call The Shared Data Access sample code is run in

Shared Data Access Subroutine Call The Shared Data Access sample code is run in this subroutine. 42

Shared Data Access: Rung 1 This subroutine responds to individual request flags by triggering

Shared Data Access: Rung 1 This subroutine responds to individual request flags by triggering discrete messages. Request a Tare command be sent to the Terminal. If the instruction in not already running, trigger the message. When the message is complete, unlatch the request flag. 43

Shared Data Access: Rung 1 – Message configuration We're setting a Boolean flag. To

Shared Data Access: Rung 1 – Message configuration We're setting a Boolean flag. To do that, write a single byte with a value of 1. "Controller Tags" View Specify a Write by selecting "Set Attribute Single. " Scale Number Shared Data Reference Manual 44 Open the Message configuration by clicking here

Shared Data Access: Rung 1 – Message configuration Now all that's left is to

Shared Data Access: Rung 1 – Message configuration Now all that's left is to set the Communication Path Click the "Communication" Tab Click the "Browse" button Select the Float Terminal Click OK 45

Shared Data Access: Rung 2 – Message configuration The Clear message rung works exactly

Shared Data Access: Rung 2 – Message configuration The Clear message rung works exactly like the previous one, with one minor difference… Shared Data Reference Manual The message Attribute is set to 2 46

Shared Data Access: Rung 3 – Message configuration Reading data is very similar to

Shared Data Access: Rung 3 – Message configuration Reading data is very similar to writing… Specify a Read by selecting "Get Attribute Single. " "Controller Tags" View Data is read into an 80 Byte Buffer, 1 byte at a time. Shared Data Reference Manual When the Read is complete, the COPY instruction moves the bytes into a Floating Point variable. 47 The MOV instruction allows us to see the result.

Shared Data Access: Rung 4 – Message configuration Reading data from the Integer Terminal

Shared Data Access: Rung 4 – Message configuration Reading data from the Integer Terminal is exactly the same as reading from the Floating Point terminal with one difference: Click on Communication Click on Browse Select the Integer Terminal Click Okay 48

Shared Data Access: Rung 4 – Data Conversion Even converting the data is the

Shared Data Access: Rung 4 – Data Conversion Even converting the data is the same: When the Read is complete, the COPY instruction moves the bytes into a Floating Point variable. 49 The MOV instruction allows us to see the result.

Shared Data Access: Summary Major Points to remember for Shared Data Access Shared Data

Shared Data Access: Summary Major Points to remember for Shared Data Access Shared Data in the Terminal contains BOTH Configuration information AND Process Data, such as Weight. The PLC can Read FROM or Write TO Shared Data if a Control. Net Class has been defined for it. A Shared Data variable name contains the Instance and Attribute. Most Shared Data variables can NOT* be accessed using standard Cyclic Data. * Exception: See Templates for the fieldbus interface. Shared Data Access by a PLC is usually done using Discrete Message Instructions. The format of the data returned by a Shared Data Access is NOT affected by the selected format of the Terminal (Floating Point or Integer). The same Message instructions work on either format. You will need access to the Shared Data Reference Manual to correctly set up your message instructions. Note: The IND 131/331 has only a small set of variables that it can access using this method. Please see Appendix B in the IND 131/331's PLC manual: 64067815_R 10_IND 131 -331_PLC_EN. pdf 50

Agenda § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC RSNetworx

Agenda § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC RSNetworx for Ethernet/IP Sample Program - Floating Point - Integer § § Shared Data Access Troubleshooting Assessment Exercise 51

Troubleshooting • Look at the LED status of the module. • Use PC to

Troubleshooting • Look at the LED status of the module. • Use PC to ping for IP Addresses. • Confirm that Ethernet/IP Bridge is in correct PLC Slot. • See the device in RSLinx before trying to add it to the Network. • I/O size mismatch. • Proper Format and Message Slots defined? • Byte Order (IND 560 may be different from others)! • Check Connection Tab 'Module Fault' frame in PLC for error message. • Make sure that the Ethernet/IP network is plugged into the Ethernet/IP module, not the terminal's TCP/IP RJ-45 connector. • Make sure that user put the Ethernet/IP's IP configuration in the Ethernet/IP configuration and not the TCP/IP Network setup. • Confirm cable connections to switch and PLC. • DIP switches on Module should all be UP. • Use Generic Module or Custom AOP, not EDS AOP. • Ethernet Switch Settings (Full Duplex, 100 MBPS, Auto Negotiate). • Check for IP Address Conflict. • Cyclic works, but Explicit don't. Check MSG Connection Path settings. • Explicit Works, but cyclic don't. Check that PLC is capable of Cyclic messaging. • Check Firmware version of Ethernet/IP module in PLC Chassis. 52

Agenda § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC RSNetworx

Agenda § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC RSNetworx for Ethernet/IP Sample Program - Floating Point - Integer § § Shared Data Access Troubleshooting Assessment Exercise 53

Assessment True or False Acyclic messages are referred to as "Class 3", "Explicit", or

Assessment True or False Acyclic messages are referred to as "Class 3", "Explicit", or "Unscheduled" messages True All PLC's can transmit Implicit messages. False Shared Data Access in Floating Point Format is the same as in Integer Format. True Ethernet networks are simpler than older fieldbuses. False The PLC must be in Program Mode before scheduling the Network. False Cyclic (Implicit) data is similar to streaming data, such as voice or video. An Ethernet/IP device will work fine on the network without an EDS file. Ethernet/IP switches need to support Qo. S True IGMP Snooping can cause Multicast Storms False 54 True

Agenda § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC RSNetworx

Agenda § § § Ethernet/IP Overview Terminal Configuration Define Ethernet/IP in the PLC RSNetworx for Ethernet/IP Sample Program - Floating Point - Integer § § Shared Data Access Troubleshooting Assessment Exercise 55

Exercise – Connect a Terminal The entire class will connect their Terminals to the

Exercise – Connect a Terminal The entire class will connect their Terminals to the PLC via Ethernet/IP. Use the Industrial Fieldbus Training HMI to communicate to your device. Use Floating Point Format • Check the PLC Image. What's in the first 2 Input words? • Do a Cyclic Pushbutton Tare • Do a Cyclic Clear Tare • Do an Acyclic Pushbutton Tare • Do an Acyclic Clear Tare • Write a Value to AJ 0101 • Read back AJ 0101 • Do a Cyclic Programmed Tare • Report the Gross Weight • Report the Net Weight • Put your terminal into Setup. What happens to the status and data coming back when you change the scale value? • Put the terminal back into run, then cycle power. What happens to the Data OK bit? • Change your Terminal to Integer Format. What error is returned in the PLC Connection Tab? • Take the same IP Address as someone else. What happens? 56