Art.Nr. 9359-LAN

 Traeger Industry Components GmbH

© by TIS

documentation of version 1.x/2.x/3.x


1 Description

The S5-LAN++ module connects the computer over network with a S5-PLC.
It includes a multiplexer for the S5-PLC, so you would be able for e.g. to read or write data with a visualization or production data acquisition and make parallel program-changes.
Attention: Please note, that the reaction time of the PLC will be increased, because now are running several communications parallel and they must be all processed with the PLC.

If the computer is connected direct to the module or over WLAN or over a VPN-connection, this is equal to the module. It is only important, that the connection is not broken or not to slow.
Before the use of a VPN-connection, you can make following test. Build-up the VPN-connection and send a ping to one client in this network. For timings of maximum 400ms you can be sure, that the communication to the module and connected PLC should be OK.
With version V1.20 and newer the module transfers in the AS511-protocol an identifier that it the conversation partner is a S5-LAN++-module. This information can by the communication-driver IP-S5-LAN-link be recognized and evaluated.

With the S5-LAN++-module you are capable to build up a coupling from a S7-PLC with Ethernet-CP (integrated or as a supplementary module) to a S5-PLC. In this case you will use the Siemens-function “PUT/GET”. You configure this connection in your PLC, but now the IP-address of the S5-LAN++ is the IP-address of the configured partner.
You can find a documentation and sample project for “PUT/GET” in the hotline-section of the Siemens website, click here to reach it.

2 System requirements

Windows

  • 10
  • 8
  • 7
  • Vista
  • XP
  • ME/NT/2000

PLC - programming software (e.g. PG2000, Step© 5, S5 for windows, WinCC) PLC - VCOM Software

Networkcard 10/100MBit 24V power supply (Phoenixbush or TTY-Interface)

  • S5-90U with external 24V-supply
  • S5-95U with external 24V-supply
  • S5-100U with external 24V-supply
  • S5-115U
  • S5-135U
  • S5-155U
  • Sinumerik 810 / 880 (only DB-access read/write)
  • COMCON 110 from Berthel

Module is not found in the S5-LAN-Manager though a network connection Module supplied with voltage, is the large green LED on/flashing?
Switch of the firewall in your PC and search again. This could block the communication to the module.

No PLC-communication possible?
Module supplied with voltage? Is the large green LED flashing (PLC not recognized/found), please checking the wiring/current-loop-sources

Is the PLCVCom started? Is PLCVCom connected with the module? Step5-Software reports system-error 0334h
Was the S5-patch for the module and PLCVCom installed? Is used COM-port a real COM-port (virtual COM-ports (USB-RS232-converter, PC-cards) are not recognized and used directly from Step5)?

3 Connecting options

S5-LAN++ module direct connected with the PC.
s5-lan_direkt.jpg
S5-LAN++ connected with the PC over a Switch or Hub.
s5-lan_switch.jpg
S5-LAN++ connection possibilities with CrossLink-cable
s5-lan_disw.jpg

4 Installation

The S5-LAN + + module is connected directly to the PLC. About the network connection of the module, the PLC can be connected as follows:

S5-LAN + + to switch / hub
Here, the network cable is plugged from the S5-LAN + + module to the switch / hub. If you use a crosslink cable, plug this cable to the uplink port on the switch / hub. Use a switch with auto-negotiating function, so you can plug the network cable into a free port on the switch.

S5-LAN++ to PC
In this variant, you must use a crosslink cable. This plug with one end into the module and the other end into the network card.

The PLC provides the module with voltage. Alternatively, the module can be also connected to an external supply 24V/DC (if the PLC has no 24V/DC eg AG and AG-95U-100U).

To establish a communication with the PLC, please install the PLC - VCOM software as described in the chapter “ PLC-VCOM Installation ”.

In addition you need programming software (eg PG2000, Step©5, S5 for Windows, WinCC) to work with the PLC.

4.2.1 Installation and usage of S5-LAN++-module under Win98

To work with the S5-LAN++-module under Win98, you need following software tool:

  • PLCVCom - virtual COM-port

The installation of the PLC-VCOM-software is explained in section „PLC-VCOM Installation“.

Attention !
Please note that the generated virtual COM-port is between COM1 to COM4. COM-ports higher than COM4 are not supported by the Step5-software!

Before starting the installation, make sure to stop any possible running S5-software, otherwise the driver could not be installed.

If you have installed the PLCVCom on your PC, proceed as follows:

  • Open the PLCVCom and click the button “Configure”
  • Activate “Input manually”
  • As soon as you have selected now as LAN-Type “S5-LAN++” a new controll-button “MSDOS-Box access” is visible. Please activate this also. Now enter the IP-address of the S5-LAN-module under “IP address” and with a click on “OK” the configuration would be acceded.

Now the virtual COM-port is set and activated, so you can go with your Step5-software via COM1 … COM4 (depending on which COM port was selected for the virtual COM-port) ONLINE.

4.2.2 Installation of the Step5 © addition driver for PG-USB/S5-LAN + + / USB-RS232-converter

In order to make the the PLC-VCOM furnished virtual COM interface available for Siemens Step © 5 in the DOS box, must be installed this addition driver.

! Important ! PLC-VCOM must be installed before this Step © 5 addition driver. The installation of the PLC-VCOM software is explained in the chapter „PLC-VCOM installation“ .

Before you start the installation, make sure to stop any possible still running S5 original software, otherwise the driver can not be installed.

1. Please download from the you known web-site the “S5-patch” and extract the file on your PC.
2. Now start the application “S5USB.exe” from the previously extracted folder
s5patch2.jpg
3. Device selection Now select the type of device. Select “S5-LAN + + / PG-USB-cable / USB-RS232-converter” and confirm with “OK”.
s5patch1.jpg
4.In the next dialog, start the installation by clicking on the “Install” button. The installation wizard will now copy the required data. Please wait a moment.
5. Specify the folder where the software S5 is installed. Please wait while the installation routine searches for the S5 software version.
6. Next, select the COM port and click “OK”.
7. Soon as the installation is complete, you press “Finish”.
8. When the “Install” button is disabled (gray font), the installation is complete.
9. Now close the wizard with “Finish”.
With “Uninstall” you delete the already installed drivers.

If the COM port of the PLC-VCOM is changed afterwards, the Step5 © drivers must be reinstalled!

Attention!
For the Step5 Siemens software the COM port must be are between COM1 and COM4. Check and correct it if necessary.

To do this go into the Control Panel, then into system, select the hardware tab and click the button Device Manager. In the Device Manager under “Ports (COM & LPT)” appears the virtual COM port “USB Serial Port (COMx)”.

Right click on the USB Serial Port and then select “Properties” in the context menu. There you click on the tab “Port Settings”. In the next dialog you select the button “Advanced” and in the following dialog the COM port can be selected.

5 Control elements

s5lan.jpg

The network LED's (10MB left / 100MB right) behave the same.
LED off: connected to no network.
LED on: network connected (LINK).
LED blinking: communication over the network.
State of S5 communication (green-round LED)
LED off: device is off or in boot state.
LED on: module reports AG online
Reset button for factory settings
The best solution to reset of the hardware configuration you trigger with a straight bent paper clip.
Push the paper clip into the hole and after 2 seconds the S5 communication LED starts to flicker.
Now you can remove the paper clip. The module makes a reset and starts with the configuration “DHCP / AutoIP” and “auto Subnet”. When the LED shines the module is ready for operation again.

6 Implementing

Connect your module as described in the chapter “ Hardware installation ” to the PLC and to the programming device or to your computer.

If you want to respond to a PLC via the module you have to comply the requirements as descript in the chapter “system requirements” . In addition,please make sure that the module is properly connected

1. Start the S5-LAN Manager from either the start menu or from the PLC-VCOM menu under “Configuration” ⇒ “S5LAN”
s5lanmanager1.jpg
2. Click on “Local searches” to display the modules that are available in your network.
3. Click on a found module, to select it and mark it blue.
4. To change the settings of the S5-LAN + + module, click on “Settings”.
s5lanmanager2.jpg
5. If desired enter here a name for your S5-LAN + + to make it easier to recognizable the PLC-VCOM. In addition, please enter an IP address and a subnet mask, if your network has running a DHCP server.
6. to save the settings, click “OK”

More information about the S5-LAN Manager, see the chapter “configuration

(The PLC-VCOM is only needed if your module is not connected via the 9 pin COM port to the computer. For products with USB, Ethernet connection, etc., the PLC-VCOM is required)

1. Start the PLC - VCOM application (If it has not already started yet).
2. Click in the main window of the PLC-VCOM, in the status area “configure”. The configuration wizard will start.
3. It lists all the found modules / cables and the additional information’s such as IP address and MAC address of the module.
4. Choose the desired MPI cable and click „OK“ to go on.
5. If the connection is established the chosen cable is shown in the section state and on the left side you can see the status connected.
6. It also displays, the PLC-VCOM the IP address for the module and the IP address of the computer which is connected to the module.

If you have any promlems with the use of PLC-VCOM software, go to the chapter PLC – VCOM and look there for operating instructions.

After you have adjusted and connected the PLC-VCOM or the programming adapter to the COM-port on your computer, you will be able to connect with your programming software
to the PLC and work with it.

How you have to adjust your programming software is described in the following points:

6.3.1 S7-TCP/IP to S5-LAN++

The S5-LAN++ behaves like an CP 343-1 or like a HMI-ProfiNet-connection. Therefor use the same configuration like a connection wih Simatic S7 300/400 over TCP/IP.

bild1.jpg
For S5/S7 enter server-port 102 in the S5-LAN++!
In default settings this port is already on 102. Choose for the communications driver in the WinCC-flexible the SIMATIC S7 300/400 like in the picture shown. In the PLC you have to enter the IP-address of the S5-LAN++. Put the type on”IP“. Rack- and slotnumber arn't significant for operation with the S5-LAN++. Just enter the standards: Rack 0, Slot 2.

Pay attention, that the settings of the access point (S7ONLINE) are correct. Settings can be done in the control panel “PD/PC-interface settings”. Take care, that you choose an adapter which supports TCP/IP.

bild2.jpg
Important! Important!
The addressing
The conversion from S5-Float (KG-format) to S7-Float (IEEE 754) happens automatically in each direction. Therefor use a variabletype with IEEE 754.
The addressing for flag, imputs, outputs, timer and counter are indentical for S5 and S7. However, there are some difference between the datablocks. The addressing of the datablocks adapted to the S7.
Example:
DB10 DW 10 (S5) is addressed with DB10.DBW20 (S7). Thats because the S7 addressed principle bytes. If you want to read one single byte e.g. DB10. DL4 (S5) you have to address DB10.DBB8. There are: even byteaddress = DL, odd address = DR in the DB of the S5.
Here some address-examples

Simatic S5 Simatic S7 Format
MB 11 MB 11 Byte
MW 20 MW 20 Word
DB10 DW 9 DB10 DBW 18 Word
DB10 DW 60 DB10 DBW 120 Word
DB10 DL 3 DB10 DBB 6 Byte
DB10 DR 3 DB10 DBB 7 Byte
DB10 DD 25 DB10 DD 50 DWord
DB10 DD 35 DB10 DD 70 Real

How to address a DX (advanced DB e.g. 135)?
If a DX have to addressed in a e.g. CPU 135, the rule is:
DB-number 1-255 = DB, DB-number > 255 = DX

6.3.2 PG2000 für S5 (V5.10)

1.Start the PG 2000 software by using the desktop link or by using the application entry in the start menu.
en_pg1.jpg
2. Choose from menu “View” ⇒ “S5 155U-90 …” In the menu “Options“ click “Interfaces“.
en_pg2.jpg
3. A dialog appears. In the section “Interface“ you can configure the “PLC – Interface“ (COM – Port).
4. Set in the section “Bus grip” the tick “Grip allways only one block from PLC”, “FB-names”, “Bst. Info” and “check “COM-Ports”
5. Save your configuration by pressing “OK“.
en_pg3.jpg
6. Now the software is ready to establish a connection to the PLC. Click the symbol “Open“ and afterwards press “PLC”. Alternative you can click “File“ - “Open“ - “PLC“.
pg4.jpg
The connection between PG 2000 and the PLC is now established. A new window appears. Now you can edit the blocks in the PLC.  

6.3.3 SIMATIC Step© 5 Manager

1. Start your SIMATIC Step© 5 Manager by using the desktop link or the application entry in the start menu.
step1.jpg
2. in the “File” menu , in submenu “project” you can the “Setting” dialog open.
3. In the tab “AG” configure the used PLC interface (example: “AS511”). Below that, you can set the COM port (example: “COM3”).
step2.jpg
step3.jpg
4. with “F3” change, the “operating mode” to “online”. The window should display the “AG-type”
5. The connection with the PLC is successfully established when the “operating mode” changes to “Online.”

6.3.4 Windows Control Center (WinCC) (v6.0)

1. Start WinCC by using the desktop link or the program entry in the start menu.
2. Choose „New” in the menu „File” or click on the white („letter”) symbol to start a new project.
en_wincc1.jpg
3. The next dialog offers you several project types „Single - User Project“, „Multi - User Project“ and „Client Project“. The next steps are describing the „Single - User Project“.
en_wincc2.jpg
4. OK“ leads you to a new dialog. Type in the „Project Name“ and the „Subfolder“ of the „Project Path“ With „Create“ the chosen configuration is confirmed.

If you want to use one of the other options, please read this further in the manual of the WinCC software.

5. Please wait until the project is created. Afterward the project content is shown in the left part of the main window.
en_wincc3.jpg
6. For a proper working communication with the PLC there must be defined how the software has to communicate with the PLC Therefore right click on „Tag Management“ to open the context menu. Choose „Add New Driver …“.
en_wincc4.jpg
7. In the dialog „Add new driver“ select the driver which fits to your PLC For a S5 PLC, you can choose the file SIMATIC S5 Programmers Port AS511.chn. If you are using a different PLC please inform yourself which driver fits with your PLC.

It is important that the chosen driver fits with the PLC otherwise the connection cannot be established.

wincc16.jpg
8. In the explorer you should see into the variable manager the branch “SIMATIC S5 PROGRAMMERS PORT”.
Expand the branch and the protocols for several connections will appear Right click on the desired connection „S5-AS511“. A context menu opens. Click on „New Connection…”.
9. Now you are able to type in the name of the connection. With a click on „Configuration“ a new dialog will appear. Set up the station address of the PLC (in this example „3“).
10. Confirm with “OK” until you are back to the main window.
11. Now you can withSoftware: Microsoft Office start the communication and with Software: Microsoft Office this end it again.

6.3.5 Direct communication with WinCC 6.0

This communication uses the H1-ISO-on TCP or RFC1006 protocol. It is used in Siemens' S5 world to communicate over Ethernet with the CP 1430 TCP. TSAP and SSAP must be specified. S5-LAN ++ accepts any name for SSAP or TSAP.

If you want to use this protocol, enter the module as S5 server port 102. The configuration of the S5-LAN ++ is explained in a short version. To configure your S5-LAN ++ module, please read the chapter ”Configuration”.

1. First, start the S5-LAN Manager via the corresponding link in the Start menu.
2. Press the “Search on local network” button and select the S5-LAN ++ module to be used for communication with WinCC.
3. Click on the “Settings” button to access the settings dialog. There you configure the “S5 server port” to “102”.
4. Confirm the entry with “OK” and exit the program.
5. In addition, you must set the PG / PC interface to set up an appropriate assignment point. Go to the system control and click “Set PG / PC interface”.
6. Under “Access point of the application”, look for “TCP_IP:”. If there is no entry, choose “<Add / Delete>”.
wincc17.jpg
7. This dialog allows you to add a new access point. Give the new access point the name “TCP_IP:” and any description (for example, “WinCC S5-LAN ++ (TCP / IP)”). Click “Add” and then “Close” the dialog.
wincc18.jpg
8. Select the network card to be used and select “TCP_IP: ⇒ TCP / IP ⇒ XXX” under “Access point of the application”, where “XXX” stands for the network card used. Save the setting with “OK”.
9. Then start WinCC 6.0. Create a new one or open an existing project.
10. In Explorer (left half of the program) you can see various project contents. Including the “variable budget”. Click on the “Variable Budget” with the right mouse button and select “Add new driver …” from the context menu.
11. Select the “SIMATIC S5 Ethernet Layer 4.CHN” file as the communication driver. With “Open” you return to the program and you can now see a change in the “variable budget”.
wincc19.jpg
12. Open the new branch “SIMATIC S5 ETHERNET LAYER 4” and right-click “S5 transport (TCP / IP)”. In the context menu, select “New Connection …”.
wincc20.jpg
13. In the Properties dialog, type a name (for example, “S5-LAN”) and use the “Properties” button to tell the connection the “IP address” of the S5 LAN. 14. In the “READ function” area, activate “Fetch Atkiv” and assign the “TSAP:” and “Foreign TSAP:” properties as in the lower section. Confirm the connection parameters with “OK”.
15. Back in the main window of the application you should see a new connection in the branch “S5-Transport (TCP / IP)” of “SIMATIC S5 ETHERNET LAYER 4”. The settings for a direct communication with WinCC have been completed.

6.3.6 Windows Control Center flexible 2004 (WinCC flexibel) (v5.2.0.0)

1. Start the WinCC flexibel 2004 software by using the desktop link or the program entry in the start menu.
2. At first click on „Create an empty project“ in the „Start page“.
en_winccflex1.jpg
3. In the „Device selection“mark the used operator panel (example: „TP 170A“) confirm with „OK“.
en_winccflex2.jpg
4. After the project has been created right click in the project window on „Connections“ of the sub menu „Communication“. In the context menu click on „Add Connection“.
5. Right in the main window appears the new tab “Connections” where you are different settings options. Important for the connection are: ⇒ the communication driver (set up which PLC you are using
(eg: „SIMATIC S5 AS511“)
⇒ select the used “CPU - type” (eg “S5 95U”)
⇒ configure the interface parameters in the section “terminal”
(eg: baud rate „9600“, Parity„even“, Data bits „8“, Stop bits „1“).
en_winccflex3.jpg
en_winccflex4.jpg
6. Now you can start with your work. If you have finished work you can transfer this project to the panel by reading the next steps.
7. Choose „Transfer Settings“ from the sub menu „Transfer”.
8. In the new dialog change the „Mode“ to „serial“ and set the „Station address“ of the operator panel (e.g. „1“). Please set the baud rate to “19200”. The “Delta transfer” is not supported by the S5-LAN. Turn them so “Off”.
en_winccflex5.jpg 9. Press the button „Transfer“ to start communication with the terminal. Your project is about to be transferred. The communication with the operator terminal is so successfully established .

6.3.7 Communication WinCC flexible with S5-LAN++

S5-LAN++ behaves like a CP 343-1 or as an HMI ProfiNet connection. So you use the same configuration as when you are connected to the Simatic S7 300/400 with TCP/IP.
Here's a short guide for setting WinCC Flexible:
1. Select in the S5-LAN++ as S5/S7 server port 102!
This port is usually by default setting ready at 102.
2. Select for a communication driver in the WinCC flexible SIMATIC S7 300/400 as shown in the picture. For the PLC you enter the IP address of the S5-LAN++. The Typ select to „IP“. Rack- and Slotnumber is for the usage with S5-LAN++ not significant. Just enter the default data: Rack 0, Slot 2.
en_winccflex8.jpg
winccflex9.jpg
3. Please note that the access point (S7ONLINE) is set correctly. The attitude you take in the Control Panel under “Set PG/PC Interface”. Make sure that an adapter with TCP / IP support is selected.
4. Addressing
The conversion from S5-float (KG-format) to S7-float (IEEE 754) is automatic in both directions. It is important to use a variable type of IEEE 754. The addressing of memory bits, inputs, outputs, timers and counters is the same for S5 and S7. However, there are differences in the data blocks. Addressing at the data blocks has been adapted to the S7.

For example:
DB10 DW 10 (S5) is addressed with DB10.DBW20 (S7).
The background is that the S7 principle addresses in byte. If you want to read a single byte, for e.g. DB10.DL4 (S5), so you have to address DB10.DBB8.
It is therefore necessary:
even byte address = DL, odd address = DR in DB of the S5. Here are some examples of address:

Simatic S5 Simatic S7 Format
MB 11 MB 11 Byte
MW 20 MW 20 Word
DB10 DW 9 DB10 DBW 18 Word
DB10 DW 60 DB10 DBW120 Word
DB10 DL 3 DB10 DBB 6 Byte
DB10 DR 3 DB10 DBB 7 Byte
DB10 DD 25 DB10 DD 50 DWord
DB10 DD 35 DB10 DD 70 Real

How can we address a DX (for e.g. extended DB135) Must be for e.g. a DX addressed in a CPU 135, then the following rule applies:
DB-number 1-255 = DB, DB-number > 255 = DX.

6.3.8 ProTool/Pro v6.0 SP2

1. Start ProTool/Pro by using the desktop link or program entry in the start menu.
2. Choose from the menu „File“ the sub menu „New“ or click on the right symbol.
en_protool1.jpg
3. The next dialog askes you which operator panel you are using. Mark the used panel (e.g. „TP 170A“)
en_protool2.jpg
4. „Next“ leads you to a new dialog. Type in the specfic fields the name of the PLC device and choose the used PLC in the driver selection (e.g. „SIMATIC S5 – AS511 V6.0“)
protool8.jpg
5. Via „Parameter…“ you are calling an configuration dialog from the chosen PLC driver Select the used “CPU type” and the “interface” to which the terminal is connected (eg “IF1 A”).
6. Furthermore you configure the parameters of the interface (“type”, “bits”, “Parity”, “Stop Bits”, “baud rate”).
7. Confirm with „OK“ until you got back to the „PLC Selection“.Go on with „Next“.
8. In the main window start the Transfer Settings dialog by clicking on „File“ „Transfer“ „Settings…“. Choose „Serial“ and the COM interface of the operating terminal (e.g.: „COM1“). set the baud rate to “19200”. Confirm with „OK“. and start with your work If you have finished working on this project you can go on with the next steps.
en_protool5.jpg
9. If you want to transfer you project to the panel you have to generate the project first. This can be done with a click on „File“ -„Compile“.
en_protool6.jpg
10. To transfer the project just click on „File“ „Download“ „Start Project Download“ or click on the right symbolSoftware: Microsoft Office.
Please wait while the project is transferred. The communication between the operator panel is now established.

6.3.9 S5 for Windows v5.02

1. Start the “S5 for Windows” software by using the link on your desktop or use the link in your start menu (standard is “Programs\S5 for Windows\S5 for Windows“)
2. Choose File - >Preferences… (top left in the menu bar) to configure the communication configuration between the computer and the PLC.
3. A new dialog appears which offers the possibility to set up a lot of configuration data about the communication with your PLC.
en_s5fw1.jpg
en_s5fw2.jpg
4. Choose the first registry card „Interface“ (standard) and set up the configuration data as descriped below: ⇒ Interface Settings from : „PC“
⇒ PLC type: „S5“
⇒ Protocol: „AS511 (Simatic - S5“)
⇒ Serial Port: Select here the COM port for the AG-access
⇒ Baud Rate: Choose the speed you want to use at the bus 4.
5. After the software is configured , click “Select PLC” in the area “MPI Converter“. A new dialog appears where you can select the desired PLC
en_s5fw3.jpg 6. In this dialog you can see all PLC´s which are connected to your PC. Choose from the list box (left) the desired station (the PLC) and confirm with “OK”. (In the example “2”)
7. Close the preferences dialog by pressing the „OK“ button.
en_s5fw4.jpg
8. Back in the main window press the „PC Block List“ button for testing the new established communication configuration.
9. Please wait a moment for the software to read the desired blocks from the PLC. The blocks will be displayed in the listbox below the menu bar (see picture to the right).
en_s5fw5.jpg
The communication between the S5 for Windows and the PLC is now established.

6.3.10 S5-gateway communication (coupling)

1. Start the S5-LAN Manager, search for your module, select it and click with the mouse on “S5-gateway connection”. This opens a dialog to set the connection.
spskopplung3.jpg
2. In the bottom of the dialog, click the link in the list you choose to configure the connection.
3. At the top you can give the connection a logical name.
4. Among them, configure the position of the “configuration data block”. For this, type in the position of the data blockin the left field (for example, “1” for DB1) and from which data word (“from DW”) ranges the configuration.
5. As “Connection Type” is set “ISO-on-TCP connection”. In this setting is used the TCP port 102.
6. The polling cycle (ms) indicates the elapsed time until the S5 the Gateway configuration area cyclically reads and examines, what is to do. when a 0 is specified then will be read constantly from the PLC.
7. In the field addresses you can only specify the IP address of the partner. The IP address of the Gateway you continue to configure S5 over the S5-LAN Manager.

If 0.0.0.0 is specified as partner IP address, the IP address is not checked when connecting. Thus any device can set up a connection that knows the TSAP of the S5 gateways.

8. On both devices you can stipulate the TSAP (Transport Service Access Point). This consists of 16 characters, and represents the identification of the connection. This is needed when several connections with an IP address are available.

Starting with firmware version 0.45 of the S5 Gateway a connection can be established with any TSAP, if the partner is specified nothing at TSAP (partner TSAP length = 0). For this the member just needs the IP address and the TSAP of the S5 gateways.

9.Communication with the “ISO-on-TCP connection” of the CP343-1 is compatible. Thus need to be coupled with S7 CP343-1 only the relevant connections are configured. Ask the TPDU size (Transport Protocol Data Unit) to “512”. This sets the maximum data size that can be received or sent.

The communication to the S5 is handled via the PG interface. There is used a baud rate of 9600 bits / second. Of course this protocol needs longer maturities. Therefore, make sure that the partner sends data to the S5 Gateway module not too quickly. Otherwise it may lead to a task traffic jam. In an exchange of about 256 bytes a transmitter switch of at least 600 ms is recommended, even better would be 1000 ms.

Communication will be configured via the S5 gateway.

6.3.10.1 Technical information for the configuration area

Format of the configuration area:

  DL DR DW
  7 6 5 4 3 2 1 0 7 6 5 4 3 2 1
receive reserved RTYP (’D’, ’X’, ’M’, ’E’, ’A’) 0  
RDBN (at ’D’ or’X’ block number) 1  
RBEG (at ’D’ or ’X’ StartDW otherwise StartByte) 2  
RLEN (Size of the receive mailbox in bytes) 3  
reserved 4
send reserved STYP (’D’, ’X’, ’M’, ’E’, ’A’) 5  
SDBN (at ’D’ or ’X’ block number) 6  
SBEG (at ’D’ or ’X’ StartDW otherwise StartByte) 7  
SLEN (Size of the receive mailbox in bytes) 8  
reserved 9
send TxLEN (send - length in bytes) 10  
TxSTAT (transmit state) 11  
reserved reserved DO
NE
ER
R
AC
T
12
receive RxLEN (receive length in bytes) 13  
RxSTAT (receive state) 14  
reserved reserved ND
R
ER
R
AC
T
15
reserved for reserved 16
Extension reserved 17  
reserved 18  
reserved 19

The individual fields in the detail:

Designation Meaning function block parameter name access
R = read W=write
RTYP Data type of the receive mailbox:
’D’ = DB
’X’ = DX
’M’ = flag
’E’ = input
’A’ = output
RTYP R W
RDBN If RTYP DB or DX block number otherwise no use. RDBN R W
RBEG The beginning of the receive mailbox. If DB and DX data word is starting, otherwise start byte. RBEG R W
RLEN Length of the receive mailbox in bytes (even if DB). RLEN R W
STYP Data type of the send mailbox:
’D’ = DB
’X’ = DX
’M’ = flag
’E’ = input
’A’ = output
STYP R W
SDBN If STYP DB or DX block number otherwise no use. SDBN R W
SBEG Beginning of the send mailbox. If DB and DX is starting - data word, or start - data byte. SBEG R W
SLEN Length of the send mailbox in bytes (even if DB). SLEN R W
TxLEN Number of bytes that should be sent. LEN R W
TxSTAT Send Status evaluate if DONE or ERR is set to 1. If DONE is 1, so the order was executed without error. STAT is 0 STAT W R
TxACT Start a send job in S5 - LAN. ACT R/W R/W
TxERR Is 1 if an error has occurred. The error can be seen in detail the STAT field. ERR W R/W
TxDONE Is 1 if the job was executed successfully end. DONW W R/W
RxLEN Number of bytes that have been received LEN W R
RxSTAT Reception status once when DONE or ERR is set to 1. If DONE is 1 the order was executed without error. STAT is 0 STAT W R
RxACT Releases the receive mailbox if 1 ACT R/W R/W
RxERR Is 1, if an error has occurred. The error can be seen in detail the STAT field. ERR W R/W
NDR Is 1 if data has been received (data received). RxLEN then evaluate. NDR W R/W

It is provided for an easy communication of the FB55 (S5L_SEND) and FB56 (S5L_RECV). In these blocks is handled the communication between the gateway and S5 PLC. The FB's have been developed based on the S5 communication FC's (FC5, FC6, AG-SEND or AG-RECV).

NOTE: These devices use 200 MW and 202 MW as used flags.

It should be noted that individual statuses ERR, DONE, NDR only lie flat one cycle for each case. It will then executed the required steps (STAT evaluate or receive mailbox empty, etc.). Please see the description of the input / output parameters in the table above.
The following states can adopt the STAT field:

STAT on call of S5L_SEND
DONE ERR STAT Meaning
1 0 0000H Job completed without errors
0 1 8304H Connection is not established
0 1 8185H Send mailbox is too small SLEN
0 1 8184H Illegal data type specified for the send mailbox
0 1 FFFFH General Error
STAT on call of S5L_RECV
DONE ERR STAT Meaning
1 0 0000H Data has been received (LEN check and get the data)
0 1 8304H Connection is not established
0 1 8185H Receive mailbox is too small RLEN
0 1 8184H Illegal data type specified for the receive mailbox
0 1 FFFFH General error

In the following example the DB20 is used as the configuration DB. E 4.0 controls the sending and E 4.1 controls the receiving. If E 4.0 is '1 ', then will be sent 10 bytes of DB100 from DW 0. E 4.1 gives free the receive shelf DB100 DW from 100 with 10 bytes.

  : SPA FB 56
Name : S5L_SEND
JDBN :   KF +00020
JDBW :   KF +00000
STYP :   KC D
SDBN :   KF +00100
SBEG :   KF +00000
SLEN :   KF +00010
ACT :   E 4.0
LEN :   KF +00010
DONE :   M
ERR :   M 11.1
STAT :   MW 20  
:        
: SPA FB 56
Name : S5L_RECV
JDBN :   KF +00020
JDBW :   KF +00000
RTYP :   KC D
RDBN :   KF +00100
RBEG :   KF +00100
RLEN :   KF +00010
ACT :   E 4.1
LEN :   MW 24
NDR :   M 13.0
ERR :   M 13.1
STAT :   MW 22

6.3.11 TIA-Portal

7 Configuration

Start the S5-LAN Manager from either the start menu or in the PLC-VCOM menu under “Configuration”
manager1.jpg
Search in local network By clicking on the “Search in local Network” you send a broadcast to all modules which are located on your network. Every Reacting module is entered into the list.
Search specific address: If you already know the IP address of the S5-LAN module you can enter these in the following dialog with a click on “particular Search address” and search for with a click on “search”.
manager2.jpg
S5 gateway connections: This dialog is displayed only for S5-gateway modules. With this it is possible to establish connections to other controllers. More details to this dialog refer to the Chapter “ S5-gateway communication (coupling) ”.
manager3.jpg
Language: Sets the language of the program between German and English.
Firmware file load: To send a firmware file, it must first be loaded. This is done by clicking the button “Load Firmware File.” It appears a dialog for selecting the appropriate *.bin (binary) firmware file. Select the appropriate firmware file and click OK. Firmware-specific information now are displayed in the section firmware info.
Send firmware: Once you have loaded the firmware file, this button is activated. Select the module and then select this button to send the firmware. NOTE: It is highly recommended only to renew the firmware of the module if you have problems with the old version of module operation.

While the firmware is transmitted to the module and the module operation version is renewed, the module may not be removed from the network or from the power, otherwise is the danger that the module does not work properly.

Settings: Click on Settings to change the properties in the following dialog of the S5 module. Click “OK” to save the new settings and close the dialog.
manager4.jpg
Name of the device The device name can be any text. So you can clearly identify each S5/S7-Modul. S5 PG port: TCP / IP port number. About this port your S5 module and PG communicate together. Must be not normally changed. (Default: 10010) S5 server port: TCP / IP port number. Over this port is handled the S5-LAN + + - LINK protocol. (Default: 2002) DHCP/AutoIP: If this box is active, at the start the module searches a DHCP server to get an IP address. If no server could be found after 3 attempts (may take a few seconds), the module will use an IP address from the “Auto IP” address range. Auto subnet: If set, the module calculates the subnet mask automatically. e.g. at 192.168.0.80 this is the 255.255.255.0. In this case nothing needs to be entered in the subnet mask field. IP adress: If DHCP / AutoIP off, here can be entered the IP address of the S5 module. Subnet mask: Here you define the subnet mask. At 0.0.0.0 as input auto Subnet is enabled. Default Gateway: Operate the LAN module on a router, you type in the IP address of the router.

Make sure that the IP address you give to your module / cable (the same if S5-LAN or LAN-MPI), match to your network and is only awarded once. Likewise the PC which communicates with the cable, should have an appropriate IP address. If you are not sure what IP address you can assign, you should contact your network administrator.

7.1.1 Ports

Port Type Description
65467 UDP Search from S5-LAN + +, by using S5-LAN Manager / PLCVCOM
10010 TCP PG port (PLCVCOM)
2002 TCP S5 server port (VIPA)
102 TCP S5 server port (RFC1006)

8 PLC-VCOM

It creates a new, virtual com-port in your system, with which the programming software of your PC (such a. PG 2000, Step© 5/7, S5/S7 for Windows, WinCC, Microwin) can communicate with the device

The PLC-VCom application is needed for use with the following devices:

• MPI-LAN Cable– Art. No.. 9352-LAN
• S7-LAN Modul – Art. No.. 9352-LANCon
• MPI-USB Cable– Art. No.. 9352-USB
• S7-USB Modul – Art. No.. 9352-S7-USB
• MPI-II Cable (USB – mode) – Art. No.. 9352 + 9352.1
• S5-LAN Modul – Art. No.. 9359-LAN
• Tele-Service (as programming adapter) – Art. No.. 9377-(ANALOG/ISDN/GSM)-OP

By installing the PLC-VCOM adiconalmente were installed the S5-LAN and the MPI-LAN. Both offer the possibility to manage the network configuration of your products

1. Download the PLCVCom from the product-page of your MPI-product and start the installation.

2. After choosing language the welcome dialog appears in the chosen language. Click “Next“ to define the installation path (see right picture). This can be done with a click “Browse…” If you are ready press “Next“ to go on.
en_install2.jpg
3. In the next dialog you can choose the program folder for your start menu.
Go on with “Next”.

8.2.1 Final configuration of the PLC-VCOM

en_install4.jpg
8. Choosing the COM – Port Already occupied COM port can be viewed in Windows Device Manager if you are not sure which COM ports are still available.  

If you are not sure which port is unused, press “OK“. Later you can start this dialog again by clicking in the application folder of your start menu on “SelectCOM”.

en_install5.jpg
9. The installation ends with a click on “OK”.

Beside your watch, in your Windows – Taskbar, appears a new Symbol. This one is for the PLC – VCom software.

It shows the actual connection status with your cable/module MPI-II, MPI-USB, MPI-LAN, S7-USB, S7-LAN or S5-LAN.

8.3.1 Status description:

status1.jpg PLC – VCom is connected with your cable/module and operational.
status2.jpg PLC – VCom is not connected.
status4.jpg The red symbol indicates that sending/receiving data has been failed.
Send status: (left field):
Data is send to the cable/module if this one is green.
status3.jpg Receive status: (right field):
Data is received from the
cable/module if this one is green.

8.3.2 Main Window

plcvcomuebersicht1.jpg
1. Configuration: Select and open the configuration program for your products.
⇒ PLC-VCOM: Management, connection and communication with the cables
⇒ S5-LAN: configuration of your S5-LAN modules
⇒ MPI/S7-LAN: Configuration of your MPI-LAN or S7LAN

2. Info: information about the PLC-VCOM and your computer.

3. Status: Display the connection parameters of the cable connected.
⇒ Top left: shows the name of the currently connected product
⇒ semi-left: shows the connection status
⇒ half right: shows the IP address of the connecting cable
⇒ Top right: Click here to search or select a device
⇒ right middle: name of the connected cable
⇒ bottom right: displays information about current computer connections

4. Virtual Port: Display of selected virtual COM ports and
the program that the last has accessed on this COM port.

5. Program: Buttons to adjust the PLC-VCOM
⇒ Exit. This button closes the program and the COM – Port
⇒ Lenguage: Switch the Language to english/german.
⇒ Help: opens the Help menu of the PLC-VCOM, when they should have problems or questions
⇒ “Minimize” the dialog. This button does not close the program. It just minimizes the program. You will find the PLC – VCom symbol in the Windows – taskbar beside the watch.

8.3.3 Configuration window

plcvcomuebersicht2.jpg
1. List of available cable / modules:
⇒ Linewise display of the products found with your properties
2. IP-Adress:
⇒ IP address and MAC address of the selected cable / module
3. Via network card:
⇒ Selection of the used network interface card
4. LAN-Type:
⇒ Selection of the be connected cable / Module Types
5. Several check boxes:
⇒ Manual entry: allows you to enter the parameters manually
⇒ no network: for products which are not in any network
⇒ Installing in the device Manager: Installs the PLC-VCOM COM port in Device Manager
(required only for S7 for Windows and S7 Doctor software)
⇒ RFC1006: activation of RFC1006 communication method
⇒ no network card selection: Passes the routing of packets to the operating system
⇒ serial interval times: slow down the serial transmission eg panel transfers
6. Search
⇒ With a click on Search you are sending an broadcast to every cable/module that is connected with your network or your system. Every responding cable/module will be inserted to the list.
7. Help:
⇒ opens the Help menu of the configuration, if they have problems or questions
8. OK:
⇒ Ends the PLC-VCOM configuration and accepts the entered / selected settings
9. Cancel:
⇒ Ends the PLC-VCOM configuration and discards the entered / selected settings

1. Start the PLC – VCom application, if this is not already running.
2. Open the PLC-VCOM by clicking on the icon status2.jpg PLC-VCOM in the system tray.
3. After the PLC-VCOM is open, click in the status area on the “Configure” and the wizard to configure is launched.

8.4.1 S5-LAN / S5-LAN++

konfig_s5-lan.jpg

8.4.1.1 Automatically

1. Click on “Search” to send a broadcast to all cables and modules which are located on your network or directly connected to the computer. Each on this broadcast responsive cable / module is entered in the list of participants.
2. Select the desired cable / module so that them are highlighted in blue. Here are all parameters automatically included in the configuration wizard.

8.4.1.2 Manual

The manual entry relates to the network users who are behind a router, located in other networks because of the broadcast for the automatic detection is not propagated by routers and therefore network users can not be found.

1. If you know the IP address of your cable, you can enter it manually. To activate the entry field for this purpose, click on the box “manual entry”.
2. Enter at “IP address”, the address of your cable / module that you want to connect to and select your type of cable in the “LAN Type”.

8.4.1.3 Final settings

3.In the S5-LAN is unlocked the additional field S5 PG port. At the selection this will be automatically filled with the value that is stored in the S5-LAN or enter this port at a manual input by hand. This port can be changed using the S5-LAN Manager in the S5-LAN.

The S5-PG port is the programming port of the S5-LAN and is by default 10010.
The S5-PG port, which is registered in the PLC-VCOM, must always match with the S5-PG-Port registered in the S5-LAN!

4. Select the options that you may need, such as no network card selection or serial break times.

Information about the options can be found in “Overview” section of the PLC VCOMs, that can be selected and deselected with the help of checkboxes.

5.Confirm your entry / selection with “OK”.
konfig_s5-lan2.jpg
6. In the main window of the PLC VCOMs appears after successfully connecting the cable type, with witch the computer connects, the connection status “connected”, the IP address and the name of the connected participant.
7. Finally click “Minimize” to decrease the PLC-VCOM in the notification area so that it can continue to manage the virtual COM port.

8.4.2 S5-Gateway / S5-Gateway+

konfig_s5-gateway.jpg

8.4.2.1 Automatically

1. With a click on “Search” you send a broadcast to all cables and modules that are located on your network or directly connected to the computer. Each to this broadcast responsive cable / module is entered in the list of participants.
2. Select the desired cable / module so that them are highlighted in blue. Here are all parameters automatically included in the configuration wizard.

8.4.2.2 Manual

The manual entry relates to the network users who are behind a router, located in other networks because of the broadcast for the automatic detection is not propagated by routers and therefore network users can not be found.

1. If you know the IP address of your cable, you can enter it manually. To activate the entry field for this purpose, click on the box “manual entry”.
2. Enter at “IP address”, the address of your cable / module that you want to connect to and select your type of cable in the “LAN Type”.

8.4.2.3 Final settings

3. In the S5-LAN is unlocked the additional field S5 PG port. At the selection this will be automatically filled with the value that is stored in the S5-LAN or enter this port at a manual input by hand. This port can be changed using the S5-LAN Manager in the S5-LAN.

The S5-PG port is the programming port of the S5-LAN and is by default 10010.
The S5-PG port, which is registered in the PLC-VCOM, must always match with the S5-PG-Port registered in the S5-LAN!

4. Select the options that you may need, such as no network card selection or serial break times.

Information about the options can be found in “Overview” section of the PLC VCOMs, that can be selected and deselected with the help of checkboxes.

5. Confirm your entry / selection with “OK”.
konfig_s5-lan2.jpg
6. In the main window of the PLC VCOMs appears after successfully connecting the cable type, with witch the computer connects, the connection status “connected”, the IP address and the name of the connected participant.
7. Finally click “Minimize” to decrease the PLC-VCOM in the notification area so that it can continue to manage the virtual COM port.

9 Technical data

Supply voltage: 24V/DC +/- 20%
Power consumption: 2 watt
Display: status-LED Handling/Configuration: reset-switch-key (factory setting)
S5-LAN Manager
Interfaces: to the PLC: TTY/20mA current loop (S5-LAN passiv, PLC active)
to the PD/PC: 10/100BaseTX RJ45-ethernet jack
Operating temperature: 5 - 55°C
Case: ABS-plastic case
Dimensions: 42 x 15 x 65 mm


Pin number Short form Designation Direction
1 P24V 24V DC voltage input
3 M24V ground input
Pin no. Short name Notation Direction
1 TX + receive line + Out
2 TX – receive line – Out
3 RX + send line + In
6 RX – send line – In
Pin number Short form Designation Direction
1 NC not used  
2 TTY OUT + transmit data + (transistor collector) Out
3 NC not used  
4 +24V power supply +24V In
5 NC not used  
6 I-Tx 20mA power source transmitter Out
7 TTY IN + receive data+ (LED anode) In
8 NC not used  
9 I-Rx 20mA power source receiver Out
10 Mext ground +24V In
11 NC not used  
12 NC not used  
13 NC not used  
14 NC not used  
15 NC not used
Pin number Short form Designation Direction
1 NC not used  
2 TxD transmit data Out
3 NC not used  
4 NC not used  
5 NC not used  
6 NC not used  
7 RxD receive data In
8 NC not used  
9 NC not used  
10 GND ground -
11 NC not used  
12 NC not used  
13 NC not used  
14 NC not used  
15 NC not used  

10 Examples of applications

10.1.1 Configuration S5 gateway

Needed: S5-LAN Manager
Supported since firmware - version 0.44 of the S5 - Gateway

1. Start the S5-LAN Manager and search for your module. Select it and click with the mouse on the “S5 - Gateway - Connection”. This opens a dialog to set the connection.

s5ans5-gateway1.jpg
2. In the lower area of the dialog you find the connection list, in which you choose the connection to configure.

3. In “name” you can now give the connection a logical name.

4. Under “Configuration - DB” type in the position of the data block in the left field, (eg “1” for DB1) and in right field from which data word (eg “1” for DW1) ranges the configuration.

5. As “link - type” set “ISO - on - TCP - Connection”. In this setting is used the TCP port 102.

6. The polling cycle (in ms) specifies how much time elapses until the S5 - Gateway cyclically reads the configuration area and checks if something has to be done. If here is specified 0, is readed constantly from the PLC.

7. In the area of addresses you can only define the IP - address of the partner. Set the IP - address of the S5 - Gateway module to further configure the S5 - LAN Manager.

8. With both devices, you can use the “TSAP” (transportation - Service - Access - Point). This consists of 16 characters, and sets the ID of the connection represents. This is needed when several compounds with an IP - address exist. (Firmware version 0.45 of the S5 - Gateway can be built with any TSAP of a connection)

9. In the second module must be set in addition to the steps described in “Connection - Type” on the chopping the “Active connection” .

The communication via S5 - Gateway is now configured.

10.1.2 transfer blocks in PLC

1. Start your programming software and open now S5D - file “S5toS5 - Gateway”.

2. So connect with your S5 - Gateway modules and transfer all the blocks (OB1, FB55 and FB56) into the module belonging to the PLC. The same blocks you now even transfer into the second PLC. The blocks DB20 and DB100 are generated from alone.

10.1.3 Transmission cycle (S5)

In the following example the DB20 is used as configuration - DB. M10.0 controls the sending and M12.0 controls the receiving. If M10.0 is “1”, then 20 bytes of the DB100 are sent from DW0. M12.0 gives free 20 bytes the receive mailbox DB100 from DW100.

  : SPA FB 55
Name : S5L_SEND
JDBN :   KF +00020
JDBW :   KF +00000
STYP :   KC D
SDBN :   KF +00100
SBEG :   KF +00000
SLEN :   KF +00020
ACT :   M 10.0
LEN :   KF +00020
DONE :   M 11.0
ERR :   M 11.1
STAT :   MW 20  
:        
: SPA FB 56
Name : S5L_RECV
JDBN :   KF +00020
JDBW :   KF +00000
RTYP :   KC D
RDBN :   KF +00100
RBEG :   KF +00100
RLEN :   KF +00020
ACT :   M 12.0
LEN :   MW 24
NDR :   M
ERR :   M 13.1
STAT :   MW 22

Set the inputs E8.0 and E9.0 to “1” for sending and receiving.

10.1.4 Test of the structure (S5)

1. Open the each DB100 in your PLCs and enter any values in the first 20 bytes.
e.g.:(1; 2; 3; 4; 5; 6; 7; 8; 9)

s5ans5-gateway2.jpg
2. Save the blocks and set the inputs E8.0 and E9.0 to “1” in your PLC with the active S5 - Gateway module and restart the cycle.
s5ans5-gateway3.jpg
3. Now open the DB100 and check if the values from the 20 bytes that you have configured in the other PLC in the DB100 matches with those from DW100.
s5ans5-gateway4.jpg
If they match, the communication was successful.

10.1.5 Format of the configuration area

  DL DR DW  
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0  
received reserved RTYP (’D’, ’X’, ’M’, ’E’, ’A’) 0  
RDBN (at ’D’ or ’X’ block number) 1  
RBEG (at ’D’ or ’X’ StartDW otherwise StartByte) 2  
RLEN (Size of the receive mailbox in bytes) 3  
reserved 4
send reserved STYP (’D’, ’X’, ’M’, ’E’, ’A’) 5  
SDBN (at ’D’ or ’X’ block number) 6  
SBEG (at ’D’ or ’X’ StartDW otherwise StartByte) 7  
SLEN (Size of the transmit mailbox in bytes) 8  
reserved 9
transmit TxLEN (transmit - length in bytes) 10  
TxSTAT (send status) 11  
reserved reserved DO
NE
ER
R
AC
T
12
received RxLEN (receiving - length in bytes) 13  
RxSTAT (receive state) 14  
reserved reserved ND
R
ER
R
AC
T
15
reserved for
extension
reserved 16  
reserved 17  
reserved 18  
reserved 19

The single fields in the detail:

Designation Meaning FB - parameter name Access
R = read
W = write
S5 - GW PLC
RTYP Data type of the receive mailbox:
’D’ = DB
’X’ = DX
’M’ = flag
’E’ = input
’A’ = output
RTYP R W
RDBN If RTYP DB or DX block number otherwise no use. RDBN R W
RBEG The beginning of the receive mailbox. If DB and DX is starting - data word, or start - data byte. RBEG R W
RLEN Length of the receive area in bytes(even if DB). RLEN R W
STYP Data type of the send mailbox:
’D’ = DB
’X’ = DX
’M’ = flag
’E’ = input
’A’ = output
STYP R W
SDBN If STYP DB or DX block number otherwise no use. SDBN R W
SBEG Beginning of the send mailbox. If DB and DX is starting - data word, or start - data byte. SBEG R W
SLEN Length of the send mailbox in bytes (even if DB). SLEN R W
TxLEN Number of bytes to be sent. LEN R W
TxSTAT Send Status evaluate if DONE or ERR is set to 1. If DONE is 1 the contract was executed without error. STAT is 0 STAT W R
TxACT Start a send job in S5 - LAN. ACT R/W R/W
TxERR Is 1 if an error has occurred. The error can be seen in detail the STAT field. ERR W R/W
TxDONE Is 1 if the job was executed successfully end. DONE W R/W
RxLEN Number of bytes that have been received. LEN W R
RxSTAT Reception status once when DONE or ERR is set to 1. If DONE is 1 the order was executed without error. STAT is 0 STAT W R
RxACT Enables the receive mailbox if 1. ACT R/W R/W
RxERR Is 1, when an error has occurred. The error can be seen in detail the STAT field. ERR W R/W
NDR Is 1 if data has been received (data received). RxLEN then evaluate. NDR W R/W

It is provided for an easy communication which the FB55 (S5L_SEND) and FB56 (S5L_RECV). In these modules is set the communication between S5 - Gateway and PLC. The FBs was developed in dependence with the S5 - communication FC's (FC5, FC6, AG - SEND or AG - RECV).

NOTE: These devices use 200 MW and 202 MW as scratchpad flag area.

10.2.1 S5 – Configuring Gateway

Requirements: S5-LAN Manager
Supported since firmware version 0.44 of the S5 - Gateway.

1. Start the S5-LAN Manager and search for your S5 - Gateway module. As soon as found, select it and click on the button “S5 - Gateway - connection”. It appears a dialog where you can set up the gateway connection.
en_s5ans5-gateway1.jpg
2. In the lower part of the dialog you will find the connection list where you select the connection you want to edit.
3. At the top of the dialog a edit box called “name:” allows you to give the connection a logical name.
4. Below set up the position of the “configuration data block”. Therefore just set the position of the data block (DB) to the left edit box (e.g. “1” for DB1). Then set up the starting point which specifies when the configuration area starts (the edit box is called “ from DW”).
5. Set the connection type list box (it is called “connection type“ in the dialog) to “ISO - on - TCP - connection“. This connection type uses the TCP port 102.
6. The polling cycle (ms) specifies the elapsed time until the S5 - Gateway reads the configuration area and checks whether something has to be done. If this box is set to 0, the configuration area will be read constantly.
7. Only the member of the IP address (“Partner”) can be set in the address part (“Addresses”). The IP address of the S5 - Gateway you have to set as known by using the S5-LAN Manager.
8. Configure the TSAP (Transport - Service - Access - Point) to both devices. This one consists of 16 characters and identifies the connection. This will be needed to identify a connection to an IP address which has running more than one connections.
9. The communication is compatible to the “ISO - on - TCP - connection“ connection of the CP343 - 1. In this case only has to be configured the required connections of the S7 - CP343 - 1. Set the TPDU - size (Transport - Protocol - Data - Unit) to 512. So you have specified that the maximum package size which can be received or transmitted is 512.
Finally the S5 - Gateway communication is set up.

10.2.2 Configure the S7 gateway

Start your Internet Explorer and type in the address bar the IP of the S7-LAN module. This will open the configuration page of the S7 - LAN.

10.2.2.1 With the web browser

Set in the “General” what should be the name for your module.
Among other things, the “TS function” must be turned off and “BUS - configuration use from PC” must be set to “NO”. “Boot Settings” and “protocol type” must both be set to “Automatic”.

s5ans7-gateway1.jpg
Under “Network” you must set the “DHCP - client” to “OFF”, and adjust the IP - address of the module.
s5ans7-gateway2.jpg
Set the baud rate in “MPI / PROFIBUS” on 187K5 and determine the highest station address. Under “Local Station Address” give an number to your S7-LAN. The “profile” must be set to “MPI”.
s5ans7-gateway3.jpg
The next step is to configure the gateway. Here you have to set “Connection Type”, “DB - Active” (the partner device “passive”) and in the “Station Number” you must enter the number of your PLC. Now you should decide which of the configuration data block is in your PLC and from which data word. Type in the IP - address of your S5 - LAN in the field “IP - address partner”. In “TSAP” your store the same name as you have assigned in the S5 - LAN Manager to your - S5 LAN.
s5ans7-gateway4.jpg
Finally, you still have to enter the number of your CPU that is stored in your PLC about “RFC1006” in “destination - CPU”, and the “Bus” should be “Config”.
s5ans7-gateway5.jpg

10.2.2.2 With the web browser from V2.10 (S7-LAN) / V2.36 (MPI-LAN)

s5ans7-gateway8.jpg
Set in the “General” what should be the name for your module.

Under “Network” you must set the “DHCP - client” to “OFF” and adjust the IP - address of the module.

Set the baud rate in “Bus Settings”, to 187K5 and determine the highest station address. Under “Local Station Address” you give a number to your S7-LAN. The “profile” must be set to “MPI” and at “BUS - use config from PC” must be set no “tick.

Under “other”, the “TS Adapter functionality” must be off. “Boot Settings” and “protocol type” must both be set to “Automatic”.

Finally, you still have to enter the number of your CPU that is stored in your PLC about “RFC1006” in “destination - CPU” and the “Bus” should be “Config”.

s5ans7-gateway9.jpg
The final step is to configure the gateway. Here you have to set “Connection Type”, “DB - Active” (the partner device “passive”) and at “Station Number” you have to enter the number of your PLC. Now you should decide which is the configuration data blocks in your PLC and from which data word. Type in the IP - address of your S5 - LAN in the field “IP - address partner”. In “TSAP” your store the same name as you have assigned in the S5 - LAN Manager to your - S5 LAN.

10.2.3 Transfer blocks in PLC

1. Start your programming software and open the S5D - file “S5toS5 - Gateway”.
2. Now connect with your S5 - Gateway modules and transfer all the blocks (OB1, FB55 and FB56) in the module belonging to the PLC. The same blocks you now even transfer into the second PLC. The blocks DB20 and DB100 are generated by itself.
3. Now open the S7P - file “S5toS7 - Gateway”.
4. Now connect with your S7 - LAN module and transfer the blocks (OB1, FB10, FC15, FC16, DB10 and DB14) into the PLC

10.2.4 Start transmission cycle

S5 controller

In the following example, the DB20 is used as configuration - DB. M10.0 controls the sending and M12.0 controls the receiving. If M10.0 is “1”, then 20 bytes of the DB100 are sent from the DW0. M12.0 the receive mailbox DB100 gives free 20 bytes from DW100.

  : SPA FB 55
name : S5L_SEND JDBN
:   KF +00020
JDBW :   KF +00000
STYP :   KC D
SDBN :   KF +00100
SBEG :   KF +00000
SLEN :   KF +00020
ACT :   M 10.0
LEN :   KF +00020
DONE :   M 11.0
ERR :   M 11.1
STAT :   MW 20  
:      
  : SPA FB 56
Name : S5L_RECV
JDBN :   KF +00020
JDBW :   KF +00000
RTYP :   KC D
RDBN :   KF +00100
RBEG :   KF +00100
RLEN :   KF +00020
ACT :   M 12.0
LEN :   MW 24
NDR :   M 13.0
ERR :   M 13.1
STAT :   MW 22

Set the inputs E8.0 and E9.0 to “1” for sending and receiving.

S7 controller

In the following example, the DB10 is used as DB configuration. M10.0 controls the sending and M11.0 controls the receiving. If M10.0 is “1”, then 20 bytes of the DB14 are sent from DW0. M11.0 the receive mailbox DB14 gives free 20 bytes from DW100.

CALL “S7LAN_SEND”
KOMDB : = “S7LAN Communication DB”.KOM
SENDTYPE : = 'D'
SENDDB : = 14
SENDADR : = 0
SENDLEN : = 20
ACT : = M10.0
LEN : = 20
DONE : = M10.1
ERROR : = M10.2
STATUS : = MW12  
CALL “S7LAN_RECV”
KOMDB : = “S7LAN Communication DB”.KOM
RECVTYPE : = 'D'
RECVDB : = 14
RECVADR : = 100
RECVLEN : = 20
ACT : = M11.0
NDR : = M11.1
ERROR : = M11.2
STATUS : = MW14
LEN : = MW16

10.2.5 Test of the structure

1. Open the each DB100 in your PLCs and enter any values in the first 20 bytes. \\e.g.:(1; 2; 3; 4; 5; 6; 7; 8; 9)
s5ans5-gateway2.jpg
2. Save the blocks and set the inputs E8.0 and E9.0 to “1” in your PLC with the active S5 - Gateway module and restart the cycle.
s5ans5-gateway3.jpg
3. Now open the DB100 and check whether the values of the 20 bytes which you have configured in the other PLC in DB100 match with those from DW100.
s5ans5-gateway4.jpg
If they match, the communication was successful.
4. Open the DB14 in your S7 - PLC and enter any values in the first 20 bytes.
e.g.: (1; 2; 3; 4; 5; 6; 7; 8; 9; 10)
s5ans7-gateway6.jpg
5. Save the blocks and set the inputs E8.0 and E9.0 to “1” in your S5 - PLC and restart the cycle.
s5ans5-gateway3.jpg\
6. Open the DB14 in your S7 - PLC and check if the values of the 20 bytes which you configured in the other PLC in DB100 and DB14 from DW0 match with those from DW100. If that is the case, the communication between S5 and S7 was successfully performed.
s5ans7-gateway7.jpg
The bytes from DW100 should be the same as the ones you have configured in the DB100 S5 - PLC from DW0.

If they match, the communication was successful