Getting started with S7-PLCSIM Advanced and simulation tables

SIMATIC S7-PLCSIM Advanced V2.0

SIMATIC STEP 7 (TIA Portal) V15

https://support.industry.siemens.com/cs/ww/en/view/109759047

Legal information

Use of application examples

Application examples illustrate the solution of automation tasks through an interaction of several components in the form of text, graphics and/or software modules. The application examples are a free service by Siemens AG and/or a subsidiary of Siemens AG (“Siemens”). They are non-binding and make no claim to completeness or functionality regarding configuration and equipment. The application examples merely offer help with typical tasks; they do not constitute customer-specific solutions. Users are responsible for the proper and safe operation of the products in accordance with applicable regulations and must also check the function of the respective application example and customize it for their system.

Siemens grants users the non-exclusive, non-sublicensable and non-transferable right to have the application examples used by technically trained personnel. Any change to the application examples is the user's responsibility. Sharing the application examples with third parties or copying the application examples or excerpts thereof is permitted only in combination with the user's own products.

The application examples are not required to undergo the customary tests and quality inspections of a chargeable product; they may have functional and performance defects as well as errors. It is the user's responsibility to use them in such a manner that any malfunctions that may occur do not result in property damage or injury to persons.

Disclaimer of liability

Siemens shall not assume any liability, for any legal reason whatsoever, including, without limitation, liability for the usability, availability, completeness and freedom from defects of the application examples as well as for related information, configuration and performance data and any damage caused thereby. This shall not apply in cases of mandatory liability, for example under the German Product Liability Act, or in cases of intent, gross negligence, or culpable loss of life, bodily injury or damage to health, non-compliance with a guarantee, fraudulent non-disclosure of a defect, or culpable breach of material contractual obligations. Claims for damages arising from a breach of material contractual obligations shall however be limited to the foreseeable damage typical of the type of agreement, unless liability arises from intent or gross negligence or is based on loss of life, bodily injury or damage to health. The foregoing provisions do not imply any change in the burden of proof to the user's detriment. Users shall indemnify Siemens against existing or future claims of third parties in this connection except where Siemens is mandatorily liable.

By using the application examples, users acknowledge that Siemens cannot be held liable for any damage beyond the liability provisions described.

Other information

Siemens reserves the right to make changes to the application examples at any time without notice. In case of discrepancies between the suggestions in the application examples and other Siemens publications such as catalogs, the content of the other documentation shall have precedence.

The Siemens terms of use (https://support.industry.siemens.com) shall also apply.

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 constitute one element of such a concept.

Customers are responsible for preventing unauthorized access to their plants, systems, machines and networks. Such systems, machines and components should only be connected to an enterprise network or the Internet if and to the extent such a connection is necessary and only when appropriate security measures (e.g. firewalls and/or network segmentation) are in place.

For additional information on industrial security measures that may be implemented, please visit https://www.siemens.com/industrialsecurity.

Siemens' products and solutions undergo continuous development to make them more secure. Siemens strongly recommends that product updates are applied as soon as they are available and that the latest product versions are used. Use of product versions that are no longer supported, and failure to apply the latest updates may increase customer's exposure to cyber threats.

To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed at: https://www.siemens.com/industrialsecurity.

1 Introduction

1.1 Overview

SIMATIC S7-PLCSIM Advanced virtual controllers are created and used for the comprehensive simulation of functions. This means that no real controllers are required to test a STEP 7 program.

The virtual controllers can also be tested and validated in the context of a system or machine. The application programming interface (API) allows manipulation of the simulated process image and is used to connect the virtual controller to a virtual model of a machine or plant or to specially programmed high-level language applications.

This makes it possible to connect the virtual controller to simulation software such as SIMIT or NX Mechatronics Concept Designer for extensive validation of the STEP 7 program. The following application example should make the first steps in the general handling of S7-PLCSIM Advanced easier. In addition, this application example offers the "SimTableApplication" application with which users can conveniently and independently monitor and control PLC variables on the virtual controller via a simulation table.

Figure 1-1: System Architecture

The diagram shows TIA Portal with STEP 7 connecting to a Virtual Controller via a PLCSIM Softbus or PLCSIM Virtual Ethernet Adapter. The Virtual Controller can then interact with the SimTableApplication.

Advantages of the Application Example

Delimitation

1.2 How it works

S7-PLCSIM Advanced supports the simulation of the following CPU families from firmware version V1.8:

In contrast to PLCSIM, S7-PLCSIM Advanced can be installed independently of TIA Portal and with its full Ethernet adapter "PLCSIM Virtual Ethernet Adapter" offers extended communication paths even beyond computer limits.

1.2.1 Overview communication paths

Table 1-1: Communication paths

Protocol Communication interface in S7-PLCSIM Advanced STEP 7 and instances Communication...
Softbus PLCSIM On a PC/ a VM
  • between STEP 7 and instances: Yes
  • between instances: Yes
  • via OPC UA server and web server: No
  • between an instance and a real hardware CPU: No
  • between an instance and a real HMI V14 or higher: No
  • between an instance and a simulated HMI V14 or higher: Yes
TCP/IP PLCSIM Virtual Ethernet Adapter On a PC/ a VM
  • between STEP 7 and instances: Yes
  • between instances: Yes
  • via OPC UA server and web server: Yes
  • between an instance and a real hardware CPU: No
  • between an instance and a real HMI V14 or higher: No
  • between an instance and a simulated HMI V14 or higher: Yes
TCP/IP PLCSIM Virtual Ethernet Adapter Distributed
  • between STEP 7 and instances: Yes
  • between instances: Yes
  • via OPC UA server and web server: Yes
  • between an instance and a real hardware CPU: Yes
  • between an instance and a real HMI V14 or higher: Yes
  • between an instance and a simulated HMI V14 or higher: Yes

1.2.2 Local Communication

Via softbus: S7-PLCSIM Advanced enables communication locally with the virtual controller via the "PLCSIM" softbus. All participants involved in the communication must be on the same PC / the same VM.

Figure 1-2: Local communication via Softbus

The diagram shows a PC/VM with PLCSIM Advanced Runtime, Instance 1, Virt. SIMATIC Memory Card, and STEP 7 connected via PLCSIM Softbus.

Via TCP/IP: With S7-PLCSIM Advanced, local communication is also possible via TCP/IP protocol. S7-PLCSIM Advanced provides the PLCSIM Virtual Ethernet Adapter for this purpose. All participants involved in the communication must be on the same PC / the same VM.

In this configuration, TCP/IP functions of the virtual controller, such as communication via OPC UA and web server, can be used. Details can be found at Table 1-1.

Figure 1-3: Local communication via TCP/IP

The diagram shows a PC/VM with PLCSIM Advanced Runtime, Instance 1, Virt. SIMATIC Memory Card, and STEP 7 connected via PLCSIM Virtual Ethernet Adapter.

1.2.3 Distributed communication

For distributed communication, i.e., across computer boundaries, S7-PLCSIM Advanced provides a PLCSIM Virtual Switch in addition to the PLCSIM Virtual Ethernet Adapter. The PLCSIM Virtual Switch connects the PLCSIM Virtual Ethernet Adapter to a physical network card of the PC, allowing communication with the virtual controller from outside the PC.

When using a VM, a bridged connection to a network card of the host computer must be set up. The following scenarios are possible:

  1. Communication between TIA Portal on the host machine and a virtual controller on the VM.
  2. Communication with a real CPU or a real HMI. The connection between real devices and the network card of the PC is made via an Ethernet cable.
  3. Communication with TIA Portal on another PC. The connection between the PCs is made with an Ethernet cable via the physical network cards.

Scenarios 2 and 3 are also possible if S7-PLCSIM Advanced is installed directly on a PC. No bridged connection configuration is needed in this case, as it is only required for a VM.

Figure 1-4: Distributed communication scenarios

The diagram illustrates three scenarios for distributed communication involving a PC, a VM, and potentially a real CPU/HMI or another PC, utilizing PLCSIM Virtual Ethernet Adapter and PLCSIM Virtual Switch.

1.2.4 Virtual SIMATIC Memory Card

S7-PLCSIM Advanced stores the user program, the hardware configuration, and the remanent data of a loaded instance of a virtual controller in a virtual SIMATIC memory card. Each instance has a virtual SIMATIC memory card, which is created under a unique instance name of the virtual controller.

If S7-PLCSIM Advanced is used to start a virtual controller with an instance name for which a virtual SIMATIC memory card already exists, the controller is started with the user program and hardware configuration contained within it.

The storage location of the virtual SIMATIC Memory Card can be opened or changed via the control panel of S7-PLCSIM Advanced. For applications that interact with S7-PLCSIM Advanced via the API (user interface), the storage location can be defined on the application side. For example, the location of the virtual SIMATIC Memory Card for the "SimTableApplication" application is the same as the location of the simulation project. Thus, the application always knows the access point to the data of the virtual controller. The "SimTableApplication" application is described in the chapter Application "SimTableApplication".

1.2.5 S7-PLCSIM Advanced Control Panel

S7-PLCSIM Advanced provides a control panel for creating and operating instances of a virtual controller. If users employ their own user programs (C++/C#), the integrated control panel is not needed, as its function can be mapped via the API.

Figure 1-5: Control panel interface

The diagram shows the S7-PLCSIM Advanced V2.0 Control Panel with various controls including Online Access, TCP/IP communication settings, Virtual Time Scaling, and instance management.

Table 1-2: Control panel functions

No. Function Description
1. Online access Selecting the communication interface (PLCSIM: Softbus, local; PLCSIM Virtual Eth. Adapter: TCP/IP, local or distributed)
2. TCP/IP communication Selecting the network adapter for distributed communication (<Local>: local communication; <Network card>: Distributed communication via the set network card)
3. Virtual time Slider for setting the scaling factor
4. Start Virtual S7-1500 PLC Instance Name: Name of the instance (min. 3, max. 64 characters). PLC type: Selection of the CPU type to be simulated. Start: Create and start the instance. Additionally, when selecting the PLCSIM Virtual Eth. Adapters: IP address, Subnet mask, Standard gateway. The "RUN", "STOP" and "MRES" buttons for the operating mode and reset.
5. Instance list The list shows the local instances of the CPUs.
6. LED displays The meaning of the LED is displayed when the mouse pointer is moved over it.
7. Runtime Manager Port Opens a port on the local PC.
8. Virtual SIMATIC Memory Card Opens the location of the virtual memory card. Click on the following symbol [folder icon] to define the storage location.
9. Displaying messages Deactivates S7-PLCSIM Advanced messages in the Windows task bar for the duration of operation.
10. Function Manual Opens the function manual S7-PLCSIM Advanced in the standard PDF viewer.
11. Exit Exits all instances and closes the control panel.

1.3 STEP 7 program

This application example includes a TIA Portal example project with a STEP 7 program. The STEP 7 program consists of a simple adding function in the cyclic OB "Main[OB1]". The addition is executed once if the variable "Global".executeAdd is set to TRUE. The result of adding the two variables "Global".summand1 and "Global".summand2 is assigned to the variable "Global".result.

Fig. 1-6: STEP 7 program in cyclic OB

Block title: "Main Program Sweep (Cycle)"

Network 1: adding function

Is running once, when "Global".executeAdd set TRUE
1 IF "Global".executeAdd THEN
2 "Global".result:="Global".summand1 +"Global".summand2;
3 "Global".executeAdd := FALSE;
4 END_IF;
5

The associated variables are declared in the global data block "Global[DB1]".

Figure 1-7: Global data block "Global [DB1]"

The diagram shows the TIA Portal project tree with the Global data block DB1, listing variables like summand1, summand2, result, and executeAdd.

For monitoring and controlling variables in the online view of the controller, the observation table "WatchTableAddFunc" with the data block variables was inserted in the TIA Portal project.

Figure 1-8: Watch table "WatchTableAddFunc"

The diagram shows the TIA Portal watch table "WatchTableAddFunc" with variables like "Global".summand1, "Global".summand2, "Global".result, and "Global".executeAdd.

1.4 Components used

This application example was created with these hardware and software components:

Table 1-3: Hardware and Software Components

Components Number Article number Note
STEP 7 Professional V15 1 6ES7822-1AE05-0YA5
S7-PLCSIM Advanced V2.0 1 6ES7823-1FE01-0YA5

Note: In this application example, no real hardware was used. All projected hardware components were simulated.

This application example consists of the following components:

Table 1-4: Application Components

Components File name
Documentation 109759047_PLCSIMAdv_SimTable_DOC_V10_de.pdf
TIA Portal sample project 109759047_PLCSIMAdv_SimTable_S7_PROJ.zip
Application "SimTableApplication" 109759047_PLCSIMAdv_SimTable_SIM_APPL.zip
Visual Studio project 109759047_PLCSIMAdv_SimTable_CODE.zip

2 First steps with S7-PLCSIM Advanced

2.1 Installation

The setup program starts automatically with a double click on the download package or when the DVD is inserted into the drive. Ensure the following conditions are met before starting the installation process:

2.2 Start S7-PLCSIM Advanced

After installing S7-PLCSIM Advanced, the icon for S7-PLCSIM Advanced is located on the Windows desktop. To start S7-PLCSIM Advanced and open the Control Panel, follow these steps:

  1. Double-click the S7-PLCSIM Advanced icon on the Windows desktop. Figure 2-1: S7-PLCSIM Advanced Icon
  2. After starting S7-PLCSIM Advanced, the icon is displayed in the notification area of the task bar (next to the time and date). Tip: Users can use Windows functions to permanently display the icon in the notification area of the taskbar. Figure 2-2: Taskbar Icon
  3. Right-click the icon in the task bar to open the S7-PLCSIM Advanced Control Panel. A click on a free area next to the control panel minimizes it again. Figure 2-3: Control Panel Access

2.3 Creating an instance

Note: If a virtual controller is started with an instance name for which a virtual SIMATIC memory card already exists, the controller is started with the user program and hardware configuration contained within it. Use a new name for each new instance.

2.3.1 Local Instance via Softbus

  1. Set the switch for "Online Access" to "PLCSIM". Figure 2-4: Online Access Setting (Softbus)
  2. Enter a name for the new instance, select the PLC type for the simulation, and start the instance.

Figure 2-5: Instance Creation (Softbus)

After starting, the instance appears in the instance list with the default IP address "192.168.0.1" and in the stop state.

Figure 2-6: Instance List (Softbus)

2.3.2 Local Instance via TCP/IP

Note: The switch for "Online Access" can only be activated after all started instances have been deactivated.

  1. Set the switch for "Online Access" to "PLCSIM Virtual Eth. Adapter". Leave the setting for the network card at "Local". Figure 2-7: Online Access Setting (TCP/IP)
  2. Enter a name for the instance, the IP address, and the subnet mask. Select the PLC type and start the instance.

Figure 2-8: Instance Creation (TCP/IP)

After starting, the instance appears in the instance list with the set IP address and in stop state.

Figure 2-9: Instance List (TCP/IP)

2.3.3 Distributed Instance over TCP/IP

If no DHCP is available in the network, a static IP address must be assigned to the Siemens PLCSIM Virtual Ethernet Adapter for successful distributed communication. All IP addresses must be set so that they are all in the same subnet. The following figure shows an example of a possible setting of the IP addresses with the subnet mask "255.255.255.0".

Figure 2-10: IP Address Configuration for Distributed Communication

The diagram shows IP addresses for PLCSIM Advanced, PLCSIM Virtual Ethernet Adapter, PLCSIM Virtual Switch, Network card, and Real CPU/HMI, all within the same subnet.

To set a static IP address for the Siemens PLCSIM Virtual Ethernet Adapter:

  1. In the Windows Control Panel, open the Network and Sharing Center.
  2. Select "Change adapter settings". Figure 2-11: Network and Sharing Center
  3. Open the properties of the Siemens PLCSIM Virtual Ethernet Adapter and then open the properties of the "Internet Protocol Version 4 (TCP/IPv4)" element.
  4. Assign a free static IP address within the same subnet as the network and close the properties with "OK".

Figure 2-12: Internet Protocol Version 4 (TCP/IPv4) Properties

The diagram shows the TCP/IPv4 properties window where IP address, subnet mask, and DNS server addresses can be configured.

Note: The switch for "Online Access" can only be activated after all started instances have been deactivated.

  1. Set the switch for "Online Access" to "PLCSIM Virtual Eth. Adapter". Select the physical network card from the list via which the instance is to be accessible in the network. Figure 2-13: Online Access Setting (Distributed)
  2. The "Siemens PLCSIM Virtual Switch" is automatically activated for the selected network card in the properties of the interface. Figure 2-14: Ethernet Properties showing PLCSIM Virtual Switch
  3. Enter a name for the instance, the IP address, and the subnet mask. Select the PLC type and start the instance.

Figure 2-15: Instance Creation (Distributed)

After starting, the instance appears in the instance list with the set IP address and in stop state.

Figure 2-16: Instance List (Distributed)

2.4 Download from TIA Portal

2.4.1 Activate simulability

To use a STEP 7 project with the simulation, the simulability of blocks in the project properties must be activated. Follow these steps:

  1. Right-click on the project name of the TIA Portal project and select "Properties..." from the context menu. Figure 2-17: Project Properties Access
  2. Activate the property "Support simulation during block compilation" under "Protection". Figure 2-18: Protection Settings

Note: In order to use know-how-protected blocks or typed library blocks for simulation, the following must be noted:

Only then can the option "Simulability with SIMATIC S7-PLCSIM (Advanced)" be activated in the properties of the block in the "General > Translation" tab.

2.4.2 Load project to the virtual controller

Requirement

The STEP 7 project can be loaded to the virtual controller if the following conditions are met:

Select communication interface

When loading the project to the virtual controller, the PG/PC interface must be selected according to the communication interface of the virtual controller (see chapter 2.3 Creating an instance):

Display in Download Dialog

The dialog in STEP 7 shows the compatible S7-PLCSIM Advanced instances the first time a CPU is downloaded. In the following example, an instance of the virtual controller was created using the "PLCSIM Virtual Ethernet Adapter" with the IP address 192.168.0.1. The configuration of a CPU 1511-1 PN with the configured IP address 192.168.0.10 is to be loaded to this instance.

When searching for compatible instances via the "Siemens PLCSIM Virtual Ethernet Adapter" interface, the instance of the "S7-1500 (PLCSIM)" virtual controller is displayed, since no configuration has yet been loaded onto the controller.

Figure 2-19: Extended download to device (initial)

The diagram shows the "Extended download to device" dialog in TIA Portal, where the PG/PC interface is selected and compatible devices are scanned.

After loading onto the instance of the virtual controller, it is configured. Then the instance appears in the download dialog as the loaded type of controller, in this case "CPU 1511-1 PN" with the IP address 192.168.0.10.

Figure 2-20: Extended download to device (after loading)

The diagram shows the "Extended download to device" dialog after the controller has been loaded, displaying the configured controller information.

If the instance has been configured, then as many interfaces are visible as the CPU type, for example, two PROFINET interfaces are displayed for a 1515-2 PN CPU.

2.5 Simulate example project

Starting a virtual controller instance

Since no special communication, such as communication via OPC UA, is required for this example, a local instance of the virtual controller via the "PLCSIM" softbus interface is sufficient.

  1. Start S7-PLCSIM Advanced and open the control panel.
  2. Leave the interface setting at "PLCSIM", enter a name for the instance and select "Unspecified CPU 1500" as PLC type. Then click "start". Figure 2-21: Starting a Virtual Controller Instance

The instance appears in the instance list with the configured name and IP address 192.168.0.1. The virtual controller instance is still in the "STOP" operating state, since no user program or configuration has yet been loaded onto the controller.

Figure 2-22: Instance List after Starting

Follow the download dialog and complete it by selecting the option "Start module" and clicking on "Finish". Figure 2-25: Download Results

Check the operating status of the virtual controller in the Control Panel. The controller must now be in "RUN" mode. Figure 2-26: Control Panel - RUN Mode

Open in TIA Portal in the project navigation under "MyProject > PLC_1 > Observation and force tables" ("MyProject > PLC_1 > Watch and force tables") the observation table "WatchTableAddFunc" and start the observation of the variables. Figure 2-27: Opening Watch Table

Enter a control value for each of the variables "Global".summand1, "Global".summand2 and "Global".executeAdd and activate the corresponding checkbox for controlling the variable. Figure 2-23

Click on the "modify all selected values" button and observe the result of the add function in the "Global.result" variable. Figure 3-24

Save the project so that it can be used again later. The loaded STEP 7 program remains stored in the virtual SIMATIC Memory Card and can be used when the simulation project is opened again without reloading the controller. Figure 3-25: Saving the Project

3 Application "SimTableApplication"

3.1 Overview

With the simulation table tool for S7-PLCSIM Advanced, users can create a local instance of a virtual controller and load their STEP 7 program onto it from TIA Portal. Users can then display variables used in the STEP 7 program in simulation tables and control and monitor them from there.

Figure 3-1: System Overview

The diagram shows the interaction between PLCSIM Advanced Simulation Table, TIA Portal, and a Virtual Controller instance.

The steps involved are:

  1. A local instance of a virtual controller is started via the control panel in the simulation table tool.
  2. The STEP 7 program is loaded into the virtual controller via the "PLCSIM" softbus.
  3. The variables of the virtual controller can be observed and controlled in the simulation table.

3.2 How it works

The "SimTableApplication" uses the user interface (API) of S7-PLCSIM Advanced for interaction with the virtual controller. The folder of the virtual SIMATIC Memory Card is created in the storage path of the simulation project. The virtual controller is operated via the control panel in the application, meaning the integrated S7-PLCSIM Advanced Control Panel is not required. The runtime manager and runtime instance are started in the background as Windows processes. Users can monitor the started processes in the Windows Task Manager under "Processes".

After loading the STEP 7 program onto the virtual controller, variables are exchanged between the virtual controller and the "SimTableApplication" application via the API.

The following variables of the virtual controller can be accessed:

The variables are updated at the cycle control point of the virtual controller. The control of selected variables is triggered by a button in the simulation table.

3.3 User interface

Figure 3-2: SimTableApplication User Interface

The diagram shows the SimTableApplication interface with three main areas: Menu bar, Project navigation, and Working area.

  1. Menu bar: Shows menus for project commands and help commands.
  2. Project navigation: Displays the project name, instance name, and simulation tables.
  3. Working area: Shows the window for operating the instance (Control Panel) and editing the simulation tables.

3.3.1 Menu bar

Commands in the "Project" Menu

Figure 3-3: Project Menu Commands

Menu text Description
New... Creates a new project. The currently open project must be closed first.
Open... Selects an existing project to open.
Close Closes the current project. If the current project contains unsaved changes, users will be prompted to save the project.
Save Saves the project under the current path and file name with the file extension ".sim".
Save As... Saves the project under a new name and/or path.
Exit Closes the simulated controller and application. If the current project contains unsaved changes, users will be prompted to save the project.

Commands in the "Help" Menu

Figure 3-4: Help Menu Commands

Under the menu text "About", users will find a link to the Siemens Industry website for online support, as well as details of the installed software.

3.3.2 Project navigation

Figure 3-5: Project Navigation Structure

  1. Project folder: Here, with the name "MySimulation". Right-clicking the project folder allows adding a controller or displaying project properties. Figure 3-6: Project Folder Options
  2. Controller: If a controller is added, it appears in the project folder, here with the name "MyInstance". Right-clicking or clicking the controller allows operating it via the context menu or the control panel in the workspace. Figure 3-7: Controller Operation
  3. "SIM tables" folder: This folder is created automatically as soon as a controller is added and contains all simulation tables for the corresponding controller. Right-click the folder to add a new simulation table. Figure 3-8: Adding a Simulation Table
  4. "Default Sim Table" simulation table: This table is generated automatically and cannot be deleted. Other simulation tables can be renamed and/or deleted using the context menu of the relevant table.

3.3.3 Working area

Controller

If a controller is selected in the project navigation, its corresponding control panel appears in the work area of the application. Users can operate the virtual controller here.

Figure 3-9: Controller Control Panel

  1. Use "Power On / Off Virtual Controller" to start the instance of the virtual controller.
  2. LEDs display the current status of the virtual controller and behave analogously to the LEDs of a real controller.
  3. IP addresses of the virtual controller's ports are displayed. Depending on the loaded configuration, one or two IP addresses may be shown (e.g., for CPU 1511-1 PN or CPU 1515-2 PN).
  4. Use the "RUN" button to set the controller to "RUN" mode. The changed status is indicated by the RUN LED.
  5. Use the "STOP" button to set the controller to "STOP" mode. The changed status is indicated by the STOP LED.
  6. Use the "MRES" button to reset the memory (Virtual Memory Card). The virtual controller is set to "STOP" mode.
  7. Use this button [folder icon] to display the location of the Virtual SIMATIC Memory Card of the corresponding instance in Windows Explorer.
SIM table

Figure 3-10: SIM table Interface

  1. Search field for a specific variable on the virtual controller. Listing possible hits during input supports the search. After selecting the appropriate search result, add the variable to the simulation table by pressing Enter or the plus symbol.
  2. With this button [play icon], control all selected variables (see point 10) in the simulation table once.
  3. This button [folder with plus icon] allows adding all project variables from the last STEP 7 load to the virtual controller in the simulation table. Users can choose between the following variable memory areas: Figure 3-11: Load all Project Tags Dialog
    • Inputs: Input variables declared in the PLC variables
    • Outputs: Output variables declared in the PLC variables
    • Memory bits: Flags declared in the PLC variables
    • Datablocks: Variables of all global data blocks
  4. With these buttons [CSV export/import icons], export the created simulation table in CSV format to Excel or import it from Excel.
  5. Variable names are displayed in the "Name" column. For variables of a data component, the variable also contains the name of the data component as a prefix.
  6. The "Datatype" column shows the data type of the variable.
  7. The "Area" column shows the memory area of the corresponding variable.
  8. The "Value" column contains the actual value of the variable (observed value).
  9. Input field for the control value of the variable.
  10. Check boxes select the variables to be controlled when the control button is pressed.

3.4 Create simulation project

This chapter describes how to simulate the supplied STEP 7 program with the "SimTableApplication" application and S7-PLCSIM Advanced, and how to monitor and control variables using a simulation table. It demonstrates creating a new simulation project with the application. Alternatively, users can open the provided simulation project "MySimulation.sim" from the zipped folder "109759047_PLCSIMAdv_SimTable_SIM_PROJ.zip" and familiarize themselves with the project.

  1. Unpack the "109759047_PLCSIMAdv_SimTable_SIM_APPL.zip" folder into any directory on the PC and start the "SimTableApplication.exe" application contained therein with a double-click. Figure 3-12: Starting SimTableApplication
  2. Click on "Project > New..." in the menu bar to create a new project. Figure 3-13: Creating a New Project
  3. In the "Create new Project" dialog box, enter a project name and select the project location. Optionally, fill in the fields for version, author, and comment. Then click "Create". Figure 3-14: New Project Dialog
  4. Right-click on the project folder in the project navigation and select "Add new Controller" from the context menu to add a new virtual controller to the project. Figure 3-15: Adding a New Controller
  5. In the "Add New Controller" dialog window, enter a controller name and select the controller type "S71500" for the simulation of an S7-1500 CPU. Then click "Add". Figure 3-16: Add New Controller Dialog
  6. In the project navigation, select the added controller and start the virtual controller instance in the work area. The virtual controller initially starts with the "STOP" operating state, since no project has yet been loaded into the controller. Figure 3-17: Virtual Controller Instance Started
  7. Start the supplied project with TIA Portal "MyProject.ap15".
  8. Select the controller "PLC_1" in the project navigation and then click on "Download to device" in the function bar. Figure 3-18: Download to Device in TIA Portal
  9. Follow the download dialog and load the project to the virtual controller via the "PLCSIM" softbus interface.
  10. Complete the download by selecting the option "Start module" and clicking on "Finish". Figure 3-19: Download Results
  11. Return to the "SimTableApplication" application and check the operating state of the virtual controller, which must now be in "RUN" mode. Figure 3-20: Virtual Controller in RUN Mode
  12. Select the "Default SimTable" simulation table in the project navigation and click the "load all tags" button in the workspace. Figure 3-21: Loading Tags into Simulation Table
  13. Since only data block variables are used in the STEP 7 program, activate the checkbox for "Data blocks" in the new "Load all Project Tags" dialog window. This loads all data block variables from the loaded project into the simulation table. Then click "Load". Figure 3-22: Load all Project Tags Dialog
  14. Enter a control value for each of the variables "Global".summand1, "Global".summand2 and "Global".executeAdd and activate the corresponding checkbox for controlling the variable. Figure 3-23
  15. Click on the "modify all selected values" button and observe the result of the add function in the "Global.result" variable. Figure 3-24

4 Appendix

4.1 Service and Support

Industry Online Support

For questions or assistance, Siemens Industry Online Support offers round-the-clock access to the entire service and support know-how and portfolio. It is the central address for information about Siemens products, solutions, and services. Product information, manuals, downloads, FAQs, application examples, and videos are accessible with just a few mouse clicks: https://support.industry.siemens.com.

Technical Support

Siemens Industry Technical Support provides fast and competent support regarding technical queries with numerous tailor-made offers, ranging from basic support to individual support contracts. Send queries to Technical Support via the web form: www.siemens.com/industry/supportrequest.

SITRAIN – Training for Industry

Siemens supports users with globally available training courses for industry, featuring practical experience, innovative learning methods, and a concept tailored to customer-specific needs. For more information on offered trainings and courses, as well as their locations and dates, refer to the web page: www.siemens.com/sitrain.

Service offer

The range of services includes:

Detailed information on the range of services can be found on the service catalog web page: https://support.industry.siemens.com/cs/sc.

Industry Online Support app

Users receive optimum support wherever they are with the "Siemens Industry Online Support" app. The app is available for Apple iOS, Android, and Windows Phone: https://support.industry.siemens.com/cs/ww/en/sc/2067.

4.2 Links and Literature

Table 4-1: Links and Literature

No. Topic
[1] Siemens Industry Online Support
https://support.industry.siemens.com
[2] Link to the article page of the application example
https://support.industry.siemens.com/cs/ww/en/view/109759047
[3] Manual SIMATIC S7-1500 S7-PLCSIM Advanced
https://support.industry.siemens.com/cs/ww/en/view/109739153
[4] In the manual "SIMATIC STEP 7 Basic/Professional V15 and SIMATIC WinCC V15":
https://support.industry.siemens.com/cs/ww/en/view/109755202
[5] Digitalization with SIMATIC TIA Portal
https://support.industry.siemens.com/cs/ww/en/view/109750456

4.3 Change documentation

Table 4-2: Change documentation

Version Date Change
V1.0 07/2018 First version
109759047 PLCSIMAdv SimTable DOC V10 en Microsoft Word 2016

Related Documents

Preview TIA Portal Test Suite Advanced V19 - Readme and Installation Guide
Siemens TIA Portal Test Suite Advanced V19: A comprehensive guide covering installation, system requirements, key features like Styleguide, Application Test, and System Test, plus essential security information for industrial automation.
Preview TIA Portal Modul 012-105: SIMATIC S7-1500 Hardwarekonfiguration - Siemens Schulungsunterlage
Umfassende Schulungsunterlage von Siemens (SCE) für das TIA Portal Modul 012-105. Detaillierte Anleitung zur Hardwarekonfiguration der SIMATIC S7-1500 CPU 1512C-1 PN mit STEP 7 Professional V13. Ideal für Ausbildungszwecke und technische Bildung.
Preview Siemens CMS X-Tools User Manual for SIMATIC S7-1200/1500 Controllers
This user manual provides comprehensive guidance on installing, configuring, and operating Siemens CMS X-Tools with SIMATIC S7-1200 and S7-1500 industrial automation controllers. Learn about system integration, data acquisition, and communication setup for condition monitoring.
Preview SIMATIC Safety Integrated: Sichere Automatisierungslösungen von Siemens
Entdecken Sie SIMATIC Safety Integrated von Siemens – die nahtlose Integration von Sicherheitstechnik für Standard- und fehlersichere Automatisierung. Erfahren Sie mehr über Controller, Peripherie und Engineering-Tools.
Preview Siemens TIA Portal V16: Features and Innovations Overview
An overview of the new features and functionalities in Siemens TIA Portal V16, covering software packages, project management, simulation tools, integration capabilities, and system functions for industrial automation. This document provides an in-depth look at the latest advancements for efficient engineering.
Preview Siemens SIMATIC Web Server Function Manual: S7-1500, ET 200SP, ET 200pro
Explore the Siemens SIMATIC Web Server Function Manual for S7-1500, ET 200SP, and ET 200pro automation systems. Learn to monitor, manage, and configure your industrial hardware remotely via a web browser.
Preview Guide for Migrating SIMATIC S7-300/S7-400 to SIMATIC S7-1500 and TIA Portal
Siemens provides a comprehensive guide for migrating SIMATIC S7-300 and S7-400 automation systems to the advanced SIMATIC S7-1500 controller generation and the TIA Portal software, covering planning, hardware, and software conversion.
Preview Guida Tecnica Pacchetti Hw e Sw Siemens SCE per il mondo EDU
Guida tecnica completa ai pacchetti hardware e software Siemens SCE (Siemens Automation Cooperates with Education) per la formazione nell'automazione industriale. Dettaglia soluzioni per l'educazione all'automazione, coprendo le principali tecnologie Siemens come SIMATIC TIA Portal, SIMATIC PCS 7, LOGO!, SINAMICS, SIMIT e altro.