Siemens PLC simulation – Step7 / PlcSim

1. Introduction

SIMATIC S7-PLCSIM allows you to simulate a controller for functional testing on the programming device/PC.

2. Step7

2.1 New project

As a first step, we start SIMATIC Manager and create a new project.
1-S7-new-project

2-S7-new-project

3-S7-new-project

4-S7-new-project

Click on “finish” to validate and create your project. Your should obtain this :
5-S7-new-project

2.2 Hardware configuration

Enter in the hardware configuration mode :
6-S7-hardware

For the hardware modifications, we’ll do it simple :
– 1 I/O extension : SM 323 DI16/DO16x24V/0.5A
7-S7-hardware-IO-card

– 1 Ethernet card : CP343-1 Lean (6GK7 343-1CX00-0XE0)
8-S7-hardware-ethernet-card

Remember to enter the current IP address of your computer for the Ethernet card if you want to go further with simulation later (HMI or IT software communication).

After this you should have your I/O card in the slot 4 and the Ethernet card in the slot 5.

2.3 Program

We’ll create :
– 1 Function : FC1 – Our little program
– 1 Data Block : DB1 – Bits used by our program

We’ll update OB1 in order to call our function block FC1.

To insert a new object :
9-S7-program-insert-object

OB1 (STL language) :
10-S7-program-OB1

DB1 :
11-S7-program-DB1

DC1 :
12-S7-program-FC1

3 Simulation

First we have to set-up the Simatic Interface :
13-S7-select-PC-PG-interface

14-S7-select-PC-PG-interface

We can now start the simulation :
15-S7-start-plcsim

They switch to “RUN-P”
16-S7-plcsim-first-start

Go back to Simatic Manager to download your project :
17-S7-plcsim-download-project

18-S7-plcsim-overwrite

19-S7-plcsim-overwrite

20-S7-plcsim-overwrite

From now your program is running and go can go to “online mode” :
21-S7-plcsim-simulation-running

One thought on “Siemens PLC simulation – Step7 / PlcSim”

Leave a Reply

Your email address will not be published. Required fields are marked *