You are on page 1of 19

Protocol manual

Siemens PPI

applicom®

a product of Woodhead Software & Electronics

Siemens PPI 1 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Siemens PPI 2 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Table of contents

1. Generalities ....................................................................................4
Generalities .............................................................................................................4

2. SIEMENS PPI Protocol Functionalities for S7 200 Controllers ..5


Addressing Mode ....................................................................................................5
Addressing Words with an applicom® Interface .....................................................6
Maximum number of variables per frames with the library .....................................6
Maximum number of variables per frames with PCDDE.........................................6
Maximum number of variables per frames with OPC server ..................................7

3. Configuration .................................................................................8
Master Configuration ...............................................................................................8

4. applicom® functions usable on the master channel ..................9


Wait mode ...............................................................................................................9
Deferred mode ........................................................................................................9
Cyclic mode...........................................................................................................10

5. Item of image variables ...............................................................11


Presentation ..........................................................................................................11
Standard descriptor ...............................................................................................12
Siemens S7 PPI descriptor ...................................................................................13

6. Appendices ..................................................................................15
List of Additional Files for PPI ...............................................................................15
Upgrades / Compatibility .......................................................................................15

7. Return status of applicom® functions .......................................16


Introduction............................................................................................................16
applicom® general statuses..................................................................................16
Statuses according to the protocol........................................................................17

8. Glossary of terms ........................................................................18

Siemens PPI 3 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


1. Generalities

Generalities
The PPI physical interface is identical to the PROFIBUS interface (RS485, pinout complies with
standard EN 50170). The transmission speed can be set at 9 600 or 19 200 bauds. For exchanges, the
applicom® product is always master, and the controllers are always slaves.

The applicom® interface solution supports PPI+ (the applicom station is active, it manages the
token and multi-master mode is possible); the device number used corresponds to the controller's network
address.

The controller's network address is defined by means of SIEMENS STEP7-micro software.

Siemens PPI 4 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


2. SIEMENS PPI Protocol Functionalities for S7
200 Controllers

Addressing Mode
Variable Addressing Exchange type (cyclic Corresponding applicom® Function
S7 200 applicom® mode) (Library/DLL access)
Mv.w v*8+w Read bits READPACKBIT, READDIFBIT
SMv.w 10000+v*8+w Write bits WRITEPACKBIT, WRITEDIFPACKBIT
VBv.w 524288+v*8+w
Iv,w v*8+w Read input bits READPACKIBIT, READDIFIBIT
Qv.w v*8+w Read output bits READPACKQBIT, READDIFQBIT
Write output bits WRITEPACKQBIT, WRITEDIFPACKQBIT
MVv v Read packed bytes READPACKBYTE, READDIFBYTE
SMv 10000+v Write packed bytes WRITEPACKBYTE, WRITEDIFPACKBYTE
VBv 65536+v
IBv v Read packed input bytes READPACKIBYTE, READDIFIBYTE
QBv v Read packed output bytes READPACKQBYTE, READDIFQBYTE,
Write packed output bytes WRITEPACKQBYTE,
WRITEDIFPACKQBYTE
MWv v Read words READWORD, READDIFWORD
SMWv 10000+v Write words WRITEWORD, WRITEDIFWORD
VWv 65536+v
IWv v Read input words READIWORD, READDIFIWORD
QWv v Read output words READQWORD, READDIFQWORD
Write output words WRITEQWORD, WRITEDIFQWORD
MDv v Read double words READDWORD, READDIFDWORD
VDv 65536+v Write double words WRITEDWORD, WRITEDIFDWORD

v: Byte number.
w: Bit number in the byte (0 to 7).

Siemens PPI 5 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Addressing Words with an applicom® Interface
Variables for SIEMENS S7 controllers are numbered by bytes and not by 16-bit words, as S5-range
DB variables are. As a result, it may be necessary to access words or double words whose addresses are
aligned with even or odd addresses. A read request for several words must enable the user to access a
word table regardless of their physical addresses. To resolve this problem, the PPI protocol task returns
as many variables as physical addresses.

Example: An application wants to read word MW11 and word MW14 in one request. It therefore
uses a 4-word read request beginning with address 11. The reply contents are in the following form:

User Table Offset S7 Mnemonic Controller’s Physical Address


0 MW11 11 and 12
1 MW12 12 and 13
2 MW13 13 and 14
3 MW14 14 and 15

Of course, this addressing principle does not apply to write several variables in one request.
Example: Writing two words beginning from address 11.

User Table Offset S7 Mnemonic Controller's Physical Address


0 MW11 11 and 12
1 MW13 13 and 14

Maximum number of variables per frames with the library


Maximum quantity
Object
Read Write
Bit 1600 1
Byte 200 200
Word 128 100
Double word 64 50

Maximum number of variables per frames with PCDDE


Maximum quantity
Object
Read Write
Bit 1600 1
Byte 200 1
Word 128 1
Double word 64 1

The number given for read frames corresponds to the maximum number of points (as imposed by
the server and/or the protocol) which can be grouped together during dynamic optimization of the frames
carried out by the server. However, this number can be reduced to suit a specific item of equipment by
configuring the length of frames in the topic.
Where write operations are concerned, a variable automatically entails the formation of a frame.

See also:
¾ In the documentation:
9 Implementation: Topic configuration

Siemens PPI 6 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Maximum number of variables per frames with OPC server
Maximum quantity
Object
Read Write
Bit 1600 1
Byte 200 200
Word 128 100
Double word 64 50

The number given for read frames corresponds to the maximum number of points (as imposed by
the server and/or the protocol) which can be grouped together during dynamic optimization of the frames
carried out by the server. However, this number can be reduced to suit a specific item of equipment by
configuring the length of frames in the topic.
See also:
¾ In the documentation:
9 Implementation: Topic configuration
9 Software interfaces: OPC Server: Optimization of synchronous and asynchronous
requests

Siemens PPI 7 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


3. Configuration

Master Configuration
Since the parameters associated with this protocol are pre-defined, only the speed needs to be
selected.

PPI Master Properties with the applicom® interface:

Parameters Description
Baud rate You must select a transmission speed (9600 or 19200 bauds), independently on each
channel. This speed must be consistent with that of the equipments connected on the
channel.
Physical address of The physical address of the PPI master is between 0 and 126.
this station (0-126)

Siemens PPI 8 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


4. applicom® functions usable on the master
channel

Wait mode
readpackbit writepackbit
readpackibit
readpackqbit writepackqbit
readpackbyte writepackbyte
readpackibyte
readpackqbyte writepackqbyte
readword writeword
readiword
readqword writeqword
readdword writedword
readident

Deferred mode
readdifbit writedifpackbit
readdifibit
readdifqbit writedifpackqbit
readdifbyte writedifpackbyte
readdifibyte
readdifqbyte writedifpackqbyte
readdifword writedifword
readdifiword
readdifqword writedifqword
readdifdword writedifdword
testtransdif transdif transdifpack

Siemens PPI 9 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Cyclic mode
createcyc
startcyc stopcyc actcyc
transcyc transcycpack

Cyclic function Type:

Variable in the Function type


equipment Read Write
Packed bits X X
Input packed bits X
Output packed bits X X
Packed bytes X X
Bytes
Input packed bytes X
Input bytes
Output packed bytes X X
Output bytes X X
Words X X
Input words X
Output words X X
32 bit double words X X

Siemens PPI 10 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


5. Item of image variables

Presentation
Image variable items are the set of syntaxes that can be used to access variables through the
“pcdde” DDE server or the OPC server.

Depending on the configuration of each device, the most suitable descriptor is by default
automatically determined by the server. With the PPI protocol, the default descriptor is the Siemens
Series 7 descriptor (PPI, MPI).

Caution: if you modify the default descriptor, some device access optimizations will be disabled,
and performance may be negatively affected.

However, you may be able to force the use of another descriptor (particularly the standard
applicom® descriptor) by means of the advanced options.

See also:
¾ In the documentation:
9 Software Interfaces: DDE / SuiteLink server: Principles regarding access to data
9 Software Interfaces: OPC server: Data Access Principles

Siemens PPI 11 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Standard descriptor
The standard descriptor can be used for access to the equipments which have not specific
descriptors. The address field of the item name may be 10 digits long. It allows to compose a linear
address from 0 to 4 giga.

Caution: The protocol task addressing mode prohibits the use of array and string mode in
word, double word and floating word type variables.

Type Syntaxes Parameters Examples


Internal bits (type: Bit)
Unitary Bx x: First bit number. B4
Table Bx_n n: Number of bits. B4_10
Matrix Bx_n_l l: Number of bits per line B4_10_5
Input bits (type: Bit)
Unitary BIx x: First bit number. BI4
Table BIx_n n: Number of bits. BI4_10
Matrix BIx_n_l l: Number of bits per line BI4_10_5
Output bits (type: Bit)
Unitary BOx x: Number of bits. BO4
Table BOx_n n: Number of bits. BO4_10
Matrix BOx_n_l l: Number of bits per line BO4_10_5
Internal bytes (ype: Byte)
Unitary Ox x: First byte number. O4
Table Ox_n n: Number of bytes. O4_10
Matrix Ox_n_l l: Number of bytes per line O4_10_5
Input bytes (type: Byte)
Unitary OIx x: First byte number. OI4
Table OIx_n n: Number of bytes. OI4_10
Matrix OIx_n_l l: Number of bytes per line OI4_10_5
Output bytes (type: Byte)
Unitary OOx x: First byte number. OO4
Table OOx_n n: Number of bytes. OO4_10
Matrix OOx_n_l l: Number of bytes per line OO4_10_5
ASCII string in internal bytes (type: Byte)
String M_Ox_n x: Number of first byte which contains the string. M_O100_30
n: Potential number of bytes which can contain the In the example, the byte array
ASCII string (1 to 131). from O100 to O129 can
contain the string.
Internal words (type: 16 bit Word)
Unitary Wx x: First word number. W4
Input words (type: 16 bit Word)
Unitary WIx x: First word number. WI4
Output words (type: 16 bit Word)
Unitary WOx x: First word number. WO4
Internal double words (type: 32 bit Word)
Unitary Dx x: First double word number. D4
Note: Limit values for n and l parameters are depending on the protocol. However, in case of
PCDDE, limits can never be superior to 128 for bits and bytes, 64 for words, 32 for double words and
floating words.

Siemens PPI 12 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


See also:
¾ In this manual:
9 Addressing Mode
9 Maximum number of variables per frames with PCDDE
9 Maximum number of variables per frames with OPC server

Siemens S7 PPI descriptor


This descriptor is usable to access Siemens S7 200 PLCs.

This descriptor is the default descriptor determined by the OPC and DDE server.

Caution: The protocol task addressing mode prohibits the use of array and string mode in
word, double word and floating word type variables with an applicom® interface.

Type Syntaxes Parameters Examples


M bits (type: Bit)
Unitary Mx.y x: First byte number. M94.7
y: Bit range in the byte (0 to 7).
Table Mx.y_n n: Number of bits. M94.7_24
Matrix Mx.y_n_l l: Number of bits per line M94.7_24_8
SM bits (type: Bit)
Unitary SMx.y x: First byte number. SM94.7
y: Bit range in the byte (0 to 7).
Table SMx.y_n n: Number of bits. SM94.7_24
Matrix SMx.y_n_l l: Number of bits per line SM94.7_24_8
VB bits (type: Bit)
Unitary VBx.y x: First byte number. VB94.7
y: Bit range in the byte (0 to 7).
Table VBx.y_n n: Number of bits. VB94.7_24
Matrix VBx.y_n_l l: Number of bits per line VB94.7_24_8
Input bits (type: Bit)
Unitary Ix.y x: First input byte number. I94.7
y: Bit range in the input byte (0 to 7).
Table Ix.y_n n: Number of bits. I94.7_24
Matrix Ix.y_n_l l: Number of bits per line I94.7_24_8
Output bits (type: Bit)
Unitary Qx.y x: First output byte number. Q94.7
y: Bit range in the output byte (0 to 7).
Table Qx.y_n n: Number of bits. Q94.7_24
Matrix Qx.y_n_l l: Number of bits per line Q94.7_24_8
MV bytes (type: Byte)
Unitary MVx x: First byte number. MV4
Table MVx_n n: Number of bytes. MV4_10
Matrix MVx_n_l l: Number of bytes per line MV4_10_5
SM bytes (type: Byte)
Unitary SMx x: First byte number. SM4
Table SMx_n n: Number of bytes. SM4_10
Matrix SMx_n_l l: Number of bytes per line SM4_10_5
VB bytes (type: Byte)
Unitary VBx x: First VB number. VB4
Table VBx_n n: Number of bytes. VB4_10
Matrix VBx_n_l l: Number of bytes per line VB4_10_5
Input bytes (type: Byte)
Unitary IBx x: First input byte number. IB4
Table IBx_n n: Number of bytes. IB4_10
Matrix IBx_n_l l: Number of bytes per line IB4_10_5

Siemens PPI 13 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Output bytes (type: Byte)
Unitary QBx x: First output byte number. QB4
Table QBx_n n: Number of bytes. QB4_10
Matrix QBx_n_l l: Number of bytes per line QB4_10_5
ASCII string in MV bytes (type: Byte)
String M_MVx_n x: Number of first byte which contains the string. M_MV100_10
n: Potential number of bytes which can contain the In the example, the byte array
ASCII string (1 to 131). from MV100 to MV109 can
contain the string.
ASCII string in SM bytes (type: Byte)
String M_SMx_n x: Number of first byte which contains the string. M_SM100_10
n: Potential number of bytes which can contain the In the example, the byte array
ASCII string (1 to 131). from SM100 to SM109 can
contain the string.
ASCII string in VB bytes (type: Byte)
String M_VBx_n x: Number of first byte which contains the string. M_VB100_10
n: Potential number of bytes which can contain the In the example, the byte array
ASCII string (1 to 131). from VB100 to VB109 can
contain the string.
MW words (type: 16 bit Word)
Unitary MWx x: First word number. MW4
SMW words (type: 16 bit Word)
Unitary SMWx x: First word number. SMW4
VW words (type: 16 bit Word)
Unitary VWx x: First word number. VW4
Input words (type: 16 bit Word)
Unitary IWx x: First word number. IW4
Output words (type: 16 bit Word)
Unitary QWx x: First word number. QW4
MD double words (type: 32 bit Word)
Unitary MDx x: First double word number. MD4
Double words (type: 32 bit Word)
Unitary VDx x: First double word number. VD4

Note: Limit values for n and l parameters are depending on the protocol. However, in case of
PCDDE, limits can never be superior to 128 for bits and bytes, 64 for words, 32 for double words and
floating words.

See also:
¾ In this manual:
9 Addressing Mode
9 Maximum number of variables per frames with PCDDE
9 Maximum number of variables per frames with OPC server

Siemens PPI 14 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


6. Appendices

List of Additional Files for PPI


MASTPPI. Master task
NETPPI. PPI channel management task

Upgrades / Compatibility
The protocol requires EPROMs of version 3.2 or higher.

Siemens PPI 15 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


7. Return status of applicom® functions

Introduction
The various applicom® functions return a status word that:
¾ Guarantees the request quality.
¾ Can be used to diagnose the cause of a failure.
The meaning of the status word value is detailed in the following tables. In addition to the general
meaning, “Further information” allows you to direct your diagnosis according to the protocol used.

applicom® general statuses


Status description
-6 The TRANSCYC (or TRANSCYCPACK) function is used with a cyclic function number that is no longer
activated.
-5 The user program tries to perform a TRANSDIF (or TRANSDIFPACK) deferred transfer although the
deferred request in progress is not completed.
-1 TRANSDIF (or TRANSDIFPACK) deferred transfer request related to a write that took place correctly.
0 No anomaly detected. The function took place correctly.
1 Unknown function.
The requested function is not supported.
2 Incorrect address.
The address of the variable you are soliciting is incorrect.
3 Incorrect data.
Further details:
Function: BINBCD, BCDBIN.
- At least one of the accessed values is not in BCD format (0 ≤ value ≤ 9999).
4 Irretrievable data.
32 Bad parameter passed into the function.
Incorrect number of variables.
35 Data not available in cyclic read.
Attempt to transfer data with TRANSCYC (or TRANSCYCPACK) before it has been read in the equipment.
40 Deferred read or write attempt when the deferred request register is full.
Another task must free the resources by making an exitbus
41 Deferred read or write attempt when the deferred request register is full
Perform deferred request transfers with TRANSDIF (or TRANSDIFPACK) in order to release the register
(64 positions).
42 Deferred request transfer attempt with TRANSDIF (or TRANSDIFPACK) when the latter is empty (no
deferred requests in progress).
45 Non-resident communication software.
Initialize the applicom® interface before using it by running PCINIT tool.
46 Board number not configured, or Master/client applicom® function aiming at a channel configured as
slave/server, or vice versa.
47 No applicom® interface.
51 Driver system problem.
59 Protection key missing on the applicom® interface.
Using applicom® function without INITBUS function.
66 Insufficient applicom® interface memory.
255 Used by the “PCDDE” server. Initial value of “STATUS_READ” and “STATUS_WRITE”. This value
indicates that no transaction has been made between “PCDDE” and applicom® interface.

Comments: Negative status are information codes.

Siemens PPI 16 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Statuses according to the protocol
Status description
0 No anomaly detected. The function took place correctly.
1 Unknown function.
The requested function is not supported.
2 Incorrect address.
The address of the variable you are soliciting is incorrect.
- Returned by the destination coupler equipment. Undeclared DB.
3 Incorrect data.
Further details:
- Inconsistent frame content.-
4 Irretrievable data.
Further details:
- Non-existent peripheral (for example: input or output card not present in the PLC).
10 Layer 2 negative acknowledgment from the equipment (NACK).
- UE (User Error), Error in remote equipment.
11 Layer 2 negative acknowledgment from the equipment (NACK).
- RR (Remote Resource), Not enough resources in remote equipment.
12 Layer 2 negative acknowledgment from the equipment (NACK).
- RS (Remote Service), The layer 2 service used is not authorized on the SAP or the SAP is not activated.
13 Layer 2 negative acknowledgment from the equipment (NACK).
- RDL (Response FDL/FMA1/2 Data Low), Not enough resources in remote equipment to reply in low
priority.
14 Layer 2 negative acknowledgment from the equipment (NACK).
- RDH (Response FDL/FMA1/2 Data High), Not enough resources in remote equipment to reply in high
priority.
15 - LS (Local Service), local SAP not activated.
16 - NO (Not OK), Significance dependent on layer 2 service.
32 Bad parameter passed into the function.
Incorrect number of variables.
33 Response time fault (Time-Out).
- The remote equipment is not in the logic ring.
34 Parity fault in reception or of control word (CRC16, BCC).
36 Equipment not configured.
Define the equipment configuration with the console and start again the applicom® product
48 The RS232 channel of the applicom® interface configured in “6 signals” cannot emit, since it waited for
the CTS signal from the modem for more than 3 seconds during an emission.

Siemens PPI 17 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


8. Glossary of terms

applicom® interface
Communication card, PCI type, with the applicom® real time multi-task kernel.

bauds
Bit per second

channel
Physical output of an applicom® card.

coupler
Communication interface.

DB
Siemens word to describe a Data bloc

EN 50170
European Norm describing fieldbus: PROFIBUS, WORLDFIP and P-NET.

Item
Defines an element

OPC
Ole for Process Control.

PCDDE
applicom® DDE server.

EPROM
Read only memory on applicom® interfaces which contains programs

Siemens PPI 18 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Siemens PPI 19 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.

You might also like