Baixe Redes para computadores e outras Esquemas em PDF para Física para Ensino Médio, somente na Docsity!
NetToPLCsim - Network extension for Plcsim
Thomas Wiens
February 2, 2016
NetToPLCsim - Network extension for Plcsim by Thomas Wiens
i
LIST OF TABLES CONTENTS
- 1 Introduction Contents
- 1.1 What you can do with NetToPLCsim
- 1.2 What you cannot do with NetToPLCsim
- 1.3 How does NetToPLCsim work?
- 1.4 S7online-interface
- 2 Manual
- 2.1 Quickstart
- 2.1.1 Plcsim with S7-300/S7-400 (Step 7 V5.5, TIA-Portal)
- 2.1.2 Plcsim with S7-1200/S7-1500 (TIA-Portal)
- 2.2 General operation
- 2.2.1 Neccessary requirement
- 2.2.2 Main window
- 2.2.3 Station dialog
- 2.2.4 Protocolmonitor
- 2.2.5 Command-line arguments
- 2.3 Further informations
- 2.3.1 Multiple Plcsim-Instances
- 2.3.2 Simatic S7DOS service
- 3 Version history
- 3.1 Version 0.9.0
- 3.2 Version 0.9.1
- 3.3 Version 0.9.2
- 3.4 Version 0.9.3
- 3.5 Version 0.9.4
- 3.6 Version 0.9.5
- 3.7 Version 1.0.0
- 3.8 Version 1.1.0
- 4 License
- 1 NetToPLCsim Main window List of Figures
- 2 NetToPLCsim Station dialog
- 3 NetToPLCsim Protocolmonitor
- 4 Simulation of three Plcsim instances
- 5 Adding an IP address to a network interface (Windows 7)
- 6 Example configuration in NetToPLCsim for three Plcsim instances
- 1 Command-line arguments List of Tables
2 MANUAL 1.4 S7online-interface
1.4 S7online-interface
The S7online-interface represents the OSI layers 1 to 4 for all applications inside the Simatic universe. If a Simatic application communicates to a PLC, the data goes always through the S7online-interface. The functions of the S7online-interface are accessible through the program library s7onlinx.dll inside the windows system directory. The S7online-interface passes the data from the application to the underlying transport layer, like TCP/IP, MPI or Profibus. The transport layer which S7online is using, is configured in the dialog "Set PG/PC interface" from the Simatic application or the Windows control panel. Also the commu- nication to Plcsim runs through this interface. The data running through this interface are already S7- communication. Thus the job of NetToPLCsim is to represent the IP/IsoOnTcp transport layer, and pass the payload into the S7online-interface and back. The main problem with the S7online-interface is that it’s not official documented, which was the main problem using this interface with NetToPLCsim.
2 Manual
2.1 Quickstart
2.1.1 Plcsim with S7-300/S7-400 (Step 7 V5.5, TIA-Portal)
Use the following steps to setup a network accessible Plcsim simulation using NetToPLCsim. The de- scription is valid for Plcsim with Step 7 V5.5.
- Start the Simatic manager
- Open your S7 project you want to test
- Start Plcsim, upload the program including system data into Plcsim. You need a CPU with a ethernet network device (PN-CPU or CPU plus Ethernet CP)
- Start NetToPLCsim with administrative rights (these are neccessary to stop a Siemens service)
- If NetToPLCsim asks to stop the Siemens service, click yes
- In NetToPLCsim click on "Add"
- In the station configuration dialog, click on "... " next to the text field "Network IP Address". You get a list with all IP addresses of the existing network devices of your computer. Choose the address on which Plcsim should be accessible
- Next to the text field "Plcsim IP Address" click on "... ". You should see the Plcsim CPU you have uploaded. Select the device and click "OK"
- Set a rack/slot combination of 0/2 (for S7-400 dependant of your hardwareconfiguration
- Close the dialog with "OK"
- In the main window click on "Start server"
- Your Plcsim simulation is now reachable at the IP address shown under "Network IP address"
2.1.2 Plcsim with S7-1200/S7-1500 (TIA-Portal)
To use NetToPLCsim with TIA-Plcsim, it’s required to set the correct PG/PC interface settings. In the Windows Control Panel you open the "Set PG/PC interface" program, and set the access point for S7ONLINE to "PLCSIM S7-1200/S7-1500(TCP/IP)".
2.2 General operation
2.2.1 Neccessary requirement
You need Step 7 Plcsim with V5.4 or later, or Plcsim for TIA-Portal. In your Step 7 hardware configuration you must have an Ethernet device (PN-CPU or CPU plus Ethernet CP).
2 MANUAL 2.2 General operation
2.2.2 Main window
Figure 1 NetToPLCsim Main window
- Area showing your configured stations
- Buttons to start and stop the server for the configured stations
- Buttons to add, modify or delete a station
- Result of the port-check which is done on start of NetToPLCsim. You can use NetToPLCsim only with status OK.
2 MANUAL 2.2 General operation
NOTE
The activated monitoring reduces the data exchange rate significant.
Figure 3 NetToPLCsim Protocolmonitor
2.2.5 Command-line arguments
You can use the following command-line arguments with NetToPLCsim:
Table 1 Command-line arguments
Option Description -f=config.ini Loads this station configuration file -s=Option Autostop control of the S7DOS Help Service. Options: YES=Stop the service, NO=Don’t stop the service, ASK=ask -autostart If a valid configuration-file is loaded, the servers for the stations in the file are automatically started
Example:
NetToPLCSim.exe -f=testconfig.ini -s=NO -autostart
Further it’s possible to Drag&Drop a configuration file on the NetToPLCsim.exe file. Then NetTo- PLCsim starts and loads this configuration.
2 MANUAL 2.3 Further informations
2.3 Further informations
2.3.1 Multiple Plcsim-Instances
The following example demonstrates how to realize three network reachable Plcsim instances with Net- ToPLCsim. The main principle could be extended to a arbitrary number of additional instances (tested with 6 Plcsim instances).
Figure 4 Simulation of three Plcsim instances
Each Plcsim instance needs it’s own IP address, under which it’s later reachable from your network. One option is that you’ve got more than one network interface in your computer. The other option is to add one or more IP addresses to the existing network interface. In the following screenshot, it is shown how to add an additional IP address to your network inter- face under Windows 7 (german).
Figure 5 Adding an IP address to a network interface (Windows 7)
3 VERSION HISTORY
NetToPLCsim remembers when you have stopped the Siemens service on program start. If you close NetToPLCsim, you can optional restart the Siemens service (recommended).
NOTE
If you want to program a real S7-PLC after testing with NetToPLCsim, it’s recommended to restart the computer!
3 Version history
3.1 Version 0.9.
- First version using the S7online interface
3.2 Version 0.9.
- added optional monitoring of the data-exchange
3.3 Version 0.9.
- Fixed: Data exchange with Plcsim doesn’t hang up any more, when packets of some special PDU sized 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
3.4 Version 0.9.
- 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
3.5 Version 0.9.
- NetToPLCsim answers a client that only one single request at time can be handled (MaxAmQCall- ing/MaxAmQCalled)
- Added optional setting for rack/slot combination of CPU (maybe possible to connect to TIAPortal 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
3.6 Version 0.9.
- Adding Tool "Get Port 102" in Menu Tools, which helps to get NetToPLCsim working under Step 7 V5.5 SP2 and Windows 64 Bit
4 LICENSE 3.7 Version 1.0.
3.7 Version 1.0.
- Redesign of handling the S7online interface. NetToPLCsim supports now the full functionality of Plcsim. Programming functions like up- and downloading of program blocks and online diag- nostics are possible. Also block-specific messages like ALARM_S, ALARM_8 and cyclic variable services are supported.
- Added own response telegram to SZL-ID 16#0x74, used to get the LED state of the CPU. Indepen- dent of the operating mode, the response is always RUN-LED on, and all other LEDs off.
3.8 Version 1.1.
- Fixed: if many ISO packets were sent in a single TCP telegram, this may have caused an exception and disconnect (for V.1.0.0)
- Added support to S7-Plcsim for TIA-Portal S7-1200/
- Function "Get Port 102" from tools-menu is now executed on program start to stop the Siemens service
- Monitor window: With mouseclick on statusbar the capturing can be paused and resumed
- New documentation using Windows-Help files
- Changed license from GPL to LPGL
4 License
NetToPLCsim is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. NetToPLCsim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR- POSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with NetToPLC- sim. If not, see http://www.gnu.org/licenses/.