Difference between revisions of "IBHLink S7++:PLC-PLC communication"

From IBHsoftec Wiki English
Jump to: navigation, search
(Ethernet to PROFIBUS via PROFIBUS CP (Multiplexing))
(Connection via IBH Link in routing mode)
 
(73 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
==Ethernet to MPI / PROFIBUS==
 
==Ethernet to MPI / PROFIBUS==
[[Image:EthernetMPICPschema.png|thumb|400px|right]]
+
[[Image:Ethernet_MPICP_diagram.png|thumb|400px|right]]
 
Requirements:<br>
 
Requirements:<br>
 
- SIMATIC Manager<br>
 
- SIMATIC Manager<br>
Line 9: Line 9:
  
  
'''Download: [http://download.ibhsoftec.com/english/Samples/Ethernet2MPI_eng.zip STEP®7 Sample: Ethernet to MPI/PROFIBUS]'''  
+
'''Download: [http://download.ibhsoftec.com/english/Samples/Ethernet2MPI_eng.zip STEP7 Sample: Ethernet to MPI/PROFIBUS]'''  
  
 
Active:<br>
 
Active:<br>
Line 46: Line 46:
  
 
==Ethernet to PROFIBUS via PROFIBUS CP (Multiplexing)==
 
==Ethernet to PROFIBUS via PROFIBUS CP (Multiplexing)==
[[Image:EthernetMPIS7VerbindungCPSchema.png|thumb|400px|right]]
+
[[Image:S7_connection_CP_diagram.png|thumb|400px|right]]
 
Requirements:<br>
 
Requirements:<br>
 
- SIMATIC Manager<br>
 
- SIMATIC Manager<br>
- IBH Link S7++ / HS with Firmware >= 2.142<br>
+
- IBH Link S7++/IBH Link S7++ HS with Firmware >= 2.142<br>
 
- CPU with PROFIBUS CP<br>
 
- CPU with PROFIBUS CP<br>
 
- CPU with Ethernet onboard or Ethernet CP. The Interface must support S7 connections. It can be checked within the hardware  
 
- CPU with Ethernet onboard or Ethernet CP. The Interface must support S7 connections. It can be checked within the hardware  
Line 55: Line 55:
  
 
   
 
   
'''Download: [http://download.ibhsoftec.com/german/Beispiele/Ethernet2ProfibusCP.zip STEP®7 Beispiel: Ethernet nach PROFIBUS über PROFIBUS-CP]'''  
+
'''Download: [http://download.ibhsoftec.com/english/Samples/Ethernet2ProfibusCP_eng.zip STEP7 Sample: Ethernet to PROFIBUS via PROFIBUS-CP]'''  
  
Aktiv:<br>
+
Active:<br>
 
[[Image:EthernetMPICPaktiv.png]]<br>
 
[[Image:EthernetMPICPaktiv.png]]<br>
  
Passiv:<br>
+
Passive:<br>
 
[[Image:EthernetMPICPpassiv.png]]<br>
 
[[Image:EthernetMPICPpassiv.png]]<br>
  
In NetPro muss die CPU mit einem Industrial Ethernet verbunden werden. Es wird eine unspezifizierte S7-Verbindung benötigt:<br>
+
Within NetPro the CPU must be connected with the Ethernet. An unspecified connection needs to be created:<br>
[[Datei:EthernetMPIS7Verbindung.png]]<br>
+
[[Image:EthernetMPIS7connection.png]]<br>
  
In den Eigenschaften der S7-Verbindung muss die IP-Adresse des IBH Links angegeben werden:<br>
+
Within the properties of the S7 connection the IP address of the IBH Links must be entered:<br>
[[Datei:EthernetMPIS7Verbindung2.png]]<br>
+
[[Image:EthernetMPIS7connection2.png]]<br>
  
In den Adressendeteils muss die Rack- und Steckplatznummer eine spezielle IBH Link Routing Kennung angegeben werden: Rack 7, Steckplatz 31<br>
+
Within the address details as Rack and Slot a special ID for IBH Link Routing must be entered: Rack 7, Slot 31<br>
[[Datei:EthernetMPIS7VerbindungCP.png]]<br>
+
[[Image:EthernetMPIS7connectionCP.png]]<br>
  
Verbindungsaufbau per FB/SFB 15 (PUT)<br>
+
Establish connection via FB/SFB 15 (PUT)<br>
Da beim Verbindungsaufbau mit einem IBH Link S7++ über einen PROFIBUS-CP mehr Verbindungsinformationen benötigt werden, als in NetPro angegeben werden können, kann der IBH Link S7++ mit einer speziellen Kennung in einen Modus versetzt werden, in dem er die benötigten Verbindungsparameter mit einem Aufruf des Bausteins "PUT" als Datenstruktur übergeben bekommt. Diese Verbindung eignet sich auch für den Datenaustausch mit mehreren Ziel-CPUs, selbst wenn die Ethernet-CPU von sich aus keine ausreichensde Anzahl an S7-Verbindungen aufbauen kann.
+
To establish a connection over a PROFIBUS-CP with an IBH Link S7++, more connection information is required, than NetPro permits to enter. For this reason the IBH Link S7++ can be set into the projected mode. That mode permits sending the required connection information with a call to the "PUT" block as a data structure. To set this mode, only a special ID must be entered in NetPro.
  
OB1 erstellen<br>
+
Create OB1: <br>
Im ersten Netzwerk wird der Baustein SFB15 zur Parameterübergabe aufgerufen. Im zweiten Netzwerk wird der SFB14/15 für den Datenaustausch aufgerufen.<br>
+
Within the first network the SFB15 is called to handover the parameters. Within the second network the SFB15 for the data exchange is called.<br>
[[Datei:OB1.png]]<br>
+
[[Image:OB1.png]]<br>
  
 
CALL  "PUT" , DB15
 
CALL  "PUT" , DB15
       REQ  :=M0.0                    //Lesevorgang bei steigender Flanke
+
       REQ  :=M0.0                    //Start reading with positive edge
       ID    :=W#16#1                  //S7-Verbindungs ID wie in NetPro projektiert
+
       ID    :=W#16#1                  //S7 connection ID configured within NetPro
       DONE  :=M0.1                    //Schreibvorgang abgeschlossen
+
       DONE  :=M0.1                    //Job status
       ERROR :=M0.2                    //Fehlerbit
+
       ERROR :=M0.2                    //ERROR flag
       STATUS:=MW2                      //Statuswort (siehe Dokumentation Siemens)
+
       STATUS:=MW2                      //STATUS infomation(Siemens documentation)
       ADDR_1:=P#DB65535.DBX 224.0 BYTE 8    //IBH Link S7++ Kennung für PROFIBUS-Verbindungsaufbau.
+
       ADDR_1:=P#DB65535.DBX 224.0 BYTE 8    //IBH Link S7++ ID for PROFIBUS connection.
  
Der IBH Link S7++ bekommt mit dieser Kennung den Verbindungsaufbau mitgeteilt.
+
With this ID the IBH Link S7++ gets the needed information for the connenction.
  
 
       ADDR_2:=
 
       ADDR_2:=
Line 97: Line 97:
 
       SD_4  :=
 
       SD_4  :=
  
"PLC_CONNECTION_RECORDS" – Symbolischer Name des DBs welcher die Verbindungsparameter enthält.
+
"PLC_CONNECTION_RECORDS" – Symbolic name of the DB, which contains the parameters for the connection.
Connection[0] – Zeiger auf die gewünschte Start Adresse im DB welcher die Verbindungsparameter enthält. Enthält der DB mehrere Verbindungen, können sie über diesen Parameter ausgewählt werden und somit auf verschiedene CPUs zugreifen.
+
Connection[0] – Pointer to the start address within the DB, which contains the parameters for the connection.
 +
If the DB contains more than one connection, they can be selected via this parameter and access to several CPUs is possible.
  
 
CALL  SFB  14 , DB14
 
CALL  SFB  14 , DB14
       REQ  :=M10.0                    //Lesevorgang bei steigender Flanke starte
+
       REQ  :=M10.0                    //Start reading with positive edge
       ID    :=W#16#1                  //S7-Verbindungs ID wie in NetPro projektiert
+
       ID    :=W#16#1                  //S7 connection ID configured within NetPro
       NDR  :=M10.1                    //Lesevorgang abgeschlossen
+
       NDR  :=M10.1                    //Job status
       ERROR :=M10.2                    //Fehlerbit
+
       ERROR :=M10.2                    //ERROR flag
       STATUS:=MW20                    //Statuswort (siehe Dokumentation Siemens)
+
       STATUS:=MW20                    //STATUS infomation(Siemens documentation)
       ADDR_1:=P#M 10.0 BYTE 20        // zu lesende Daten entferte CPU
+
       ADDR_1:=P#M 10.0 BYTE 20        //Source address connected CPU
 
       ADDR_2:=
 
       ADDR_2:=
 
       ADDR_3:=
 
       ADDR_3:=
 
       ADDR_4:=
 
       ADDR_4:=
       RD_1  :=P#M 10.0 BYTE 20        //zu schreibende Daten lokale CPU
+
       RD_1  :=P#M 10.0 BYTE 20        //Destination address local CPU
 
       RD_2  :=
 
       RD_2  :=
 
       RD_3  :=
 
       RD_3  :=
 
       RD_4  :=
 
       RD_4  :=
  
Abhängig von der verwendeten CPU müssen die passenden Bausteine FB14/15 oder SFB14/15 verwendet werden.<br>
+
Depending on the type of CPU the correct set of blocks, FB14/15 or SFB14/15 must be chosen.<br>
  
Es wird ein DB benötigt, welcher die Verbindungsparameter enthält.<br>
+
A DB is needed, which contains the parameters for the connection.<br>
  
[[Datei:DB.png]]<br>
+
[[Image:DB.png]]<br>
  
Es werden die Parameter MPI-Adresse, Slot- und Racknummer verwendet. Eine Angabe der IP Adresse ist bei dieser Art der Verbindung ist nicht nötig. Bei mehreren Verbindungen empfiehlt es sich mit UDTs zu arbeiten.
+
The parameters MPI address, Slot- and Rack No. are used. Entering an IP address is not needed using this kind of connection. If several connections are used, it is recommended to use UDTs.
  
==MPI – Ethernet – MPI without projected configuration / MPI – Ethernet / MPI – IBH Link S5++==
+
==MPI – Ethernet – MPI without projected configuration / MPI – Ethernet/MPI – IBH Link S5++==
[[Image:S7VerbindungSchema.png|thumb|400px|right]]
+
[[Image:S7connection_diagram.png|thumb|400px|right]]
[[Image:S7VerbindungMultiSchema.png|thumb|400px|right]]
+
[[Image:S7_connection_Multi_diagram.png|thumb|400px|right]]
[[Image:S7VerbindungS5Schema.png|thumb|400px|right]]
+
[[Image:S7_connection_S5_diagram.png|thumb|400px|right]]
Voraussetungen<br>
+
Requirements<br>
- Simatic Manager oder S7 für Windows von IBHsoftec<br>
+
- SIMATIC Manager or '''[http://www.ibhsoftec.com/S7W-Eng S7 for Windows®]''' from IBHsoftec<br>
- 2 x IBH Link S7++ / HS ab Firmware 2.142<br>
+
- 2 x IBH Link S7++/IBH Link S7++ HS with Firmware >= 2.142<br>
- CPU muss die Bausteine XPUT und XGET (SFC67, SFC 68) enthalten. Ob eine CPU die Bausteine enthält, ist in der Siemens Dokumentation zur entsprechenden CPU ersichtlich. Für diese Verbindung ist keine Projektierung nötig. Die Bausteine XPUT / XGET werden im SPS Programm aufgerufen und bauen dadurch die Verbindung von einem IBH Link S7 zu einem andern IBH Link auf. Für eine komfortable Konfiguration der Kommunikationsparameter sind die von IBHsoftec entwickelten Baustein XPUT_IBH und XGET_IBH verfügbar.<br>
+
- The operating system of the CPU must contain the blocks XPUT and XGET (SFC67, SFC68).  
 +
The information, whether the CPU contains these blocks can be gathered from the Siemens CPU documentation.  
  
 +
For this type of connection, a projected configuration with NetPro is not necessary. Within the PLC program, the blocks XPUT/XGET are called to establish a connection from one IBH Link S7 to the next IBH Link. For very comfortable configuration of the communication parameters, the blocks XPUT_IBH and XGET_IBH (developed by IBHsoftec) are available and can be found within the sample.<br>
  
'''Download: [http://download.ibhsoftec.com/german/Beispiele/MPI_IBHLink_IBHlink_MPI.zip STEP®7 Beispiel: MPI – Ethernet – MPI ohne Projektierung]'''
 
  
[[Datei:Block call.png]]<br>
+
'''Download: [http://download.ibhsoftec.com/english/Samples/MPI_IBHLink_IBHlink_MPI_eng.zip STEP7 Sample: MPI – Ethernet – MPI without projected configuration]'''
 +
 
 +
[[Image:Block call.png]]<br>
  
 
CALL  FB    67 , DB67
 
CALL  FB    67 , DB67
       REQ        :=M10.0              //Start Lesevorgang
+
       REQ        :=M10.0              //Start reading with positive edge
       DEST_ID    :=0                  //Zeiger im Parameter DB
+
       DEST_ID    :=0                  //Pointer within parameter DB
       DB_PARA    :=100                //Nr. des Parameter DBs
+
       DB_PARA    :=100                //No. of parameter DB
       IBHLINK_ADDR:=B#16#0            //MPI Adresse Quell IBH Link
+
       IBHLINK_ADDR:=B#16#0            //MPI Address source IBH Link
       SRC_ADDR    :=P#M 100.0 BYTE 20  //zu lesende Daten entfernte CPU
+
       SRC_ADDR    :=P#M 100.0 BYTE 20  //Location of data in the destination CPU
       DST_ADDR    :=P#M 100.0 BYTE 20  //zu schreibende Daten lokale CPU
+
       DST_ADDR    :=P#M 100.0 BYTE 20  //Location of data in the local CPU
       RESULT      :=MW2                //Statuswort
+
       RESULT      :=MW2                //STATUS infomation
       BUSY        :=M3.0              //Lesevorgang in Arbeit
+
       BUSY        :=M3.0              //Job status
Die Verbindungsdaten des IBH Links der Quell CPU werden in einem DB hinterlegt.  
+
The information for the IBH Link on how to reach the destination CPU are stored within the parameter DB.  
  
[[Datei:Db.png]]<br>
+
[[Image:DB_100.png]]<br>
  
Rack und Slot Nummer sind bei MPI 0. Bei S5 Verbindungen folgende Parameter für den IBH Link S5++ verwenden:<br>
+
Rack and Slot No are 0 when using MPI. The parameters for S5 conenctions using the IBH Link S5++ are:<br>
Ziel-IP-Adresse: IP-Adresse des IBHLink S5++<br>
+
 
Ziel-MPI-Adresse: 2<br>
+
{| class="wikitable"
Ziel-Rack: 0<br>
+
|-
Ziel-Steckplatz: 0<br>
+
| Destination IP address || IP address of the IBHLink S5++
 +
|-
 +
| Destination MPI address || 2
 +
|-
 +
| Destination Rack || 0
 +
|-
 +
| Destination Slot || 0
 +
|}
  
 
==MPI – Ethernet – MPI with S7 conection (projected) / MPI – Ethernet / MPI – IBH Link S5++==
 
==MPI – Ethernet – MPI with S7 conection (projected) / MPI – Ethernet / MPI – IBH Link S5++==
[[Image:S7VerbindungSchema.png|thumb|400px|right]]
+
[[Image:S7connection_diagram.png|thumb|400px|right]]
[[Image:S7VerbindungMultiCPSchema.png|thumb|400px|right]]
+
[[Image:S7_connection_Multi_CP_diagram.png|thumb|400px|right]]
[[Image:S7VerbindungS5Schema.png|thumb|400px|right]]
+
[[Image:S7_connection_S5_diagram.png|thumb|400px|right]]
Voraussetzungen<br>
+
Requirements<br>
- Simatic Manager<br>
+
- SIMATIC Manager  
- 2 x IBH Link S7++ / HS ab Firmware 2.142<br>
+
- 2 x IBH Link S7++/IBH Link S7++ HS with Firmware >= 2.142<br>
- CPU mit MPI Schnistelle<br>
+
- CPU with MPI Interface<br>
- Schnittstelle muss S7-Verbindungen unterstützen<br>
+
- Interface has to support S7 connections<br>
  
 
   
 
   
'''Download: [http://download.ibhsoftec.com/german/Beispiele/MPI_IBHLink_IBHlink_MPI_proj.zip STEP®7 Beispiel: MPI – Ethernet – MPI mit S7-Verbindung (Projektiert)]'''  
+
'''Download: [http://download.ibhsoftec.com/english/Samples/MPI_IBHLink_IBHlink_MPI_proj_eng.zip STEP7 sample: MPI – Ethernet – MPI with S7 connection (projectet)]'''  
  
  
In NetPro muss die CPU mit einem Industrial Ethernet verbunden werden. Es wird eine unspezifizierte S7-Verbindung benötigt:<br>
+
Within NetPro the CPU must be connected with the Ethernet. An unspecified connection needs to be created:<br>
[[Datei:S7Verbindung600px.png]]
+
[[Image:S7connection_400.png]]
  
In den Eigenschaften der S7-Verbindung muss die MPI-Adresse des Quell-IBH Links angegeben werden:<br>
+
Within the properties of the S7 connection the IP address of the IBH Links must be entered:<br>
[[Datei:S7Verbindung2.png]]<br>
+
[[Image:S7connection_properties.png]]<br>
  
Verbindungsaufbau per FB/SFB 15 (PUT)<br>
+
Establish connection via FB/SFB 15 (PUT)<br>
Da beim Verbindungsaufbau mit einem IBH Link S7++ mehr Verbindungsinformationen benötigt werden, als in NetPro angegeben werden können, kann der IBH Link S7++ mit einer speziellen Kennung in einen Modus versetzt werden, in dem er die benötigten Verbindungsparameter mit einem Aufruf des Bausteins "PUT" als Datenstruktur übergeben bekommt. Ein weiterer Grund für die Verwendung dieser Verbindung ist, wenn Sie Daten mit mehreren Ziel-CPUs austauschen möchten.<br>
+
To establish a connection with an IBH Link S7++, more connection information is required, than NetPro permits to enter. For this reason the IBH Link S7++ can be set into the projected mode. That mode permits sending the required connection information with a call to the "PUT" block as a data structure. Another reason to use this connection is, if data needs to be exchanged with several CPU.
  
OB1 erstellen<br>
+
Create OB1:
Im ersten Netzwerk wird der Baustein SFB15 zur Parameterübergabe aufgerufen. Im zweiten Netzwerk wird der SFB14/15 für den Datenaustausch aufgerufen.<br>
+
 
[[Datei:OB1.png]]<br>
+
Within the first network the SFB15 is called to handover the parameters. Within the second network the SFB15 for the data exchange is called.
 +
[[Image:OB1.png]]<br>
  
 
CALL  "PUT" , DB15
 
CALL  "PUT" , DB15
       REQ  :=M0.0                    //Lesevorgang bei steigender Flanke
+
       REQ  :=M0.0                    //Start reading with positive edge
       ID    :=W#16#1                  //S7-Verbindungs ID wie in NetPro projektiert
+
       ID    :=W#16#1                  //S7 connection ID configured within NetPro
       DONE  :=M0.1                    //Schreibvorgang abgeschlossen
+
       DONE  :=M0.1                    //Job status
       ERROR :=M0.2                    //Fehlerbit
+
       ERROR :=M0.2                    //ERROR flag
       STATUS:=MW2                      //Statuswort (siehe Dokumentation Siemens)
+
       STATUS:=MW2                      //STATUS infomation(Siemens documentation)
       ADDR_1:=P#DB65535.DBX 224.0 BYTE 8    //IBH Link S7++ Kennung für PROFIBUS-Verbindungsaufbau.
+
       ADDR_1:=P#DB65535.DBX 224.0 BYTE 8    //IBH Link S7++ ID for PROFIBUS connection.
  
Der IBH Link S7++ bekommt mit dieser Kennung den Verbindungsaufbau mitgeteilt.
+
With this ID the IBH Link S7++ gets the needed information for the connenction.
  
 
       ADDR_2:=
 
       ADDR_2:=
Line 201: Line 213:
 
       SD_4  :=
 
       SD_4  :=
  
"PLC_CONNECTION_RECORDS" – Symbolischer Name des DBs welcher die Verbindungsparameter enthält.
+
"PLC_CONNECTION_RECORDS" – Symbolic name of the DB, which contains the parameters for the connection.
Connection[0] – Zeiger auf die gewünschte Start Adresse im DB welcher die Verbindungsparameter enthält. Enthält der DB meherere Verbindungen, können sie über diesen Parameter ausgewählt werden und somit auf verschiedene CPUs zugreifen.
+
Connection[0] – Pointer to the start address within the DB, which contains the parameters for the connection.
 +
If the DB contains more than one connection, they can be selected via this parameter and access to several CPUs is possible.
  
 
CALL  SFB  14 , DB14
 
CALL  SFB  14 , DB14
       REQ  :=M10.0                    //Lesevorgang bei steigender Flanke starten
+
       REQ  :=M10.0                    //Start reading with positive edge
       ID    :=W#16#1                  //S7-Verbindungs ID wie in NetPro projektiert
+
       ID    :=W#16#1                  //S7 connection ID configured within NetPro
       NDR  :=M10.1                    //Lesevorgang abgeschlossen
+
       NDR  :=M10.1                    //Job status
       ERROR :=M10.2                    //Fehlerbit
+
       ERROR :=M10.2                    //ERROR flag
       STATUS:=MW20                    //Statuswort (siehe Dokumentation Siemens)
+
       STATUS:=MW20                    //STATUS infomation(Siemens documentation)
       ADDR_1:=P#M 10.0 BYTE 20        //zu lesende Daten entfernte CPU
+
       ADDR_1:=P#M 10.0 BYTE 20        //Source address connected CPU
 
       ADDR_2:=
 
       ADDR_2:=
 
       ADDR_3:=
 
       ADDR_3:=
 
       ADDR_4:=
 
       ADDR_4:=
       RD_1  :=P#M 10.0 BYTE 20        //zu schreibende Daten lokale CPU
+
       RD_1  :=P#M 10.0 BYTE 20        //Destination address local CPU
 
       RD_2  :=
 
       RD_2  :=
 
       RD_3  :=
 
       RD_3  :=
 
       RD_4  :=
 
       RD_4  :=
  
Abhängig von der verwendeten CPU müssen die passenden Bausteine FB14/15 oder SFB14/15 verwendet werden.<br>
+
Depending on the type of CPU the correct set of blocks, FB14/15 or SFB14/15 must be chosen.<br>
 +
 
 +
A DB is needed, which contains the parameters for the connection.<br>
 +
 
 +
[[Image:DB.png]]<br>
 +
 
 +
 
 +
The parameters MPI address, Slot- and Rack No. are used. Entering an IP address is not needed using this kind of connection. If several connections are used, it is recommended to use UDTs.
 +
 
 +
The parameters for S5 conenctions using the IBH Link S5++ are:<br>
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Destination IP address || IP address of the IBHLink S5++
 +
|-
 +
| Destination MPI address || 2
 +
|-
 +
| Destination Rack || 0
 +
|-
 +
| Destination Slot || 0
 +
|}
  
Es wird ein DB benötigt, welcher die Verbindungsparameter enthält.<br>
+
==Connection via IBH Link in routing mode==
  
[[Datei:DB.png]]<br>
+
Requirements<br>
 +
- SIMATIC Manager
 +
- IBH Link S7++/IBH Link S7++ HS with Firmware >= 2.142<br>
 +
- CPU with MPI/PROFIBUS Interface<br>
 +
- Interface has to support S7 connections<br>
  
Es werden die Parameter MPI-Adresse, Slot- und Racknummer verwendet. Eine Angabe der IP Adresse ist bei dieser Verbindung ist nicht nötig. Bei mehreren Verbindungen empfiehlt es sich, mit UDTs zu arbeiten.  
+
'''Download: [http://download.ibhsoftec.com/english/Samples/Ethernet_PROFIBUS_eng.zip STEP7 Sample: Connction via IBH Link in routing mode]'''
  
Bei S5 Verbindungen folgende Parameter für den IBH Link S5++ verwenden:<br>
+
This kind of connection offers the possibility to exchange a large amount of data very fast - up to 64K.
Ziel-IP-Adresse: IP-Adresse des IBHLink S5++<br>
+
Ziel-MPI-Adresse: 2<br>
+
Ziel-Rack: 0<br>
+
Ziel-Steckplatz: 0<br>
+
  
==Connection via IBH Link Mode: Configuration via NetPro ==
+
For the communication, the standard blocks FB/SFB 8/9 (USEND / URCV) and FB/SFB 12/13 (BSEND / BRCV) are used.<br>
  
Voraussetungen<br>
 
- Simatic Manager<br>
 
- IBH Link S7++ / HS ab Firmware 2.142<br>
 
- Schnittstelle muss S7-Verbindungen unterstützen<br>
 
  
'''Download: [http://download.ibhsoftec.com/german/Beispiele/Ethernet_PROFIBUS.zip STEP®7 Beispiel: Verbindung über IBH Link im Projektierten Modus]'''
+
Within the IBHNet settings the routing mode must be activated. This mode is available beginning with firmware version 2.142.  
  
Diese Verbindungsvariante hat den Vorteil das Große Datenmengen schnell ausgetauscht werden können - bis zu 64K. Für die Kommunikation werden die Standardbausteine FB/SFB 8/9  (USEND / URCV) und FB/SFB 12/13 (BSEND / BRCV).<br>
+
With projected connections via RFC1006 it is not possible to communicate over unprojected connections any more!
  
Routing-Modus muss in IBHLink S7++ aktiviert sein. Dieser Modus ist ab Firmware Version 2.142 verfügbar. In diesem Modus sind keine unprojektierte Verbindungen über RFC1006 mehr möglich! Verbindungen über den IBHNet-Treiber funktionieren weiterhin.
+
The normal IBHNet communication over port 1099 via the IBHNet driver is not influenced from this setting.
  
[[Datei:IBH Link.png]]<br>
+
[[Image:IBHLink_routing.png]]<br>
  
Der IBHLink S7++ wird in NetPro als eine Station angelegt.<br>
+
The IBHLink S7++ will be configured as a station within NetPro.<br>
[[Datei:IBH Link als Station.png]]<br>
+
[[Image:IBH Link_as_Station.png]]<br>
Folgende Baugruppe muss vrwendet werden:<br>
+
The following station must be selected:<br>
MLFB: 6ES7 412-2EK06-0AB0 V6.0 in Rack 0, Steckplatz 2<br>
+
MLFB: 6ES7 412-2EK06-0AB0 V6.0 Rack 0, Slot 2<br>
MPI/Profibusadresse wie IBHLink S7++<br>
+
MPI/PROFIBUS address of the IBHLink S7++<br>
IP-Adresse von IBHLink S7++<br>
+
IP Address of the IBHLink S7++<br>
  
Konfiguration der Station im Hardwarekonfigurator:<br>
+
Configuration of the station within the hardwareconfigurator:<br>
[[Datei:IBH_Link_als_Station_HWK.png]]<br>
+
[[Image:IBH_Link_as_station_HWC.png]]<br>
  
In NetPro müssen neben der IBH Link Station auch alle CPUs angelegt werden, mit denen kommuniziert werden soll. Die S7-Verbindung wird von der tatsächlichen CPU über Ethernet zur IBH Link Station aufgebaut. Hierbei ist die tatsächliche CPU der aktive Teilnehmer.<br>
+
Within NetPro all corresponding CPUs besides the IBH Link station need to be configured. The S7 connection will be established from the real existing CPU via Ethernet to the IBH Link Station. In this case the real existing CPU is the active Partner.<br>
[[Datei:Verbindung1.png]]<br>
+
[[Image:Connection1.png]]<br>
  
[[Datei:Verbindung1Parameter.png]]<br>
+
[[Image:Connection1_parameter.png]]<br>
  
Die Partner-Verbindungsresource wird automatisch vergeben und ist für den nächsten Schritt relevant.<br>
+
The partners connection resource is given automatically and is relvant for the next step.<br>
  
[[Datei:Verbindung1Details.png]]<br>
+
[[Image:Connection1_address.png]]<br>
  
Die IBH Link Station baut nun eine S7-Verbindung über Profibus zur zweiten tatsächlichen CPU auf. Hierbei ist die IBH Link Station der aktive Teilnehmer. Als lokale Verbindungs-ID wird hier nun die im vorherigen Schritt automatisch zugewiesene Verbindungsresource (im Beispiel: 10) angegeben.<br>
+
The IBH Link station establishes a S7 connection via PROFIBUS to the second real existing CPU. In this case, the IBH Link station is the active Partner. As local ID the automatically given ID from the step before must be entered (within the sample: 10).<br>
  
[[Datei:Verbindung2px800.png]]<br>
+
[[Image:Connection2.png]]<br>
  
Der Verbindungsstatus kann direkt in NetPro angezeigt werden:<br>
+
The connection status can be displayed within NetPro:<br>
  
[[Datei:Verbindungsstatus aktivieren.png]]<br>
+
[[Image:Connection_status.png]]<br>
  
Mit dieser Verbindungsvariante sind komplexe Vernetzungen möglich:<br>
+
This type of connection allows complex networking:<br>
  
[[Datei:VerbindungMulti.png]]<br>
+
[[Image:Connection_multi.png]]<br>
  
Für eine Verbindung zu einem IBH Link S5++ muss keine Dummy-CPU in NetPro angelegt werden. Es reicht aus, lediglich eine unspezifizierte S7-Verbindung über Ethernet einzurichten. Die Partner-IP-Adresse ist in diesem Fall die IP-Adresse des IBH Link S5++. Zur Kommunikation müssen die Bausteine PUT/GET verwendet werden - SFB14/15.<br>
+
For the connection to an IBH Link S5++, no dummy CPU needs to be configured within NetPro. It is enough to create an unspecified S7 connection via Ethernet. In this case, the partner IP address is the IP address of the IBH Link S5++. Within the Address Details for the Partner '''Rack = 0''' and '''Slot = 2''' must be selected. For communication, the blocks PUT/GET are chosen - SFB14/15.<br>
[[Datei:VerbindungS5px800.png]]<br>
+
[[Image:IBHLinkS5_address.png]]<br>

Latest revision as of 15:18, 7 July 2014

Ethernet to MPI / PROFIBUS

Ethernet MPICP diagram.png

Requirements:
- SIMATIC Manager
- IBH Link S7++ / HS with Firmware >= 2.142
- CPU with MPI or PROFIBUS Interface
- CPU with Ethernet onboard or Ethernet CP. The Interface must support S7 connections. It can be checked within the hardware properties: S7 connection active (Server means passive).


Download: STEP7 Sample: Ethernet to MPI/PROFIBUS

Active:
EthernetMPICPaktiv.png

Passive:
EthernetMPICPpassiv.png

Within NetPro the CPU must be connected with the Ethernet. An unspecified connection needs to be created:
EthernetMPIS7connection.png

To access several CPUs accordingly, several S7 connections need to be configured. The connection ID is relevant for the call of the FBs/SFBs. If the amount of CPUs exceeds the amount of possible S7 connections, Ethernet to PROFIBUS via PROFIBUS CP (Multiplexing) can be chosen.

Within the properties of the S7 connection the IP address of the IBH Links must be entered:
EthernetMPIS7connection2.png

Within the Address Details enter the MPI address of the destination CPU.
EthernetMPIS7connection3.png

The communication will be established usings the blocks FB14/FB15. There are different FB14/FB15 available. Depending if a CPU with onboard Ethernet or a CPU with Ethernet CP is used, the correct set of blocks must be chosen, otherwise there will be no data exchange.
CPU with onboard Ethernet = Standard Library
CPU with Ethernet CP = SIMATIC_NET_CP
FB14.png

Sample:

     CALL  "GET" , DB14
      REQ   :=M0.0                     //Start reading with positive edge
      ID    :=W#16#1                   //S7 connection ID configured within NetPro
      NDR   :=M0.1                     //Job status 
      ERROR :=M0.2                     //ERROR flag
      STATUS:=MW2                      //STATUS infomation(Siemens documentation)
      ADDR_1:=P#M 10.0 BYTE 20         //Source address connected CPU
      RD_1  :=P#M 10.0 BYTE 20         //Destination address local CPU

Depending on the type of CPU the correct set of blocks, FB14/15 or SFB14/15 must be chosen. The final step is to tranfer the S7 program and the system data to the CPU.

Ethernet to PROFIBUS via PROFIBUS CP (Multiplexing)

S7 connection CP diagram.png

Requirements:
- SIMATIC Manager
- IBH Link S7++/IBH Link S7++ HS with Firmware >= 2.142
- CPU with PROFIBUS CP
- CPU with Ethernet onboard or Ethernet CP. The Interface must support S7 connections. It can be checked within the hardware properties: S7 connection active (Server means passive).


Download: STEP7 Sample: Ethernet to PROFIBUS via PROFIBUS-CP

Active:
EthernetMPICPaktiv.png

Passive:
EthernetMPICPpassiv.png

Within NetPro the CPU must be connected with the Ethernet. An unspecified connection needs to be created:
EthernetMPIS7connection.png

Within the properties of the S7 connection the IP address of the IBH Links must be entered:
EthernetMPIS7connection2.png

Within the address details as Rack and Slot a special ID for IBH Link Routing must be entered: Rack 7, Slot 31
EthernetMPIS7connectionCP.png

Establish connection via FB/SFB 15 (PUT)
To establish a connection over a PROFIBUS-CP with an IBH Link S7++, more connection information is required, than NetPro permits to enter. For this reason the IBH Link S7++ can be set into the projected mode. That mode permits sending the required connection information with a call to the "PUT" block as a data structure. To set this mode, only a special ID must be entered in NetPro.

Create OB1:
Within the first network the SFB15 is called to handover the parameters. Within the second network the SFB15 for the data exchange is called.
OB1.png

CALL "PUT" , DB15

      REQ   :=M0.0                     //Start reading with positive edge 
      ID    :=W#16#1                   //S7 connection ID configured within NetPro
      DONE  :=M0.1                     //Job status 
      ERROR :=M0.2                     //ERROR flag
      STATUS:=MW2                      //STATUS infomation(Siemens documentation)
      ADDR_1:=P#DB65535.DBX 224.0 BYTE 8    //IBH Link S7++ ID for PROFIBUS connection.

With this ID the IBH Link S7++ gets the needed information for the connenction.

      ADDR_2:=
      ADDR_3:=
      ADDR_4:=
      SD_1  :="PLC_CONNECTION_RECORDS".Connection[0]
      SD_2  :=
      SD_3  :=
      SD_4  :=

"PLC_CONNECTION_RECORDS" – Symbolic name of the DB, which contains the parameters for the connection. Connection[0] – Pointer to the start address within the DB, which contains the parameters for the connection. If the DB contains more than one connection, they can be selected via this parameter and access to several CPUs is possible.

CALL SFB 14 , DB14

      REQ   :=M10.0                    //Start reading with positive edge
      ID    :=W#16#1                   //S7 connection ID configured within NetPro
      NDR   :=M10.1                    //Job status
      ERROR :=M10.2                    //ERROR flag
      STATUS:=MW20                     //STATUS infomation(Siemens documentation)
      ADDR_1:=P#M 10.0 BYTE 20         //Source address connected CPU
      ADDR_2:=
      ADDR_3:=
      ADDR_4:=
      RD_1  :=P#M 10.0 BYTE 20         //Destination address local CPU
      RD_2  :=
      RD_3  :=
      RD_4  :=

Depending on the type of CPU the correct set of blocks, FB14/15 or SFB14/15 must be chosen.

A DB is needed, which contains the parameters for the connection.

DB.png

The parameters MPI address, Slot- and Rack No. are used. Entering an IP address is not needed using this kind of connection. If several connections are used, it is recommended to use UDTs.

MPI – Ethernet – MPI without projected configuration / MPI – Ethernet/MPI – IBH Link S5++

S7connection diagram.png
S7 connection Multi diagram.png
S7 connection S5 diagram.png

Requirements
- SIMATIC Manager or S7 for Windows® from IBHsoftec
- 2 x IBH Link S7++/IBH Link S7++ HS with Firmware >= 2.142
- The operating system of the CPU must contain the blocks XPUT and XGET (SFC67, SFC68). The information, whether the CPU contains these blocks can be gathered from the Siemens CPU documentation.

For this type of connection, a projected configuration with NetPro is not necessary. Within the PLC program, the blocks XPUT/XGET are called to establish a connection from one IBH Link S7 to the next IBH Link. For very comfortable configuration of the communication parameters, the blocks XPUT_IBH and XGET_IBH (developed by IBHsoftec) are available and can be found within the sample.


Download: STEP7 Sample: MPI – Ethernet – MPI without projected configuration

Block call.png

CALL FB 67 , DB67

      REQ         :=M10.0              //Start reading with positive edge
      DEST_ID     :=0                  //Pointer within parameter DB
      DB_PARA     :=100                //No. of parameter DB
      IBHLINK_ADDR:=B#16#0             //MPI Address source IBH Link
      SRC_ADDR    :=P#M 100.0 BYTE 20  //Location of data in the destination CPU
      DST_ADDR    :=P#M 100.0 BYTE 20  //Location of data in the local CPU
      RESULT      :=MW2                //STATUS infomation
      BUSY        :=M3.0               //Job status

The information for the IBH Link on how to reach the destination CPU are stored within the parameter DB.

DB 100.png

Rack and Slot No are 0 when using MPI. The parameters for S5 conenctions using the IBH Link S5++ are:

Destination IP address IP address of the IBHLink S5++
Destination MPI address 2
Destination Rack 0
Destination Slot 0

MPI – Ethernet – MPI with S7 conection (projected) / MPI – Ethernet / MPI – IBH Link S5++

S7connection diagram.png
S7 connection Multi CP diagram.png
S7 connection S5 diagram.png

Requirements
- SIMATIC Manager - 2 x IBH Link S7++/IBH Link S7++ HS with Firmware >= 2.142
- CPU with MPI Interface
- Interface has to support S7 connections


Download: STEP7 sample: MPI – Ethernet – MPI with S7 connection (projectet)


Within NetPro the CPU must be connected with the Ethernet. An unspecified connection needs to be created:
S7connection 400.png

Within the properties of the S7 connection the IP address of the IBH Links must be entered:
S7connection properties.png

Establish connection via FB/SFB 15 (PUT)
To establish a connection with an IBH Link S7++, more connection information is required, than NetPro permits to enter. For this reason the IBH Link S7++ can be set into the projected mode. That mode permits sending the required connection information with a call to the "PUT" block as a data structure. Another reason to use this connection is, if data needs to be exchanged with several CPU.

Create OB1:

Within the first network the SFB15 is called to handover the parameters. Within the second network the SFB15 for the data exchange is called. OB1.png

CALL "PUT" , DB15

      REQ   :=M0.0                     //Start reading with positive edge 
      ID    :=W#16#1                   //S7 connection ID configured within NetPro
      DONE  :=M0.1                     //Job status 
      ERROR :=M0.2                     //ERROR flag
      STATUS:=MW2                      //STATUS infomation(Siemens documentation)
      ADDR_1:=P#DB65535.DBX 224.0 BYTE 8    //IBH Link S7++ ID for PROFIBUS connection.

With this ID the IBH Link S7++ gets the needed information for the connenction.

      ADDR_2:=
      ADDR_3:=
      ADDR_4:=
      SD_1  :="PLC_CONNECTION_RECORDS".Connection[0]
      SD_2  :=
      SD_3  :=
      SD_4  :=

"PLC_CONNECTION_RECORDS" – Symbolic name of the DB, which contains the parameters for the connection. Connection[0] – Pointer to the start address within the DB, which contains the parameters for the connection. If the DB contains more than one connection, they can be selected via this parameter and access to several CPUs is possible.

CALL SFB 14 , DB14

      REQ   :=M10.0                    //Start reading with positive edge
      ID    :=W#16#1                   //S7 connection ID configured within NetPro
      NDR   :=M10.1                    //Job status
      ERROR :=M10.2                    //ERROR flag
      STATUS:=MW20                     //STATUS infomation(Siemens documentation)
      ADDR_1:=P#M 10.0 BYTE 20         //Source address connected CPU
      ADDR_2:=
      ADDR_3:=
      ADDR_4:=
      RD_1  :=P#M 10.0 BYTE 20         //Destination address local CPU
      RD_2  :=
      RD_3  :=
      RD_4  :=

Depending on the type of CPU the correct set of blocks, FB14/15 or SFB14/15 must be chosen.

A DB is needed, which contains the parameters for the connection.

DB.png


The parameters MPI address, Slot- and Rack No. are used. Entering an IP address is not needed using this kind of connection. If several connections are used, it is recommended to use UDTs.

The parameters for S5 conenctions using the IBH Link S5++ are:

Destination IP address IP address of the IBHLink S5++
Destination MPI address 2
Destination Rack 0
Destination Slot 0

Connection via IBH Link in routing mode

Requirements
- SIMATIC Manager - IBH Link S7++/IBH Link S7++ HS with Firmware >= 2.142
- CPU with MPI/PROFIBUS Interface
- Interface has to support S7 connections

Download: STEP7 Sample: Connction via IBH Link in routing mode

This kind of connection offers the possibility to exchange a large amount of data very fast - up to 64K.

For the communication, the standard blocks FB/SFB 8/9 (USEND / URCV) and FB/SFB 12/13 (BSEND / BRCV) are used.


Within the IBHNet settings the routing mode must be activated. This mode is available beginning with firmware version 2.142.

With projected connections via RFC1006 it is not possible to communicate over unprojected connections any more!

The normal IBHNet communication over port 1099 via the IBHNet driver is not influenced from this setting.

IBHLink routing.png

The IBHLink S7++ will be configured as a station within NetPro.
IBH Link as Station.png
The following station must be selected:
MLFB: 6ES7 412-2EK06-0AB0 V6.0 Rack 0, Slot 2
MPI/PROFIBUS address of the IBHLink S7++
IP Address of the IBHLink S7++

Configuration of the station within the hardwareconfigurator:
IBH Link as station HWC.png

Within NetPro all corresponding CPUs besides the IBH Link station need to be configured. The S7 connection will be established from the real existing CPU via Ethernet to the IBH Link Station. In this case the real existing CPU is the active Partner.
Connection1.png

Connection1 parameter.png

The partners connection resource is given automatically and is relvant for the next step.

Connection1 address.png

The IBH Link station establishes a S7 connection via PROFIBUS to the second real existing CPU. In this case, the IBH Link station is the active Partner. As local ID the automatically given ID from the step before must be entered (within the sample: 10).

Connection2.png

The connection status can be displayed within NetPro:

Connection status.png

This type of connection allows complex networking:

Connection multi.png

For the connection to an IBH Link S5++, no dummy CPU needs to be configured within NetPro. It is enough to create an unspecified S7 connection via Ethernet. In this case, the partner IP address is the IP address of the IBH Link S5++. Within the Address Details for the Partner Rack = 0 and Slot = 2 must be selected. For communication, the blocks PUT/GET are chosen - SFB14/15.
IBHLinkS5 address.png