technical application note - electrical sector – eaton · • rslogix5000 and rsview programming...

7
Technical Application Note Using 105U/905U-G wireless gateways with an AB CompactLogix PLC Purpose This application note provides information on configuring the ELPRO 105U and 905U-G-ET1 gateways communicating EtherNet™ IP with an Allen-Bradley CompactLogix™ Series PLC. We recommend that you read this application note along with the 105/905U-G user manuals for details on powering and programming the gateways. This document assumes that you have a firm understanding of the EtherNet IP protocol available from ODVA (see www.odva.org) and AB CompactLogix Series PLC programming. Network example overview There are two ways to exchange data between the gateway and PLC. The first is by adding the gateway as a module to the PLC. This approach limits you to one input (consumed) instance of 256 words and output (produced) instance of 256 words. The second method is by creating a message instruction and tags to view the remaining I/O instances. The 105/905U-G can simultaneously handle up to six produced and six consumed connections, each of 256 words. This application note shows the first method—that is, adding the gateway as a module to the PLC. Materials This application uses the following materials: AB CompactLogix L35E PLC RSLogix5000 and RSView programming software 105/905U-G gateway EDS file for 105/905U-G E-Series Configuration Utility RS-232 DB-9 serial cable RJ-45 Ethernet cables and network hub (depending on connection crossover cables may be needed) Configuring the 105/905U-G gateway 1. Set the module’s IP address under Ethernet Settings. If you are going through a network, you also need to enter this address in the Gateway Address field. 2. Make sure that the Enable Ethernet/IP check box is selected and the Enable Modbus ® Server check box is not selected. 3. To exchange data between the 105/905U-G and PLC, make a series of fieldbus configurations that link the I/O registers of the gateway to the fieldbus (PLC). In this example, the local onboard digital I/O will be written to registers 4306, 4307 and read from registers 4320, 4321 on the PLC. The following configuration shows the two fieldbus mappings to input instance 1 and output instance 1.

Upload: doanxuyen

Post on 15-Nov-2018

231 views

Category:

Documents


0 download

TRANSCRIPT

Technical Application Note

Using 105U/905U-G wireless gateways with an AB CompactLogix PLC

PurposeThis application note provides information on configuring the ELPRO 105U and 905U-G-ET1 gateways communicating EtherNet™ IP with an Allen-Bradley CompactLogix™ Series PLC. We recommend that you read this application note along with the 105/905U-G user manuals for details on powering and programming the gateways. This document assumes that you have a firm understanding of the EtherNet IP protocol available from ODVA (see www.odva.org) and AB CompactLogix Series PLC programming.

Network example overviewThere are two ways to exchange data between the gateway and PLC. The first is by adding the gateway as a module to the PLC. This approach limits you to one input (consumed) instance of 256 words and output (produced) instance of 256 words. The second method is by creating a message instruction and tags to view the remaining I/O instances. The 105/905U-G can simultaneously handle up to six produced and six consumed connections, each of 256 words. This application note shows the first method—that is, adding the gateway as a module to the PLC.

MaterialsThis application uses the following materials:

• AB CompactLogix L35E PLC

• RSLogix5000 and RSView programming software

• 105/905U-G gateway

• EDS file for 105/905U-G

• E-Series Configuration Utility

• RS-232 DB-9 serial cable

• RJ-45 Ethernet cables and network hub (depending on connection crossover cables may be needed)

Configuring the 105/905U-G gateway1. Set the module’s IP address under Ethernet Settings.

If you are going through a network, you also need to enter this address in the Gateway Address field.

2. Make sure that the Enable Ethernet/IP check box is selected and the Enable Modbus® Server check box is not selected.

3. To exchange data between the 105/905U-G and PLC, make a series of fieldbus configurations that link the I/O registers of the gateway to the fieldbus (PLC).

In this example, the local onboard digital I/O will be written to registers 4306, 4307 and read from registers 4320, 4321 on the PLC. The following configuration shows the two fieldbus mappings to input instance 1 and output instance 1.

2 Technical Application Note September 2014 www.eaton.com

The following example shows a command type read from the fieldbus interface to the gateway. This comes from the PLCs output tags.

The next command type write mapping (shown below) is to the fieldbus interface where the PLC will read this value and store in its input tags.

4. After completing the mappings, download the configuration to the module using an RS-232 cable, as described in the user manual.

Configuring the PLC1. Load the EDS file for the 105/905U-G into RSLinx using

the RSLinx Hardware Installation Tool Wizard.

The EDS file provides the PLC with the EtherNet/IP interface parameters of the 105/905U-G. You can download the EDS file for the 105/905U-G from www.eaton.com/wireless.

2. In the Wizard, click Add and browse to find the location of the ESD file. Select the option to register it as a single file.

After you load the file, a message indicates whether the file loaded correctly.

3. After the EDS file is loaded, configure a driver to communicate to the gateway by selecting Communications>Configure drivers from the main RSLinx menu bar.

4. Select Ethernet Devices and assign the IP address of the 105/905U-G-ET1 gateway to the configured driver.

3Technical Application Note September 2014 www.eaton.com

5. After the EDS file is loaded and opened in RSLinx, expand the workstation to locate the 105/905U-G.

The 105/905U-G is identified in RSLinx as an Anybus-S EtherNet/IP device.

6. Open RSLogix and create a new project file.

7. Under I/O Configuration, right-click the PLC Ethernet port and add a new module. Then, select Generic Ethernet Module from the list.

This makes the 105/905U-G EtherNet/IP connection available to the PLC.

8. Enter the parameters of the 105/905U-G in the Module Properties screen.

The IP address is the same as the IP address used in the E-series Configuration Utility.

9. Examine the Comm Format and Connection Parameters closely, and enter values with respect to the fieldbus configuration you made earlier.

The Comm Format parameter determines the size of the register for the Connection Parameters. Data –INT is a 16-bit register, which is the same size as the 105/905U-G registers.

10. For Connection Parameters, assign which input instance and output instance you want to read and write from the 105/905U-G.

• Input: the input assembly instance 100 is input instance 1 on the 105/905U-G.

• Output: the output assembly instance 150 is output instance 1 on the 105/905U-G.

ote:N The size of the registers that you will be transferring must be less than or equal to the amount in the fieldbus configuration, otherwise an error will occur because the PLC will attempt to read or write from a location that does not exist in the 105/905U-G.

In the fieldbus configuration of the 105/905U-G, two words are transferred to the input area and two words are transferred to the output area, so the size for the input and output in this configuration will be two, with a Comm Format of Data - INT.

• Configuration: this parameter is not supported by the 105/905U-G, but you must enter a value to proceed with the configuration.

11. Click Next and enter the RPI time of 50 ms.

The RPI time is the time interval that the PLC requests data from the gateway module. It must be adjusted to suit the application. Note that network traffic may be increased if you use a fast packet interval time.

RSLogix now has the 105/905U-G setup in the current project, which you can see under I/O Configuration in the PLC project.

4 Technical Application Note September 2014 www.eaton.com

12. To view and write data to the 105/905U-G, download the project to the PLC, and then select Controller Tags from top of the project tree.

905U-G-ET1

13. To view the inputs to PLC, expand “I & O” data fields, select the style as “Hex”, and expand again to see the two words.

The “I” data tag will show values when the local DIO 7 and DIO 8 are turned on from the gateway. If a value is entered in the O data tag it will be sent to the 105/905U-G. A value of FFFF will turn on one of the local digital outputs, as configured in the E-Series Fieldbus Configuration.

Gateway inputs will

change inputs

Changing these outputs will turn on gateway outputs

Using online diagnostics for debuggingYou can view the current values in the ELPRO registers and debug any problems by using online diagnostics over an Ethernet connection.

1. Select Ethernet Settings in the configuration utility. Then, select Debug I/O Regs and confirm that you want to debug the I/O registers at the IP address.

2. On the Register Selection screen, select Connect.

3. Make sure there is a green connected box below the Connect/Disconnect buttons, indicating that you have a valid Ethernet connection to the 105/905U-G from the software.

4. From the I/O location bar on the left, scroll down to I/O registers 4300–4399.

5. Select the Continuous check box, and then select Read.

The E-series configuration utility continuously scans the I/O database for changes from the PLC or from the gateway radio. The I/O database is the link between the gateway radio and the PLC / fieldbus interface.

When a value is sent from the PLC to the gateway using the configuration described here, registers 4320 and 4321 will indicate FFFF for ON and 0000 for OFF. Registers 4320 and 4321 are tied to local digital output LEDS 1 and 2 located on the top of the gateway radio. When the register is FFFF, the digital output LED is ON.

When a value is sent from the gateway to the PLC, the value will be from registers 4306 and 4307. When the register is FFFF the PLC input is ON, and when the

5Technical Application Note September 2014 www.eaton.com

register is 0000 the PLC input is OFF. Registers 4306 and 4307 are tied to local digital inputs 7 and 8 located on the top of the gateway radio. When digital inputs 7 or 8 are physically turned on by linking the input and GND terminals together with a switch or piece of wire the input will be ON.

Internal status registers

Additional register values that you can see in the debugging described here are internal status registers, such as:

• I/O register 4308 (low battery volts)• I/O register 4309 (gateway supply volts)• I/O register 4310 (battery supply volts)• I/O registers 4330–4333 (gateway system clock)

These registers are information only and can be used in projects for alarm indications for loss of gateway supplies.

Note that this application note uses the local digital inputs for testing communications. A digital input is either on or off, and depending on the format, you read it as in the PLC. For example, hexadecimal, discrete or decimal will always be the same for on (FFFF, 1, 65535) and off ( 0000, 0, 0) . When transferring integer values—such as values for level, pressure, and temperature—the values will always be different.

Byte order

The 105/905U-G uses a Motorola Brand processor, and Allen Bradley PLCs use Intel processors. The common problem between these two types of processors is that the byte order is swapped (big endian, little endian). For example, if the value of ABCD is stored in the 105/905U-G this is shown as CDAB in the PLC tag database. There are ways of correcting this depending on the gateway firmware version, which can be found in the module serial number located on the underside of the module. The firmware version is written in digits 5 through 7 of the serial number. For example, a module with serial number 04051709468 has firmware version 1.70.

For Firmware versions 1.70 or higherWhen creating a fieldbus mapping, you can select the byte order. You can have the byte order swapped in the configuration software so the PLC sees the correct value, or you can leave it as-is and use the PLC logic to perform a swap byte function.

If you are using the configuration software to swap the bytes, when you create a fieldbus configuration mapping make sure that the MS Byte First check box is not selected. This allows the actual byte order to be swapped.

For Firmware versions below 1.70For all other firmware versions, byte swapping must be performed in the PLC configuration. In RSLogix 5000 there is a Swap Byte (SWPB) function located under the Move/Logical heading. This function reads the input values, swaps the byte order, and places the values in a new tag destination.

If you are transferring a large number of words, instead of performing a Swap Byte function for each word you can create a FOR instruction to repeatedly execute a routine. The following example shows the big-endian routine looped for a list of 100 I/O points under the Terminal Value section. If you are transferring 200 I/O points, you would put a value

6 Technical Application Note September 2014 www.eaton.com

of 200 or higher in this section. This routine is big endian, which is the Swap Byte instruction.

The index of Loop is a program tag set up in the main program under tasks.

The following example shows a value of hexadecimal ABCD entered into the gateway register 0. This is read into the PLC as CDAB.

After the swap byte order routine is complete, the corrected value is placed into the destination tag.

Eaton1000 Eaton BoulevardCleveland, OH 44122United StatesEaton.com

© 2014 EatonAll Rights ReservedPrinted in USASeptember 2014

Eaton is a registered trademark.

All other trademarks are property of their respective owners.

North America & Latin America5735 W. Las Positas Suite 100Pleasanton, CA 94588United StatesTelephone: +1 925 924 8500

Southeast Asia2 Serangoon North Avenue 5# 06-01 Fu Yu Building, 554911SingaporeTelephone: +65 6645 9888

Australia, New Zealand9/12 Billabong Street Stafford Queensland 4053 AustraliaTelephone: +61 7 3352 8600

EuropeHein-Moeller-Straße 7-1153115 Bonn, GermanyTelephone: +49 228 602 5573

China955 Shengli RoadEast Area of Zhangjiang High-Tech ParkShanghai, 201201ChinaTelephone: +86 21 2899 3600

Eaton’s wireless businesswww.eaton.com/wireless