Sei sulla pagina 1di 8

NetToPLCsim S7ONLINE Versión

V 0.9.5

Introducción

El viejo NetToPLCsim-Versión utilizó el S7ProSim-COM-objeto para intercambiar datos con PLCSIM. La versión descrita en este
documento se utiliza la denominada interfaz S7ONLINE. La versión anterior tuvo que diseccionar el S7-protocolo y leer / escribir
datos a través de la interfaz de S7ProSim. La nueva versión se inicia un servidor ISOonTCP y envía la carga útil en el
S7ONLINE-interfaz.

Las principales diferencias entre la 'vieja' y 'nueva' versión:


• Soporte de múltiples clientes (máx. 100)
• No hay límites en las áreas de datos compatibles, es posible leer y escribir temporizador (T) y el contador (C), de lectura-entradas

digitales (I) y escribir digitales-salidas (O)

• Soporte de múltiples instancias PLCSIM


• rendimiento de datos mejorada

• Apoyo de otras funciones de PLC, como Run / Stop, TimeSystem, lectura del SZL (puede ser diferente a un 'real' PLC)

To use this new version, you have to configure a PLC with a network interface, like a PN-CPU or a classis CPU with
additional Ethernet CP.
NetToPLCsim acts as intermediary between Plcsim and your real network interface.

The service „SIMATIC IEPG Helper“ („SIMATIC S7DOS Help Service“ since V5.5 SP2)

As you have Step7 installed on your PC, then there is a Windows service called „SIMATIC IEPG Helper“ running in the
background. This service holds TCP port 102 in use. But this port is used for S7-communication, so this service must be
stopped before starting NetToPLCsim. At program start, NetToPLCsim checks if port 102 is free. If it's not, then it asks to stop
the „SIMATIC IEPG Helper“ service.

When you ended with testing with NetToPLCsim, it's recommended to restart the service before doing other work with
SIMATIC software.

Alternitavely you can stop the service with the following two little batch files:

32-Bit Step7:
Stop IEPGhelper.bat:
net stop s7oiehsx

Start IEPGhelper.bat:
net start s7oiehsx

64-Bit Step7:
Stop IEPGhelper.bat:
net stop s7oiehsx64

Start IEPGhelper.bat:

Thomas Wiens ( th.wiens@gmx.de ), 14.03.2015


net start s7oiehsx64
Hint
You need administrative rights to make changes on the windows service control. On Windows XP your actual user
account needs admin-rights, on Windows 7 you need to start NetToPlCsim with administrative rights

Simulation with one single Plcsim instance

Example configuration:
S7-300 PN-CPU with IP-address: 192.168.1.101
LAN interface IP-address: 192.168.1.10

PLCSIM (IP
192.168.1.101) NetToPLCsim

S7-Protokoll IsoOnTcp
LAN-Schnittstelle
S7online (192.168.1.10)

Figure 1: Simulation with one single Plcsim-PLC

1) Start PLCSIM out of the SIMATIC-Manager


2) Set PG/PC interface in PLCSIM to 'PLCSIM(TCP/IP)'
3) Load your PLC program including system data into PLCSIM
4) Start NetToPLCsim
5) In NetToPlCsim add a new station
6) Insert unique name in „Name“ field for this station
7) In „Network IP Address“ field, insert the IP-address of your LAN interface, on which Plcsim should be reachable (e.g.
192.168.1.10). Clicking on (…) shows a new windows where all interface IP-addresses are listed.

8) In „Plcsim IP Address“ field, insert the IP-address of your PLC (IP-address which is shown in Plcsim status bar).
Clicking on (…) shows a new windows where all PLCSIM reachable PLCs are listed.

9) Apply station configuration with OK


10) A click on „Start all“ will start the servers

When state changes to 'RUNNING', a client like SCADA/visualisation-systems can reach the Plcsim PLC on IP-address
192.168.1.10

To stop the simulation, at the first step stop NetToPLCsim. At the second step stop PLCSIM.

Settings in station configuration dialog:

Thomas Wiens ( th.wiens@gmx.de ), 14.03.2015


1

1) Unique name for the station


2) IP-Address of the LAN-Interface where this server should be reachable
3) IP- Address of the Plcsim-CPU
4) Rack/Slot position of the CPU. This setting is only relevant for the optional TSAP check (maybe in later versions
of Nettoplcsim it's possible to connect to TIA-Portal Plcsim for 1200/1500 CPUs)

5) If this option is checked, the TSAP-settings on client-side and the rack/slot settings above must be consistent (for
experts: Nettoplcsim allows connection ressources 1=PG, 2=OP, or 3=Step7Basic)

Simulation of multiple Plcsim-Instances

Thomas Wiens ( th.wiens@gmx.de ), 14.03.2015


PLCSIM1 (IP
192.168.1.101)

LAN-Schnittstelle
1. IP-Adresse
(192.168.1.10)

PLCSIM2 (IP
192.168.1.102) NetToPLCsim

LAN-Schnittstelle
2. IP-Adresse
(192.168.1.11)

PLCSIM3 (IP
192.168.1.103)

LAN-Schnittstelle
3. IP-Adresse
(192.168.1.12)

Figure 2: Simulation with three Plcsim-PLCs

To connect to multiple PLCSIM-simulations at the same time, NetToPLCsim needs a separate IP- address for each
server to start on. It's possible to realize this with inserting more than one network interface card, or by simply adding
additional IP-addresses to the existent interface.

Figure 3: Adding a aditional IP-Address to your LAN interface (Windows 7 german version)

Hint
To avoid later network problems, you should delete the additional IP-addresses when finished with testing (my experience)

A new PLCSIM instance can be started out of the first PLCSIM instance by menu File → „New Plc“

Thomas Wiens ( th.wiens@gmx.de ), 14.03.2015


(or something like that, I've got only the german version).

The following steps are equal to simulation with on PLCSIM instance.

For the constellation shown in fig.2, the configuration shown in this image is needed:

Figure 4: Nettoplcsim configuration with three PLCs

Monitoring of the data-exchange

When the nettoplcsim servers are started, the „Start monitoring“ entry in the context-menu of the station list is enabled. For
each station a separate monitoring-windows can be started. In the monitoring-windows only the usually telegrams for
data-exchange (Read/Write-Requests) between a PLC and a SCADA-system are shown.

To debug more details of the protocol, you can use Wireshark with my s7comm plugin-dll.
http://sourceforge.net/projects/s7commwireshark

Notice
The activated monitoring reduces the data exchange rate significant.

Thomas Wiens ( th.wiens@gmx.de ), 14.03.2015


Figure 5: Nettoplcsim protocolmonitor

Command-Line Arguments

The following command-line arguments are possible:

- f=configurationfile.ini Loads this station configuration file


- s=Option Autostop control of IEPG-Helper service. Options:

YES=Automatically stop the service, NO=Don't stop, ASK=ask


- autostart Is a valid configuration file given, the servers for activated station are automatically
started

Example:
NetToPLCSim.exe -f=testconfig.ini -s=NO -autostart

Further it is possible to Drag&Drop a configuration file on the NetToPLCsim.exe file. Then this NetToPLCsim starts
with this configuration.

Thomas Wiens ( th.wiens@gmx.de ), 14.03.2015


Special for using Nettoplcsim with Step 7 V5.5 SP2 under 64 Bit Windows

Since this version the Service which uses Port 102 seems to have got new functions, and is now called „SIMATIC S7DOS
Help Service“.

If the service is only stopped, then programming functions can't be used any more. If you want to use

Nettoplcsim under this circumstances, you have to use it in this order:

1) Make sure you don't have used Step7 after Windows was started, otherwise reboot
2) Start Nettoplcsim with administrative rights
3) Let Nettoplcsim stop the service
4) Choose "Get Port 102" from Tools menu, should be ended with success
5) Start Simatic Manager
6) Start Plcsim and upload your station and program
7) Add station in Nettoplcsim, start the Nettoplcsim server
8) Use your client application

Notice
If you want to do programming real PLCs after testing with Nettoplcsim, a reboot of Windows is highly recommended!

Thomas Wiens ( th.wiens@gmx.de ), 14.03.2015


Version history

0.9.0
• First version using the S7online interface

0.9.1
• added optional monitoring of the data exchange

0.9.2
• Fixed: Data exchange with plcsim doesn't hang up any more, when packets of some PDU sizes occur

• Check of the running IEPG-Helper servicename to stop/start service in Windows 32 or 64 Bit OS

• Added Command-Line Arguments, and the possibility to Drag&Drop a configuration file on the NetToPLCsim.exe

0.9.3
• Temporary fix: Implemented own response for SZL-ID 0x0131 index 3 request, to force clients not to use the
cyclic data exchange mechanism, which causes sometimes communication failures

• Usability: Automatic name generation when a new station is added

0.9.4
• Nettoplcsim answers a client that only one single request at time can be handled
(MaxAmQCalling/MaxAmQCalled)
• Added optional setting for rack/slot combination of CPU (maybe possible to connect to TIA- Portal Plcsim)

• Added option for TSAP check corresponding to entered rack/slot. Connection ressources 1, 2 or 3 are valid (1=PG,
2=OP, 3=S7basic)
• Protocol monitor: requested index and ID of SZL requests are shown

0.9.5
• Adding Tool „Get Port 102“ in Menu Tools, which helps to get Nettoplcsim working under Step 7 V5.5 SP2 and
Windows 64 Bit

Thomas Wiens ( th.wiens@gmx.de ), 14.03.2015

Potrebbero piacerti anche