WinPLC Engine en
WinPLC Engine en
Version 1
User Manual - English
Software-PLC for SIEMENS STEP
7 using TCP/IP
WinPLC-Engine User Manual English
1
E
n
g
l
i
s
h
WinPLC-Engine user manual
All rights reserved.
The WinPLC-Engine application is subject to a software licensing agreement and shall
only be used in accordance with the terms of this contract.
The license agreement is displayed during installation and the user must agree to the
terms and conditions of the contract.
Trademarks
STEP
, SIMATIC
, S7-300
, S7-400
7 software configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 . . . . . . .
3.2 Loading mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 . . . . .
3.3 Operating the masks in cycle mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 . . . . .
3.4 Creating custom masks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 . . . . .
4 User interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20 . . . . .
4.1 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 . . . . .
4.2 Context menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 . . . . .
4.3 Keyboard shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 . . . . .
5 Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
23 . . . . .
5.1 Text objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 . . . . .
5.2 Dynamic text objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 . . . . .
5.3 LED object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 . . . . .
5.4 Analog input and output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 . . . . .
6 Motion profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29 . . . . .
7 Configuration of the Software-PLC of WinPLC-Engine . . . . . . . . . . . . . . . . . . . . . . .
30 . . . . .
7.1 Configuration with the WinPLC7-Engine dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 . . . . .
7.1.1 PLC-Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 . . . . .
7.1.2 Net-Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 . . . . .
7.1.3 Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 . . . . .
7.1.4 Remanence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 . . . . .
7.1.5 Alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 . . . . .
7.1.6 Time Alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 . . . . .
7.1.7 Cycle Alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 . . . . .
7.2 Configuration using STEP
7 V5.x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 . . . . .
8 Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
33 . . . . .
9 Technical specifications of the Software-PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
34 . . . . .
10 External access to the Software-PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
35 . . . . .
11 Call parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
37 . . . . .
WinPLC-Engine User Manual English
3
E
n
g
l
i
s
h
1 Introduction
1.1 What is WinPLC-Engine?
WinPLC-Engine is a Software-PLC for STEP
7. If you are
entering the configuration into STEP
7 hardware
configurator and transferred the result into the Software-PLC of WinPLC-Engine by
means of the TCP/IP link.
The Software-PLC of WinPLC-Engine is configured to use the PG protocol as well as
the OP protocol via TCP/IP.
Using the OP protocol, WinCC
7 V5.x.
WinPLC-Engine User Manual English
7
E
n
g
l
i
s
h
3 Getting started
3.1 The STEP
7 software configuration
WinPLC-Engine communicates with STEP
7 V5.x configuration:
Now the IP address and the port number are defined. Open the PG/PC interface dialog
to enable STEP
7 V5.x
Select the entry WinPLC-Engine and click on the properties button. Make sure the tick
box "Connect to real S7-300/400 and compatible PLCs" was not checked:
WinPLC-Engine User Manual English
9
E
n
g
l
i
s
h
Fig.: Specifying the IP address
Enter the IP address and the port number that you have configured in
WinPLC-Engine into this figure.
Confirm the dialog with the OK button. At this point, STEP
7 correctly if a
window with MPI address 2 is displayed:
Fig.: Window "Accessible nodes" in STEP
7
Now the STEP
7 V5.x
You may also use the hardware configurator of STEP
7 to configure WinPLC-Engine.
The type must be selected in the hardware configuration, depending on the selected
CPU-type.
For the following example, the Siemens CPU 313C was selected in WinPLC-Engine:
Fig.: CPU313C is selected
In the Siemens hardware configurator you must also insert the CPU with the order
number
6ES7 313-5BF03-0AB0 into the rack.
Please ensure that you use a CPU with firmware rev. level 2.6:
Fig.: Hardware configurator with CPU 313C
Execute a double-click on the CPU to enter the configuration. You can transfer the
configuration into the Soft-PLC of WinPLC-Engine via PLC->Upload.
WinPLC-Engine User manual English
32
8 Settings
The following dialog is available under Extras->User settings:
Fig.: User settings
The "Edit" button can be used to define the storage location for the masks. Select a
path with write access privileges. This path should normally point to a folder in "My
Documents".
The samples supplied with the package are copied into the selected storage location if
you check the tick box "Add examples" and press OK.
Hint:
You can also define the storage location by specifying the respective path when you
start WinPLC-Engine.
For this purpose, the start icon of WinPLC-Engine must be modified:
Ininput box Target you may add
the storage location path following
the Exe file using the parameter
/PRJ .
Example:
C:\Program
Files\MHJ -Software\WinPLC-Engin
eV1\WinPLCEngine.exe
/PRJ ="c:\MyMasks\Mask1"
In this case it is important to
enclose the path in quotes [ " ].
WinPLC-Engine User Manual English
33
E
n
g
l
i
s
h
9 Technical specifications of the Software-PLC
The following table shows the maximum configuration level of the Software-PLC in
WinPLC-Engine. You can use AG files to limit the technical properties as required by
the different types of PLCs.
The Software-PLC is designed to process the object code (MC7-code) of
S7-controllers directly. For this reason, WinPLC-Engine is also able to process
protected blocks or S7-Graph blocks.
RAM-size in byte 245.760
L-Stack size in byte 1.024
FC range of numbers FC 0 - DC 2047
FB range of numbers FB 0 - FB 2047
DB range of numbers DB 0 - DB 1023
Input address space (process image) EB 0 - EB 2047
Output address space
(process image)
AB 0 - AB 2047
Peripheral address space inputs PEB 0 - PEB 2047
Peripheral address space outputs PAB 0 - PAB 2047
Clock memory address space MB 0 - MB 2047
Timer address space T 0 - T 255
Counter address space Z 0 - Z 255
Accessible OBs 1, (cyclic operation)
10, 11, 12, 13, 14, 15, 16, 17, (timer alarms)
20, 21, 22, 23 (Verzgerungsalarme)
30, 31, 32, 33, 34, 35, 36, 37, 38, (cycle alarms)
40,
100, 101 (start-up)
Accessible SFCs 0, 1, 2, 3, 4, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 33, 34, 43, 46, 47, 64
Accessible SFBs 0, 1, 2, 3, 4, 5, 32
Communications
TCP/IP - PG protocol
TCP/IP - OG protocol
WinPLC-Engine User manual English
34
10 External access to the Software-PLC
External programs can access WinPLC-Engine via the integrated DLL interface.
This means that it is possible to share inputs and outputs or link external hardware to
other software products.
The Software-PLC is part of the DLL WS7_S7AG.DLL. When you install
WinPLC-Engine, this file is placed in the Windows System32 folder.
The following export functions are available:
BYTE* _export FAR PASCAL S7AG_GetPeriEPtr()
Returns a BYTE pointer for the peripheral space of the inputs.
The size of this space is 2048 bytes.
C-language example:
BYTE *pI nput s=S7AG_Get Per i EPt r ( ) ;
pI nput s[ 0] =200; / / wr i t e 200deci mal i nt o i nput byt e 0
pI nput s[ 2] =50; / / wr i t e 50deci mal i nt o i nput byt e 2
BYTE* _export FAR PASCAL S7AG_GetPeriAPtr();
Returns a BYTE pointer for the peripheral space of the outputs.
The size of this space is 2048 bytes.
C-language example:
BYTE *pOut put s=S7AG_Get Per i APt r ( ) ;
/ / r eads out put byt e 0 and ent er s i t i nt o var i abl e AB0
BYTE AB0=pOut put s[ 0] ;
/ / r eads out put byt e 1 and ent er s i t i nt o var i abl e AB1
BYTE AB1=pOut put s[ 1] ;
WinPLC-Engine User Manual English
35
E
n
g
l
i
s
h
WORD _export FAR PASCAL S7AG_GetCPUZustand();
This function returns the status of the Software-PLC:
0: The Software-PLC is in STOP mode (i.e. the program in the controller
is not being executed)
1: Software-PLC is starting up (i.e. the start-up blocks are currently
being processed)
2: The Software-PLC is in RUN mode (i.e. the program in the controller
is being executed)
WinPLC-Engine User manual English
36
11 Call parameters
WinPLC-Engine accepts different command line parameters when it is started:
Parameter Description Example
.maske_ini Any mask file supplied with the
call is opened immediately.
The mask file must always
be the first parameter.
C:\Program
Files\MHJ -Software\WinPLC-Engi
ne\WinPLCEngine.exe
d:\prj\MeineMaske.maske_ini
/NOMENU This parameter hides the
menu.
C:\Program
Files\MHJ -Software\WinPLC-Engi
ne\WinPLCEngine.exe /NOMENU
/NOMOUSEBAR This parameter hides the
mouse buttons.
C:\Program
Files\MHJ -Software\WinPLC-Engi
ne\WinPLCEngine.exe
/NOMOUSEBAR
/RUN This parameter starts an
immediate simulation of the
mask that was supplied.
C:\Program
Files\MHJ -Software\WinPLC-Engi
ne\WinPLCEngine.exe /RUN
/READONLY This parameter prevents
changes to the masks that are
supplied in the call
C:\Program
Files\MHJ -Software\WinPLC-Engi
ne\WinPLCEngine.exe
/READONLY
/PRJ = This parameter defines the
path to the user project. This is
the path where mask files are
stored. Important: Enclose the
path in quotes [ " ].
C:\Program
Files\MHJ -Software\WinPLC-Engi
ne\WinPLCEngine.exe
/PRJ ="c:\MeineWinPLCEnginePro
jekte"
/RUNTIME The loaded project cannot be
changed. The menu and the
mouse buttons are hidden.
C:\Program
Files\MHJ -Software\WinPLC-Engi
ne\WinPLCEngine.exe
d:\prj\MeineMaske.maske_ini
/RUNTIME
WinPLC-Engine User Manual English
37
E
n
g
l
i
s
h
<End of Doc>
WinPLC-Engine User manual English
38