Connecting CompactLogix to Simatic S7-300 via Gateway

There is a really big problem for automation engineers to “shake hands” between AB and Siemens PLCs, when it is necessary to send or receive data to/from Allen Bradley Logix PLC and Siemens Simatic S7 PLC. Of course, you can write you own code on both AB and Siemens using Modbus TCP protocol. However, the fastest way is to use an Industrial Gateway.

Prosoft Company has a lot of different gateways, almost for all existing types of industrial networks and protocols. In this article we will use PLX31-EIP-SIE gateway to make a connection for data exchange between Ethernet/IP and Industrial Ethernet protocols. We will write a small amount of code on the Studio 5000 only, and set the appropriate gateway configuration for the application. We can leave Siemens for the time being.

Below are the steps how to do this in real application examples based on experience:
  1. Create a new project in Studio 5000 based on 1769-L36ERM 5370 CompactLogix controller.

  2. Add new module to the Ethernet subnet – Prosoft PLX31-EIP-SIE industrial gateway.


    You can find it in Communication Adapter subcategory filtered by Prosoft Technology Vendor.


    If you cannot find it there then you should download and install EDS files from Prosoft Technology PLX31-EIP-SIE product’s web page.
  3. Configure new PLX31-EIP-SIE module instance in Studio 5000. In most cases, it needs you only to set an IP-address of the gateway (1).


    In addition, you may check Module Connection settings (2). This is the connection setup between CompactLogix Controller and PLX31-EIP-SIE module. You can leave all I/O connection setting on its default values. For most cases, one connection and 496 bytes for input and 496 bytes for output will cover all your needs.


    Just you finished setup of PLX31 module properties you can find the module structured tags appeared in Controller Tags.


    All the data you receive from the S7-300 PLC will be put in structured tag “PLX31_EIP_SIE:I1. And all the data that needs to be sent to S7-300 PLC will be taken from structured tag “PLX31_EIP_SIE:O1

    Let’s for example read from S7-300 PLC (absolute address in PLC memory DB1.DBD0) one 32-bit double word value (a bunch of separate bits) and write one REAL value to S7-300 PLC (absolute address in PLC memory DB1.DBD4).
  4. In this step, we will configure PLX31-EIP-SIE. To do this we need to download and install the Prosoft Configuration Builder software. You can find it on the PLX31-EIP-SIE product’s web page.

    This link will redirect you to Prosoft Configuration Builder page. You should download the latest version. After PCB installation, an empty untitled project will open and it will ask you to choose your module type. Please select PLX30 family first and then select PLX31-EIP-SIE module from drop down list. Finally, press the OK button.


    You will get a PLX31-EIP-SIE module settled in the project configuration tree. Please check module EIP connection settings. Go to EIP Class 1 Connection branch and double click on EIP Class 1 Connection 1 (this is the I/O connection 1 which you have already set up in Step 3. A connection properties window will open.



    Please pay your attention on Input Data Address (default value starts from 0) and Output Data Address (default value starts from 2000). These values you should take in an account when you configuring connection rows for read and write data. Input and output sizes are equal to 248 bytes by default. You may leave all setting on its default values.

    After this, you should setup a client connection for S7-300. You can have here up to 20 client’s connections and up to 16 data connection rows (commands) in each connection. Expand SIE Client 0 branch and double click on SIE Client 0 Commands.


    A client’s commands setup window will open. We will setup there two separate commands for read and write data from S7-300 PLC. To setup command press the button Add Row.


    A data connection row (command) will appear in the empty field of the window. Then double click on it or press the button Edit Row to setup command parameters.


    A window with command settings will appear.


    Detailed information about each line of settings you can find in the definition area of the window. Key moments are the following:
    Enable: for eventually non-periodical access, doesn’t matter for reading or for writing access, we should select here the value Conditional Write.
    Internal address: start address in structured tag, from which your data will have been put in. In case of 0 value here your data in PLX31 input tag structure will start from PLC31_EIP_SIE:I1.Data_1
    Poll interval: we should leave the value 0 for eventually reading
    Reg Count: – quantity of 16-bit which we are reading from Siemens PLC. For example to get one 32-bit value (DWORD, DINT or REAL) we should set the value 2 in the Reg Count property.
    Slot: slot in a rack where CPU has been placed. For S7-300/S7-400 PLCs you should set here the value: 2, for S7-1200/S7-1500 PLCs you should set the value: 1.

    In the same way, we configure a command for writing data to S7-300.


    There is only one key moment you should pay your attention for is the Internal Address value. For output data, it should start from 2000. In case of 2000 value here, your data in PLX31 output tag structure will start from PLC31_EIP_SIE:O1.Data_1. After this we download all changes to the gateway via Download from PC to Device menu item:
  5. In this step, we will test S7-300 and 1769-L36ERM data exchange. In Simatic Step7 we will use a variable table VAT_1 for control data values:




    First we send a value 16#EF00ABCD to CompactLogix. Data from S7-300 in Logix Designer CompactLogix PLC tags:


    Data for CompactLogix in Step7 Simatic S7-300 PLC variables:


    Then we send a value 3.1415 to S7-300. To do this we need to use one temporary REAL controller tag in_temp and one INT[2] array controller tag temp, and compute them with COP and MOVE instructions. We break one REAL tag in_temp into two INT tags temp[0] and temp[1].



    Data for S7-300 in CompactLogix PLC tags:


    Data from CompactLogix in Simatic S7-300 PLC variables:


    We have successfully tested data exchange between CompactLogix and S7-300 PLCs via Prosoft Industrial Gateway PLX31-EIP-SIE.

Comments

Popular Posts