Similar documents


Configuration of an MRP ring with SIMOCODE and SIMATIC S SIMOCODE pro V PN, SIMATIC S Siemens Industry Online Support

Configuration of an MRP Ring and a Topology with Two Projects






Visualizing Energy Data of a SITOP PSU8600


Multiuser Engineering in the TIA Portal


SINAMICS G/S: Integrating Warning and Error Messages into STEP 7 V5.x or WinCC flexible

Integration of Process Historian / Information Server in a Domain

Migration of a Process Historian database

APF report templates based on data from the WinCC User Archive

STEP 7 Professional V14 SP1, Energy Suite V14 SP1, SENTRON PAC Measuring Devices, Modbus TCP


Determination of suitable hardware for the Process Historian 2014 with the PH-HWAdvisor tool

Application example 02/2017. SIMATIC IOT2000 Connection to IBM Watson IoT Platform SIMATIC IOT2040


Position Control with SIMATIC S and SINAMICS V90 via IRT PROFINET SINAMICS V90 PROFINET. Application description 03/2016

Display of SINAMICS Error Messages in Runtime Professional

Application example 12/2016. SIMATIC IOT2000 OPC UA Client SIMATIC IOT2020, SIMATIC IOT2040

SIMATIC NET OPC Server Implementation


Check List for Programming Styleguide for S7-1200/S7-1500

Automatic Visualization of the Sample Blocks in WinCC Advanced


SINAMICS G/S: Tool for transforming Warning and Error Messages in CSV format

Display of SINAMICS Fault Messages in WinCC V7.4

Acyclic communication between S and V90PN via PROFINET. Application example 12/

Data Storage on Windows Server or NAS Hard Drives


Communication between HMI and Frequency Converter. Basic Panel, Comfort Panel, Runtime Advanced, SINAMICS G120. Application Example 04/2016

PNDriver V2.1 Quick Start Guide for IOT2040 SIMATIC IOT





Setting up 08/2017. Setting up the SIMATIC IOT2000 SIMATIC IOT2020, SIMATIC IOT2040


Calculating the expected PH storage requirements of SIMATIC BATCH batches

Setting up 01/2017. Setting up the SIMATIC IOT2000 SIMATIC IOT2020, SIMATIC IOT2040

Checking of STEP 7 Programs for the Migration of S7-318 to S CPU318 Migration Check. Application description 01/2015


Generating the Parameters for the Modbus/TCP Communication

Library Description 08/2015. HMI Templates. TIA Portal WinCC V13.

Single Message Report for the Information Server. SIMATIC PCS 7, SIMATIC Information Server Siemens Industry Online Support

Exchange of large data volumes between S control system and WinCC

Improving the performance of the Process Historian


Windows firewall settings for X-Tools Server Pro. CMS X-Tools / V / CPU PN/DP. Application description 6/2016

RAID systems within Industry


Key Panel Library / TIA Portal

Cover. WinAC Command. User documentation. V1.5 November Applikationen & Tools. Answers for industry.

Integration of SIMATIC PCS 7 Asset Management into existing projects


SIMATIC Energy Suite Visualization example of the "*.csv"-energy Data Files

User Login with RFID Card Reader


Message Cycle Report for the Information Server. SIMATIC PCS 7, SIMATIC Information Server Siemens Industry Online Support



Moving a Process Historian/ Information Server from Workgroup A to Workgroup B

Setting up time synchronization of Process Historian and Information Server

S Data Transfer with SEND/RECEIVE Interface

Tabular SIMATIC BATCH report for the Information Server. SIMATIC PCS 7 / SIMATIC Information Server 2014 / Customized Reporting


House Control with Touch Panel

TeleService of a S station via mobile network


X-Tools Loading Profile Files (LPF)

Time Synchronization with an HMI Operator Panel and a SIMATIC PLC



SIMATIC Target 1500S: Calling Simulink Models


Check List for Programming Styleguide for S7-1200/S7-1500

STEP 7 function block to control a MICROMASTER 4 or SINAMICS G120/G120D via PROFIBUS DP


Applications & Tools. Time-of-Day Synchronization between WinCC Runtime Professional and S7 Controllers. WinCC Runtime Professional

SIMATIC Visualization Architect (SiVArc) Getting Started

Universal Parameter Server


Project planning of the NTP time synchronization of a Process Historian and Information Server. SIMATIC PCS 7, SIMATIC Information Server 2014

Engineering of the Configuration Control for IO Systems

Configuring the F-I-Device function with the SENDDP and RCVDP blocks.

Networking a SINUMERIK 828D

PCS 7 Configuration Changes in RUN with Active Fieldbus Diagnosis

Production feedback via WinCC Data Transfer with XML file

Setting up a secure VPN connection between two SCALANCE S Modules Using a static IP Address



Diagnostics for enabled Configuration Control with S and ET200SP

Transmitting HMI data to an external monitor

Application Example 09/2015. Data Record Communication via I-Device SIMATIC S

Report operator actions with the WinCC WebNavigator

Transcription:

Restarting Windows at the SIMATIC S7-1500 Software Controller Software Controller V 2.1, TIA Portal V14 SP1 https://support.industry.siemens.com/cs/ww/en/view/109748679 Siemens Industry Online Support

Siemens AG 2017 All rights reserved Warranty and Liability Warranty and Liability Note The Application Examples are not binding and do not claim to be complete regarding the circuits shown, equipping and any eventuality. The Application Examples do not represent customer-specific solutions. They are only intended to provide support for typical applications. You are responsible for ensuring that the described products are used correctly. These Application Examples do not relieve you of the responsibility to use safe practices in application, installation, operation and maintenance. When using these Application Examples, you recognize that we cannot be made liable for any damage/claims beyond the liability clause described. We reserve the right to make changes to these Application Examples at any time without prior notice. If there are any deviations between the recommendations provided in these Application Examples and other Siemens publications e.g. Catalogs the contents of the other documents have priority. We do not accept any liability for the information contained in this document. Any claims against us based on whatever legal reason resulting from the use of the examples, information, programs, engineering and performance data etc., described in this Application Example shall be excluded. Such an exclusion shall not apply in the case of mandatory liability, e.g. under the German Product Liability Act ( Produkthaftungsgesetz ), in case of intent, gross negligence, or injury of life, body or health, guarantee for the quality of a product, fraudulent concealment of a deficiency or breach of a condition which goes to the root of the contract ( wesentliche Vertragspflichten ). The damages for a breach of a substantial contractual obligation are, however, limited to the foreseeable damage, typical for the type of contract, except in the event of intent or gross negligence or injury to life, body or health. The above provisions do not imply a change of the burden of proof to your detriment. Any form of duplication or distribution of these Application Examples or excerpts hereof is prohibited without the expressed consent of the Siemens AG. Security information Siemens provides products and solutions with industrial security functions that support the secure operation of plants, systems, machines and networks. In order to protect plants, systems, machines and networks against cyber threats, it is necessary to implement and continuously maintain a holistic, state-of-the-art industrial security concept. Siemens products and solutions only form one element of such a concept. Customer is responsible to prevent unauthorized access to its plants, systems, machines and networks. Systems, machines and components should only be connected to the enterprise network or the internet if and to the extent necessary and with appropriate security measures (e.g. use of firewalls and network segmentation) in place. Additionally, Siemens guidance on appropriate security measures should be taken into account. For more information about industrial security, please visit http://www.siemens.com/industrialsecurity. Siemens products and solutions undergo continuous development to make them more secure. Siemens strongly recommends to apply product updates as soon as available and to always use the latest product versions. Use of product versions that are no longer supported, and failure to apply latest updates may increase customer s exposure to cyber threats. To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed under http://www.siemens.com/industrialsecurity. Entry ID: 109748679, V1.0, 09/2017 2

Siemens AG 2017 All rights reserved Table of Contents Table of Contents Warranty and Liability... 2 1 Introduction... 4 1.1 Overview... 4 1.2 Components used... 5 2 Mode of Operation... 6 3 Engineering... 8 3.1 Configuring TIA Portal... 8 3.1.1 Configuring the CPU 1515SP PC (CPU 1505SP)... 8 3.2 Configuring the CPU... 10 3.3 Restarting Windows using a TIA Portal instruction... 11 3.3.1 FB "Shutdown"... 12 3.3.2 FB "ShutdownBlueScreen"... 13 3.4 Restarting Windows using the ODK function... 15 3.4.1 FB "ShutdownOdk"... 16 3.5 Operation... 16 3.5.1 Restarting Windows using a digital input... 16 3.5.2 Restarting Windows using trigger tags... 17 3.5.3 Restarting Windows using the command line... 19 3.5.4 Restarting Windows using a batch file... 19 4 Valuable Information... 20 4.1 Windows settings... 20 4.2 Loading a TIA Portal project... 21 4.2.1 Prerequisite... 21 4.2.2 Situations requiring a complete loading process... 21 4.2.3 Procedure... 22 4.2.4 Checking the result of the loading process... 22 4.3 Enabling the web server... 23 4.4 ODK application... 24 4.4.1 Prerequisites... 24 4.4.2 Creating an ODK application using Microsoft Visual Studio... 24 4.4.3 Integrating an SCL file into the TIA Portal project... 27 5 Appendix... 29 5.1 Service and support... 29 5.2 Links and literature... 30 5.3 Change documentation... 30 Entry ID: 109748679, V1.0, 09/2017 3

Siemens AG 2017 All rights reserved 1 Introduction 1 Introduction 1.1 Overview A restart or an operating system crash of Windows does not affect the correct functioning of the CPU. The CPU remains in the operating mode RUN and controls the automation process. You can restart Windows using the following options: Windows start menu Windows command line Restart using the TIA Portal instruction "SHUT_DOWN" ODK function If Windows crashes, you can restart Windows with the following configurations: Configure Windows in such a way that it will be restarted automatically after a crash. In the TIA Portal project, configure a block which queries the status of Windows and restarts Windows. Note If you switch off your PC, Windows is shut down and all active applications are terminated. During shutdown of the "Windows" operating system, the CPU is terminated as well. The CPU saves the permanent data. Entry ID: 109748679, V1.0, 09/2017 4

Siemens AG 2017 All rights reserved 1 Introduction 1.2 Components used This application example has been created with the following hardware and software components: Table 1-1 Component STEP 7 Professional (TIA Portal) SIMATIC ET 200SP Open Controller CPU1515SP PC Quantit y Article number 1 6ES7822-1..04-.. V14 SP1 Note 1 6ES7 677-2AAxx-0xB0 V2.1 (PC station V2.2) CPU 1505SP 1 6ES7 672-5DC01-0YA0 V2.1 CPU 1500 ODK 1 6ES7 806-2CD02-0YA0 V2.0 Digital input module DI 8x24VDC ST 1 6ES7 131-6BF00-0BA0 V1.1 This application example consists of the following components: Table 1-2 Component File name Note Documentation TIA Portal project ODK project Batch files 109748679_SWControllerRestart Windows_DOC_V10_en.pdf 109748679_SWControllerRestart Windows_PROJ_V10.zip 109748679_SWControllerRestart Windows_CODE_V10.zip OdkWinRestart - - RestartOnlyWindows.bat AbortRestartWindows.bat Entry ID: 109748679, V1.0, 09/2017 5

Siemens AG 2017 All rights reserved 2 Mode of Operation 2 Mode of Operation Figure 2-1 CPU is running Windows ready for operation Windows has crashed Manual restart operations Alternative operations Windows option Automatic restart in case of an error Windows start menu Restart using the TIA Portal instruction "SHUT_DOWN" Command line ODK f unction Windows is ready to run If Windows works correctly, you can use the following options to restart Windows. Windows start menu Windows command line (see chapter 3.5.3) Restart using the TIA Portal instruction "SHUT_DOWN (see chapter 3.3) ODK function (see chapter 3.4) Windows has crashed To restart Windows in case of a crash, you have to define in advance how to restart Windows. Select one of the following options: Using the Windows option Automatic restart in case of an error (see chapter 4.1). Restart using the TIA Portal instruction "SHUT_DOWN (see chapter 3.3) ODK function (see chapter 3.4) Entry ID: 109748679, V1.0, 09/2017 6

Siemens AG 2017 All rights reserved 2 Mode of Operation If Windows has crashed, you can go online via the PROFINET interface (software PLC_1) assigned to the CPU and operate the CPU. Figure 2-2 Please observe the information given in the chapter "Windows restart during operation of the software controller of the manual "SIMATIC S7-1500 Software Controller Supplements to CPU 1505SP (F), CPU 1507S (F) Version 2". https://support.industry.siemens.com/cs/ww/en/view/109741100/93292147851 Entry ID: 109748679, V1.0, 09/2017 7

Siemens AG 2017 All rights reserved 3 Engineering 3 Engineering 3.1 Configuring TIA Portal 3.1.1 Configuring the CPU 1515SP PC (CPU 1505SP) Configure the CPU 1515SP PC according to Figure 3-1 or refer to the included TIA Portal project for information on how to configure it. Figure 3-1: CPU 1515SP PC hardware configuration 2 1 3 The following setup has been configured in the CPU 1515SP PC station: Table 3-1: CPU 1515SP PC station Slot Module Description 1 PROFINET onboard PROFINET communication with ET 200SP station, SINAMICS G120, database PC 2 CPU 1505SP Software Controller for controlling the application example 3 DI 8x24VDC ST Digital input module For further information on SIMATIC S7-1500 CPU 150xSP, refer to the operating instructions "S7-1500 Software Controller CPU 1505SP (F), CPU 1507S (F) Version 2": https://support.industry.siemens.com/cs/ww/en/view/109740725 Entry ID: 109748679, V1.0, 09/2017 8

Siemens AG 2017 All rights reserved 3 Engineering Network view of the device configuration The figure below shows the device configuration of the application example. Figure 3-2: Network view (TIA Portal) Configured PROFINET device names The following device names are used in the application example: Table 3-2 IP address Device type Name 192.168.2.250 CPU 1515SP PC PC-System_1 192.168.2.25 CPU 1505SP Software PLC_1 Configuring startup properties of the CPU In your TIA Portal project, check whether the option Automatic start after booting the PC" is enabled. For the bundle "SIMATIC ET 200SP Open Controller" (CPU 1505SP), the option Automatic start after booting the PC" is enabled by default in TIA Portal. Otherwise, you can enable the option as follows: 1. Start the TIA Portal. 2. Open your TIA Portal project. 3. Go to the project view. 4. Open the device view of the Software PLC. 5. Select the CPU. 6. In the inspector window, select "Properties > General > Startup". 7. Enable "Automatic start after booting the PC. 8. Load the configuration into the CPU as described in chapter 4.2. Entry ID: 109748679, V1.0, 09/2017 9

Siemens AG 2017 All rights reserved 3 Engineering Note If you change the startup properties, you have to load the entire PC system into the CPU. 3.2 Configuring the CPU By default, the CPU ignores a restart of Windows in order to continue to control the automation process. If you have activated the CPU reboot via the command line command "CPU_Control /AllowReboot", you have to execute the following command in the command line: "CPU_Control /DisallowReboot" Thus, the CPU will not be rebooted in case of a Windows restart. For further information on "Operation using the command line commands", refer to the chapter Operation using the command line commands in the operating instructions "SIMATIC S7-1500 Software Controller CPU 1505SP (F), CPU 1507S (F) Version 2 : https://support.industry.siemens.com/cs/ww/en/view/109740725/92382134411 Entry ID: 109748679, V1.0, 09/2017 10

Siemens AG 2017 All rights reserved 3 Engineering 3.3 Restarting Windows using a TIA Portal instruction You can use the SHUT_DOWN instruction to restart Windows on the PC-based automation system. You can find the instruction via the task card "Instructions > Basic instructions > Program controls operations > Runtime Control". The following modes of the "SHUT_DOWN" instruction are used in the application example: MODE = 4: Windows is shut down correctly and restarted. The CPU remains in RUN. MODE = 5: Restart Windows. (Similar to MODE 4. Exception: MODE 5 must be used only if Windows has crashed.) If you want to add the "SHUT_DOWN" instruction to your TIA Portal project, proceed as follows: 1. Create a block in your TIA Portal project. 2. Add the "SHUT_DOWN" instruction. 3. Interconnect this block. 4. Load the configuration into the CPU as described in chapter 4.2. For more information about the SHUT_DOWN instruction, please refer to the chapter "SHUT_DOWN: Shut down target system (S7-1200, S7-1500)" in the "STEP 7 Professional V14 SP1" manual: https://support.industry.siemens.com/cs/ww/en/view/109747136/94529432331 If you are using the "SHUT_DOWN" instruction for a restart after Windows has crashed, you have to disable automatic restart in Windows (see chapter 4.1). The following FBs have been created in the application example: "Shutdown": Restart after a specified time "ShutdownBlueScreen": Restart in case of blue screen Entry ID: 109748679, V1.0, 09/2017 11

Siemens AG 2017 All rights reserved 3 Engineering 3.3.1 FB "Shutdown" The "SHUT_DOWN" instruction is called in the FB "Shutdown" with MODE = 4. To make sure that Windows restarts only after a specified time, the "SHUT_DOWN" instruction is started with the switch-on delay "TON". The FB "Shutdown" is called in the "Main OB. Figure 3-3 Table 3-3 Parameter Format Description Input parameters delaytime TIME (IEC time) Delay time Output parameters status WORD Error code of the instruction "SHUT_DOWN" elapsedtime TIME (IEC time) Current time value Input/output parameters trigger BOOL Setting the tag to "true" starts the switch-on delay. After the delay time has elapsed, Windows is restarted. delaytime Examples for value inputs of the data type TIME: "t#10d_20h_30m_20s_630ms" It is not necessary to specify all time units. In the application example, the time "T#5m10s" is interconnected at the input. If you do not want a delay time, you can interconnect "t#0s". "TON" instruction You can find the instruction via the task card "Instructions > Basic instructions > Timer operations". For further information on the TON instruction, please refer to the manual: https://support.industry.siemens.com/cs/ww/en/view/109747136/85697387019 Entry ID: 109748679, V1.0, 09/2017 12

Siemens AG 2017 All rights reserved 3 Engineering 3.3.2 FB "ShutdownBlueScreen" The "SHUT_DOWN" instruction is called in the FB "ShutdownBlueScreen" with MODE = 5. The Windows status is queried by means of the instruction "RDREC". In case of a Windows status "Bluescreen", the instruction "SHUT_DOWN" is executed. The FB ShutdownBlueScreen" is called in the "Main OB. Figure 3-4 Table 3-4 Parameter Format Description Input parameters idwindiag HW_IO HW ID 59 (host interface RID) Output parameters error Bool 0: no errors 1: Block error, statusid returns error source, status returns error code. status Word "status" returns the status/error code of the instructions "SHUT_DOWN" or "RDREC. statusid UInt "statusid" returns the ID of the error source. (See statusid ) Input/output parameters windowsdiag typewindowsdiag Windows status (see typewindowsdiag) statusid The error sources are described in the following table: Table 3-5 statusid Description 1 Status/error code of the "SHUT_DOWN instruction 2 Status/error code of the "RDREC" instruction typewindowsdiag The PLC data type contains Windows status. Table 3-6 Tag name Data type Meaning windowsisrunning Bool Windows is running windowsisnotrunning Bool Windows is not running bluescreen Bool Blue screen" Entry ID: 109748679, V1.0, 09/2017 13

Siemens AG 2017 All rights reserved 3 Engineering "RDREC" instruction The instruction can be found via the task card "Instructions > Extended instructions > Distributed I/O". To determine the Windows status via the "RDREC" instruction, you have to call the block with the following input parameters: Table 3-7 Input Type Value (HIC) ID HW_IO 59 (host interface RID) INDEX DINT 0x7FFE MLEN UINT 9 RECORD VARIANT Address to each area of 9 bytes The Windows status is returned via the eighth byte and may have the following content: 0x01: Windows is running 0x02: Windows is not running 0x03: Blue screen For further information on the RDREC" instruction, please refer to the manual: https://support.industry.siemens.com/cs/ww/en/view/109747136/96668597515 Entry ID: 109748679, V1.0, 09/2017 14

Siemens AG 2017 All rights reserved 3 Engineering 3.4 Restarting Windows using the ODK function Copying the ODK DLL file ODK application If you want to restart Windows using the ODK function, you have to copy the "OdkWinRestart.dll" into the subfolder "C:\ProgramData\Siemens\Automation\ODK1500S" of the SIMATIC ET 200SP Open Controller or SIMATIC IPC. The DLL file is located in the included project OdkWinRestart" in the Release directory of the respective example. For the application example, a new ODK application has been created and integrated into the supplied TIA Portal project. This ODK application restarts Windows. Information on how to create a new ODK application and how to integrate the SCL file into a TIA Portal project can be found in chapter 4.4 Entry ID: 109748679, V1.0, 09/2017 15

Siemens AG 2017 All rights reserved 3 Engineering 3.4.1 FB "ShutdownOdk" In the supplied TIA Portal project, the ODK application is already integrated and can be called in the FB "ShutdownOdk". The FB ShutdownOdk" is called in the "Main OB. Figure 3-5 Table 3-8 Parameter Format Description Output parameters error BOOL 0: no errors 1: Block error, statusid returns error source, status returns error code. status Word "status" returns the status/error code of the ODK FBs. statusid UInt "statusid" returns the ID of the error source. (see statusid). Input/output parameters trigger Word Setting the tag to "true" restarts Windows. statusid The error sources are described in the following table: Table 3-9 statusid Description 1 Status/error code of the FB "OdkWinRestart_Load" 2 Status/error code of the FB "OdkWinRestart_WindowsRestart" 3 Status/error code of the FB OdkWinRestart_Unload" 3.5 Operation 3.5.1 Restarting Windows using a digital input FB "Shutdown" FB "ShutdownOdk" If you want to restart Windows using the FB Shutdown, provide a positive signal at input 0.0 (inputtrigger) of the digital input module. If you want to restart Windows using the FB ShutdownOdk, provide a positive signal at input 0.1 (inputtriggerodk) of the digital input module. Entry ID: 109748679, V1.0, 09/2017 16

Siemens AG 2017 All rights reserved 3 Engineering 3.5.2 Restarting Windows using trigger tags Block editor 1. Open the TIA Portal project. 2. Open the "Main" OB. 3. Click Monitor On/Off in the block editor. 4. Optional: Set the time ("delaytime") after which Windows shall be restarted. 5. Set the "Data".trigger or "Data".triggerOdk tag to True. Web server Watch tables" 1. Open the TIA Portal project. 2. Create a watch table with the tag "Data".trigger or "Data".triggerOdk. 3. Configure the web server as described in chapter 4.3. 4. Open the web server via the PROFINET interface (192.168.2.25) assigned to the CPU. 5. Open the Watch tables page. 6. In the "Modify value column, enter the value "1". 7. Click the "Apply button. 4 7 7 6 6 5 Entry ID: 109748679, V1.0, 09/2017 17

Siemens AG 2017 All rights reserved 3 Engineering Web server Tag status 1. Configure the web server as described in chapter 4.3. 2. Open the web server via the PROFINET interface assigned to the CPU. 3. Open the Tag status" page. 4. In the "Name" column, enter your tag name "Data".trigger or "Data".triggerOdk. 5. In the Modify value column of the "Data".trigger" line, enter the value "1". 6. Click the "Apply button. 4 5 6 3 Entry ID: 109748679, V1.0, 09/2017 18

Siemens AG 2017 All rights reserved 3 Engineering 3.5.3 Restarting Windows using the command line 1. Open the command prompt via Start > All Programs > Accessories > Command Prompt or click <Windows + R>. 2. Enter cmd and click OK. 3. In the open console window, enter the following command to restart Windows: shutdown /r To restart the PC e. g. in 5 minutes, enter the following command: shutdown /r /t 300 4. As soon as you press Enter, the command will be executed. 5. If you want to cancel the command, enter the following command: shutdown /a 3.5.4 Restarting Windows using a batch file You can also use the command line commands automatically in batch files or scripts. Two batch files are included in the application example. RestartOnlyWindows.bat CPU_Control /DisallowReboot shutdown /r /t 300 PAUSE AbortRestartWindows.bat shutdown /a Entry ID: 109748679, V1.0, 09/2017 19

Siemens AG 2017 All rights reserved 4 Valuable Information 4 Valuable Information 4.1 Windows settings Using the Windows option Automatic restart in case of an error automatically restarts Windows in case of an error. If the Windows option "Automatic restart in case of an error" is disabled, the blue screen will be displayed in case of an error instead of Windows being restarted automatically. In Windows, the option "Automatic restart in case of an error" can be found in: Control Panel > System > Advanced system settings > Startup and Recovery > Settings.. > "Automatically restart" Figure 4-1 Note If, in case of a Windows crash, you want to trigger an automatic restart by the user program, you have to disable the option "Automatically restart". Entry ID: 109748679, V1.0, 09/2017 20

Siemens AG 2017 All rights reserved 4 Valuable Information 4.2 Loading a TIA Portal project 4.2.1 Prerequisite Via Ethernet, the hardware component SIMATIC ET 200SP Open Controller or SIMATIC IPC is physically connected to the PC on which TIA Portal is installed. The interface settings on the SIMATIC ET 200SP Open Controller or SIMATIC IPC and in the TIA Portal are identical. Note Use the following interfaces: Interface "X1" for SIMATIC IPC Interface "X2" for CPU 1515SP PC For initial configuration, no hardware configuration is loaded on the device yet. For this reason, the PROFINET interfaces cannot be used. 4.2.2 Situations requiring a complete loading process In case of the following changes of the TIA Portal project, you have to load the entire PC system with all possible communication partners: Changing the index Setting a storage location for remanent data Configuring the hardware LEDs Changing the CPU name Configuring autostart Adding or removing a PROFINET or PROFIBUS interface If you load a new configuration or one of the changes mentioned above, the PC systems needs to be restarted. In this case, the dialog Status and actions after downloading to device is displayed. The PC system is restarted automatically. This may take a little while. Figure 4-2 Entry ID: 109748679, V1.0, 09/2017 21

Siemens AG 2017 All rights reserved 4 Valuable Information 4.2.3 Procedure To load TIA Portal project, proceed as follows: 1. Start the TIA Portal and open the project in the zipped file. 2. Select the CPU 1515SP PC in the project tree. 3. In the menu bar, click the Download to device button. 4. Configure the settings concerning the interface. 5. Click the Start search button to find your target CPU. 6. Select your PC system. 7. Click the Load button. 8. Confirm the following download dialogs. 4 6 5 7 4.2.4 Checking the result of the loading process After loading, the CPU link is displayed in the Windows start menu with the name you specified in the CPU settings in STEP 7. The CPU is in RUN. You may have to set the operating mode switch to RUN. Note If loading does not work as described, reload the configuration into the CPU. Entry ID: 109748679, V1.0, 09/2017 22

Siemens AG 2017 All rights reserved 4 Valuable Information 4.3 Enabling the web server 1. In the device view, select the CPU 1505SP or the CPU 1507S. 2. In the inspector window, open the Properties tab. 3. Select the Web server property. 4. Enable the option Activate web server on this module. 5. Confirm the security note. The security note is only displayed with the initial activation of the web server. 6. Specify the execution rights for the user. Entry ID: 109748679, V1.0, 09/2017 23

Siemens AG 2017 All rights reserved 4 Valuable Information 7. Optional: Add your watch table to the web server. 8. Load the configuration into the CPU as described in chapter 4.2. 4.4 ODK application 4.4.1 Prerequisites Installing the SIMATIC ODK 1500S Install the SIMATIC ODK 1500S on your engineering PC. Follow the instructions before you carry out the installation. Further information on the SIMATIC ODK 1500S can be found in \3\. Installing Microsoft Visual Studio Optionally install Microsoft Visual Studio on your engineering PC. Follow the instructions during the installation. Further information on Microsoft Visual Studio can be found in \5\. 4.4.2 Creating an ODK application using Microsoft Visual Studio When creating a new ODK application, a SampleFunction example function is created. You can change this function or replace it with your own one. Use the installed template for Visual C++ (Installed Templates) in order to create a new ODK application for the Windows environment. When using the template, the SCL file ( <Project>.scl ) and the DLL file <Project>.dll are automatically generated when executing Build Solution with the ODK application. Entry ID: 109748679, V1.0, 09/2017 24

Siemens AG 2017 All rights reserved 4 Valuable Information The following steps show how to create a new project for an ODK application. 1. Start Visual Studio and create a new project. 2. Select the ODK C++ template for your project. 3. Enter the project name, e. g. OdkWinRestart. 4. Adjust the storage location for your project. 5. Click "OK". 2 3 4 5 6. Define your functions in the <Project>.odk file. Figure 4-3 7. Implement your function in the <Project>.cpp file. Figure 4-4 Entry ID: 109748679, V1.0, 09/2017 25

Siemens AG 2017 All rights reserved 4 Valuable Information 8. Execute "Build Solution". Figure 4-5 9. Copy the DLL file (e. g. "D:\OdkWinRestart\x64\Release\OdkWinRestart.dll") into the subfolder "C:\ProgramData\Siemens\Automation\ODK1500S" of the SIMATIC ET 200SP Open Controller or SIMATIC IPC. 10. Use the SCL file as described in chapter 4.4.3 in order to create function blocks in the TIA Portal project. Entry ID: 109748679, V1.0, 09/2017 26

Siemens AG 2017 All rights reserved 4 Valuable Information 4.4.3 Integrating an SCL file into the TIA Portal project Transferred ODK applications have to be integrated into the S7 program. Complete your TIA Portal project with the SCL file. The SCL file is located in the STEP 7 directory. In the application example, the SCL file has already been integrated. The following table shows you how you can integrate the OKD application in the TIA Portal project with the generated SCL file. 1. Click Add new external file to add the SCL file to your TIA Portal project. In the open window, select the SCL file ("OdkWinRestart.scl ). 2. In the context menu of the SCL file, select Generate blocks from source. 1 2 Entry ID: 109748679, V1.0, 09/2017 27

Siemens AG 2017 All rights reserved 4 Valuable Information 3. The following function blocks with the corresponding instance data blocks are created: Loading (OdkWinRestart_Load), Unloading (OdkWinRestart_Unload), Function (OdkWinRestart_WindowsRestart) 4. Call the generated function blocks in your S7 program. 5. Load the configuration into the CPU as described in chapter 4.2. Entry ID: 109748679, V1.0, 09/2017 28

Siemens AG 2017 All rights reserved 5 Appendix 5 Appendix 5.1 Service and support Industry Online Support Technical Support Do you have any questions or need support? Siemens Industry Online Support offers access to our entire service and support know-how as well as to our services. Siemens Industry Online Support is the central address for information on our products, solutions and services. Product information, manuals, downloads, FAQs and application examples all information is accessible with just a few mouse clicks at https://support.industry.siemens.com Siemens Industry's Technical Support offers quick and competent support regarding all technical queries with numerous tailor-made offers from basic support right up to individual support contracts. Please address your requests to the Technical Support via the web form: www.siemens.com/industry/supportrequest Service offer Our service offer comprises, among other things, the following services: Product Training Plant Data Services Spare Parts Services Repair Services Field & Maintenance Services Retrofit & Modernization Services Service Programs & Agreements Detailed information on our service offer is available in the Service Catalog: https://support.industry.siemens.com/cs/sc Industry Online Support app Thanks to the "Siemens Industry Online Support" app, you will get optimum support even when you are on the move. The app is available for Apple ios, Android and Windows Phone: https://support.industry.siemens.com/cs/ww/en/sc/2067 Entry ID: 109748679, V1.0, 09/2017 29

Siemens AG 2017 All rights reserved 5 Appendix 5.2 Links and literature Table 5-1 No. \1\ Siemens Industry Online Support https://support.industry.siemens.com Topic \2\ Link to the entry page of the application example https://support.industry.siemens.com/cs/ww/en/view/109748679 \3\ SIMATIC ODK 1500S https://support.industry.siemens.com/cs/ww/en/ps/13914/man \4\ SIMATIC ET 200SP Open Controller https://support.industry.siemens.com/cs/ww/en/view/109248384/0 \5\ Microsoft Visual Studio http://www.microsoft.com \6\ STEP 7 Professional V14 SP1 https://support.industry.siemens.com/cs/ww/en/view/109747136 \7\ Web browser of the S7-1500 CPU https://support.industry.siemens.com/cs/ww/en/view/103528224 \8\ SIMATIC ODK 1500S Examples https://support.industry.siemens.com/cs/ww/en/view/106192387 5.3 Change documentation Table 5-2 Version Date Modifications V1.0 09/2017 First version Entry ID: 109748679, V1.0, 09/2017 30