SIEMENS
SIMATIC S7
Toolbox for PGs and PCs (AT and compatibles)
PRODAVE S7
Toolbox for MS-DOS and WINDOWS 3.11/95/NT
Applications for a Data Link
of PGs/PCs to SIMATIC S7 via MPI Interface and
PC/MPI Cable
Operating Instructions
PRODAVE S7 MS-DOS/WFW 3.11 Order No.: 6ES7 807 - 1AA00 - 0YA0
PRODAVE S7 Win95/NT mini Order No.: 6ES7 807 - 3BA00 - 0YA0
PRODAVE S7 Win95/NT Order No: 6ES7 807 - 4BA00 - 0YA0
Copyright Siemens AG 1999 All Rights Reserved
Toolbox for Data Link PGs/PCs to SIMATIC S7
Index
1. INTRODUCTION .................................................................................................. 1
1.1 Basic Functions ................................................................................................................................2
1.1.1 Functions for Data Transfer to S7 300/400 .................................................................................2
1.1.2 Functions for Data Transfer to S7 200........................................................................................3
1.3 TeleService Functions......................................................................................................................4
2. DESCRIPTION ..................................................................................................... 4
2.1 Operating Mode of PRODAVE.......................................................................................................4
2.2 Use of the High Language Adaptor.................................................................................................5
2.3 Pre-requisites ...................................................................................................................................5
2.4 Connection of PG/PC to PLC ..........................................................................................................6
2.4.1 Driver under Windows 95/NT....................................................................................................6
2.4.2 Driver under MS-DOS and Windows 3.11..................................................................................7
3. OPERATION....................................................................................................... 10
3.1 Installation of PRODAVE S7.........................................................................................................10
3.1.1 Installation of PRODAVE S7 under Windows 95/NT...............................................................10
3.1.2 Installation of PRODAVE S7 under Windows 3.11 and MS-DOS ............................................11
3.2 Scope of Supply PRODAVE S7 .....................................................................................................13
3.2.1 PRODAVE S7 for Windows 95/NT..........................................................................................13
3.2.2 PRODAVE S7 mini for Windows 95/NT..................................................................................14
3.2.3 PRODAVE S7 for Windows 3.11 and MS-DOS .......................................................................15
3.3 Working with PRODAVE .............................................................................................................16
3.3.1 Notes on S7-200......................................................................................................................16
3.3.2 Notes on AS300/400.................................................................................................................16
3.4 Differences between S5 and S7......................................................................................................17
3.5 Linking to Standard Tools.............................................................................................................19
3.5.1 PRODAVE under Delphi (32-Bit) Example .............................................................................19
3.5.2 PRODAVE under Access (32-Bit) Example .............................................................................20
3.5.3 PRODAVE under Visual Basic (32-Bit) Example.....................................................................21
4. DESCRIPTION OF PRODAVE FUNCTIONS..................................................... 22
Functions Overview...................................................................................................................................23
4.1 Basic Functions ..............................................................................................................................25
load_tool..........................................................................................................................................25
new_ss.............................................................................................................................................27
unload_tool......................................................................................................................................27
4.1.1 Basic Functions for Data Transfer S7-300/400 .........................................................................28
a_field_read.....................................................................................................................................28
Toolbox for Data Link PGs/PCs to SIMATIC S7
a_field_write....................................................................................................................................29
ag_info............................................................................................................................................30
ag_zustand.......................................................................................................................................31
db_buch...........................................................................................................................................32
db_read............................................................................................................................................33
db_write...........................................................................................................................................35
d_field_read.....................................................................................................................................36
d_field_write....................................................................................................................................36
e_field_read.....................................................................................................................................37
mb_bittest........................................................................................................................................38
mb_resetbit......................................................................................................................................38
mb_setbit.........................................................................................................................................39
m_field_read....................................................................................................................................40
m_field_write ..................................................................................................................................40
t_field_read......................................................................................................................................41
z_field_read.....................................................................................................................................41
z_field_write....................................................................................................................................41
mix_read .........................................................................................................................................42
mix_write........................................................................................................................................45
4.1.2 Basic Functions for Data Transfer S7-200 ...............................................................................46
as200_ag_info..................................................................................................................................47
as200_ag_zustand............................................................................................................................49
as200_e_field_read ..........................................................................................................................50
as200_a_field_read..........................................................................................................................50
as200_m_field_read.........................................................................................................................50
as200_sm_field_read .......................................................................................................................50
as200_vs_field_read.........................................................................................................................50
as200_a_field_write.........................................................................................................................52
as200_m_field_write........................................................................................................................52
as200_sm_field_write ......................................................................................................................52
as200_vs_field_write .......................................................................................................................52
as200_t_field_read...........................................................................................................................53
as200_z_field_read..........................................................................................................................54
as200_z_field_write.........................................................................................................................55
as200_mb_bittest.............................................................................................................................56
as200_mb_resetbit ...........................................................................................................................56
as200_mb_setbit ..............................................................................................................................56
as200_mix_read...............................................................................................................................57
as200_mix_write .............................................................................................................................59
4.2 Enhanced Functions for Data Handling in PG/PC .......................................................................60
boolean_byte....................................................................................................................................60
byte_boolean....................................................................................................................................60
gp_to_float.......................................................................................................................................61
float_to_gp.......................................................................................................................................62
kg_to_float.......................................................................................................................................62
float_to_kg.......................................................................................................................................62
kf_integer ........................................................................................................................................63
testbit...............................................................................................................................................63
error_message..................................................................................................................................64
4.3 Asynchronous Functions (only possible under MS-DOS and Windows 3.11)............................66
e_field_read_as................................................................................................................................66
a_field_read_as................................................................................................................................66
m_field_read_as...............................................................................................................................66
t_field_read_as ................................................................................................................................66
z_field_read_as................................................................................................................................66
d_field_read_as................................................................................................................................67
db_read_as.......................................................................................................................................67
Toolbox for Data Link PGs/PCs to SIMATIC S7
a_field_write_as...............................................................................................................................67
m_field_write_as .............................................................................................................................67
z_field_write_as...............................................................................................................................67
d_field_write_as ..............................................................................................................................67
db_write_as .....................................................................................................................................67
db_buch_as......................................................................................................................................68
mix_read_as ....................................................................................................................................68
mix_write_as...................................................................................................................................68
4.4 TeleService Funcions .....................................................................................................................69
4.4.1 General Commments on the Modem Connection......................................................................72
4.4.2 Active Telephone Dialling from the PLC..................................................................................72
ts_dial..............................................................................................................................................73
ts_hang_up_dial ..............................................................................................................................76
ts_set_ringindicator .........................................................................................................................77
ts_read_info.....................................................................................................................................79
ts_hang_up_ring..............................................................................................................................79
5. DEMONSTRATION PROGRAMS ...................................................................... 80
5.1 Demonstration Programs for the PC.............................................................................................80
6. APPENDIX.......................................................................................................... 82
6.1 Error Texts.....................................................................................................................................82
6.2 Used Abbreviations........................................................................................................................86
6.3 Literature and Ordering Data.......................................................................................................87
6.3.1 Modules ...................................................................................................................................87
6.3.2 PRODAVE Overview...............................................................................................................88
Toolbox for Data Link PGs/PCs to SIMATIC S7
1. Introduction
Due to their constantly increasing performance and vast availability of PC
applications for the manufacturing process, the Personal Computer is being
used more and more on the factory shop floor in addition to the programming
unit. This, however, poses the problem to you as the user how to combine the
variety of programs for handling of process data (e.g. data banks, statistical
evaluation) with your existing PLC systems. In order to make PLC data
available for the PC application you will need a working and cost effective data
link between PLC and PC.
This is where the software package PRODAVE S7 will offer the solution.
PRODAVE S7 offers tried and tested functions (tools) in a DLL (Dynamic Link
Library) or LIB (Library) which you can combine for each of your applications.
The combination of the tools is carried out in programming languages for
Windows NT, Windows 95, Windows 3.11 or MS-DOS.
Via these combined functions the process data traffic between PLC and PG/PC
is established by PRODAVE S7 using the MPI interface of the PLC. The data
now available can be translated into a format suitable for PCs and can be
processed by your own application or any standard application. This will
enable you to create a data link between PLC and PG/PC without having
detailed knowledge, and all your development activities can be concentrated on
specific processing of your data.
PRODAVE S7 enables you to not only evaluate and monitor but to influence
your process as well inasmuch that you can have several functions available to
you to enable you to write data to the PLC from the PG/PC.
As an introduction to PRODAVE S7 and to enable you to familiarise yourself
with it, we supply several demonstration programs as examples. These
functions are fully operational and are available in source code (see Para. 5.
Demonstration Programs).
PRODAVE S7 runs under MS-DOS or Windows 3.11 and Windows 95/NT on
PG 7xx and on Pcs which are compatible to Industrial Standard in conjunction
with MPI interfaces (CP5411, CP5511, CP5611) or PC/MPI cables.