Upload
phamdieu
View
242
Download
0
Embed Size (px)
Citation preview
s
Preface, Contents
Introduction 1 Installation 2 New Functions as of PRODAVE MPI/IE V6.0 3 Glossary, Index
SIMATIC
PRODAVE MPI/IE V6.0 Manual
Edition 05/2005 A5E00388168-01
Copyright Siemens AG 2005 All rights reserved
The distribution and duplication of this document or the utilization and transmission of its contents are not permitted without express written permission. Offenders will be liable for damages. All rights, including rights created by patent grant or registration of a utility model or design, are reserved Siemens AG Automation and Drives Postfach 4848, 90327 Nuremberg, Germany
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the information in this publication is reviewed regularly and any necessary corrections are included in subsequent editions. Siemens AG 2005 Technical data subject to change.
Siemens Aktiengesellschaft A5E00388168-01
Safety Guidelines
This manual contains notices you have to observe in order to ensure your personal safety, as well as to
prevent damage to property. The notices referring to your personal safety are highlighted in the manual
by a safety alert symbol, notices referring to property damage only have no safety alert symbol. The
notices shown below are graded according to the degree of danger.
! Danger indicates that death or severe personal injury will result if proper precautions are not taken.
! Warning indicates that death or severe personal injury may result if proper precautions are not taken.
! Caution with a safety alert symbol indicates that minor personal injury can result if proper precautions are not taken.
Caution
without a safety alert symbol indicates that property damage can result if proper precautions are not taken.
Attention
indicates that an unintended result or situation can occur if the corresponding notice is not taken into account.
If more than one degree of danger is present, the warning notice representing the highest degree of
danger will be used. A notice warning of injury to persons with a safety alert symbol may also include a
warning relating to property damage.
Qualified Personnel
The device/system may only be set up and used in conjunction with this documentation. Commissioning and operation of a device/system may only be performed by qualified personnel. Within the context of
the safety notices in this documentation qualified persons are defined as persons who are authorized to
commission, ground and label devices, systems and circuits in accordance with established safety
practices and standards.
Prescribed Usage
Note the following:
! Warning This device and its components may only be used for the applications described in the catalog or the technical description, and only in connection with devices or components from other manufacturers which have been approved or recommended by Siemens. Correct, reliable operation of the product requires proper transport, storage, positioning and assembly as well as careful operation and maintenance.
Trademarks
All names identified by ® are registered trademarks of the Siemens AG.
The remaining trademarks in this publication may be trademarks whose use by third parties for their
own purposes could violate the rights of the owner.
PRODAVE MPI/IE V6.0 A5E00388168-01 iii
Preface
Purpose of the Manual
This manual gives you a complete overview of the PRODAVE MPI/IE V6.0 functions.
This manual is intended for those responsible for configuring, commissioning, and servicing automation systems.
Required Basic Knowledge
You require a general knowledge in the field of automation engineering to be able to understand this manual.
In addition, you should know how to use computers or devices with similar functions (e.g programming devices) under Windows 2000 or XP operating systems.
Where is this Manual valid?
This manual is valid for the software package PRODAVE MPI/IE V6.0.
Preface
PRODAVE MPI/IE V6.0 iv A5E00388168-01
Further Support
If you have any technical questions, please get in touch with your Siemens representative or agent responsible.
You will find your contact person at:
http://www.siemens.com/automation/partner
You will find a guide to the technical documentation offered for the individual SIMATIC Products and Systems here at:
http://www.siemens.com/simatic-tech-doku-portal
The online catalog and order system is found under:
http://mall.automation.siemens.com/
Training Centers Siemens offers a number of training courses to familiarize you with the SIMATIC S7 automation system. Please contact your regional training center or our central training center in D 90327 Nuremberg, Germany for details:
Telephone: +49 (911) 895-3200.
Internet: http://www.sitrain.com
Preface
PRODAVE MPI/IE V6.0 A5E00388168-01 v
Technical Support
You can reach the Technical Support for all A&D products
• Via the Web formula for the Support Request http://www.siemens.com/automation/support-request
• Phone: + 49 180 5050 222
• Fax: + 49 180 5050 223
Additional information about our Technical Support can be found on the Internet pages http://www.siemens.com/automation/service
Service & Support on the Internet In addition to our documentation, we offer our Know-how online on the internet at:
http://www.siemens.com/automation/service&support
where you will find the following:
• The newsletter, which constantly provides you with up-to-date information on your products.
• The right documents via our Search function in Service & Support.
• A forum, where users and experts from all over the world exchange their experiences.
• Your local representative for Automation & Drives.
• Information on field service, repairs, spare parts and more under "Services".
PRODAVE MPI/IE V6.0 A5E00388168-01 vii
Contents
1 Introduction 1-1
2 Installation 2-1
2.1 Automation License Manager........................................................................2-1 2.1.1 User Rights through the Automation License Manager ....................................2-1 2.1.2 Installing the Automation License Manager ......................................................2-3 2.1.3 Guidelines for Handling License Keys ..............................................................2-4 2.2 Installing PRODAVE MPI/IE V6.0 ...................................................................2-5 2.2.1 Installation Procedure .......................................................................................2-6 2.2.2 Setting the PG/PC Interface..............................................................................2-8 2.3 Uninstalling PRODAVE MPI/IE V6.0 ............................................................2-10 2.3.1 Uninstalling PRODAVE MPI/IE V6.0...............................................................2-10
3 New Functions as of PRODAVE MPI/IE V6.0 3-1
3.1 Basic Functions ..............................................................................................3-4 3.1.1 LoadConnection_ex6 ........................................................................................3-4 3.1.2 UnloadConnection_ex6.....................................................................................3-7 3.1.3 SetActiveConnection_ex6 .................................................................................3-8 3.1.4 SetPassword_ex6 .............................................................................................3-9 3.1.5 UnSetPassword_ex6.......................................................................................3-10 3.1.6 as_info_ex6 .....................................................................................................3-11 3.1.7 as_zustand_ex6 ..............................................................................................3-13 3.1.8 db_buch_ex6...................................................................................................3-15 3.1.9 db_read_ex6 ...................................................................................................3-17 3.1.10 db_write_ex6...................................................................................................3-19 3.1.11 bst_read_diag_ex6..........................................................................................3-21 3.1.12 bst_read_stat_ex6...........................................................................................3-23 3.1.13 bst_read_ex6 ..................................................................................................3-25 3.1.14 read_diag_buf_ex6 .........................................................................................3-29 3.1.15 field_read_ex6.................................................................................................3-31 3.1.16 field_write_ex6 ................................................................................................3-33 3.1.17 mb_setbit_ex6.................................................................................................3-35 3.1.18 mb_bittest_ex6................................................................................................3-37
Contents
PRODAVE MPI/IE V6.0 viii A5E00388168-01
3.2 Functions for Data Transfer to S7-200........................................................3-39 3.2.1 as200_as_info_ex6 .........................................................................................3-39 3.2.2 as200_as_zustand_ex6 ..................................................................................3-41 3.2.3 as200_field_read_ex6.....................................................................................3-43 3.2.4 as200_field_write_ex6 ....................................................................................3-45 3.2.5 as200_mb_setbit_ex6 .....................................................................................3-47 3.2.6 as200_mb_bittest_ex6 ....................................................................................3-49 3.3 Convenience Functions................................................................................3-51 3.3.1 GetErrorMessage_ex6 ....................................................................................3-51 3.3.2 kg_2_float_ex6................................................................................................3-55 3.3.3 float_2_kg_ex6................................................................................................3-56 3.3.4 gp_2_float_ex6................................................................................................3-57 3.3.5 float_2_gp_ex6................................................................................................3-58 3.3.6 testbit_ex6 .......................................................................................................3-59 3.3.7 byte_2_bool_ex6.............................................................................................3-60 3.3.8 bool_2_byte_ex6.............................................................................................3-62 3.3.9 kf_2_integer_ex6, kf_2_long_ex6 ...................................................................3-64 3.3.10 swab_buffer_ex6.............................................................................................3-66 3.3.11 copy_buffer_ex6..............................................................................................3-67 3.3.12 ushort_2_bcd_ex6, ulong_2_bcd_ex6 ............................................................3-68 3.3.13 bcd_2_ushort_ex6, bcd_2_ulong_ex6 ............................................................3-70 3.3.14 GetLoadedConnections_ex6...........................................................................3-72 3.4 TeleService Functions ..................................................................................3-73 3.4.1 ts_dial_ex6 ......................................................................................................3-73 3.4.2 ts_hang_up_dial_ex6 ......................................................................................3-75 3.4.3 ts_set_ringindicator_ex6 .................................................................................3-76 3.4.4 ts_read_info_ex6.............................................................................................3-78 3.4.5 ts_hang_up_ring_ex6......................................................................................3-79 3.4.6 ts_get_modem_name_ex6..............................................................................3-80
Index 1
PRODAVE MPI/IE V6.0 A5E00388168-01 1-1
1 Introduction PRODAVE MPI/IE V6.0 provides functions which can be combined with a user application. The tools are combined in the development environments of the C and Basic programming languages.
During communication PRODAVE MPI/IE V6.0 accesses functions of the S7SDD component. The parameters are assigned to the interfaces using the "Set PG/PC interface" of the S7SDD.
The following major extensions to the functions have been incorporated in PRODAVE MPI/IE V6.0:
• Support for standard Ethernet cards on the PC and all relevant Ethernet CPs of the SIMATIC S7 (CPU 31xx PN, CP 31 x PN, CP 343 and CP 443 in all variations, standard and advanced).
• Double word support for reading/writing data blocks via Industrial Ethernet (to date only bit-, byte-, word- and block-by-block support).
• Support from "Advanced Costumers/Customers" with new function via Industrial Ethernet. Module lists/header information read for the diagnosis (FCs/FBs) and status displays (OBs/FCs/FBs/DBs), reading code modules for the diagnosis and reading out the data of the diagnosis buffer as well as the system status lists.
All SIMATIC automation systems are supported:
• S7 400
• S7 300
• S7 200
PRODAVE MPI/IE V6.0 only supports the following operating systems: Windows 2000, Windows XP Home, and Windows XP Professional. Also the respective up-to-date service packs are also supported.
The services via industrial Ethernet receive clearance only for Windows 2000 and Windows XP!
PRODAVE MPI/IE V6.0 supports neither Fast-User-Switching nor terminal-server operation!
PRODAVE MPI/IE V6.0 A5E00388168-01 2-1
2 Installation
2.1 Automation License Manager
2.1.1 User Rights through the Automation License Manager
Automation License Manager
A product-specific license key (user rights) is required which is installed by PRODAVE MPI/IE V6.0 with the Automation License Manager from VV6.0 on.
Automation License Manager is a software product of Siemens AG. It is a global system toolused to handle license keys (technical license representatives.)
You can find the Automation License Manager:
• On the installation device for the respective software product requiring a license key or
• On a separate installation device as well as
• As a download from the Internet page of A&D Customer Support at Siemens AG.
Automation License Manager provides an integrated Online Help system. You can call this help after installation context-sensitive by pressing F1, or by selecting the Help > Help on License Manager command. This online help contains detailed information on the functionality and operation of the Automation License Manager.
Licenses
Licenses are required to use PRODAVE MPI/IE V6.0 program packages whose legal use is protected by licenses. A license gives the user a legal right to use the product. Evidence of this right is provided by the following:
• The CoL (Certificate of License) and
• The license key
Certificate of License (CoL)
The "Certificate of License" that is included with a product is the legal evidence that a right to use this product exists. This product may only be used by the owner of the Certificate of License (CoL) or by those persons authorized to do so by the owner.
Installation
PRODAVE MPI/IE V6.0 2-2 A5E00388168-01
License keys
The license key is the technical representation (an electronic "license stamp") of a license to use software.
SIEMENS AG issues a license key for all software protected by legal license agreement. When the computer has been started, such software can only be used in accordance with the applicable license and terms of use after the presence of a valid license key has been verified.
Notes
• You can use PRODAVE MPI/IE V6.0 without a license key to familiarize yourself with the user interface and functions.
• However, a license is required and necessary for full, unrestricted use in accordance with the license agreement.
• If you have not installed the license key, you will be prompted to do so at regular intervals.
License keys can be stored and transferred among various types of storage devices as follows:
• On license key diskettes
• On the local hard disk
• On network hard disk
If software products for which no license is available are installed, you can then determine which license key is needed and order it as required.
For further information on handling license keys, please refer to the Automation License Manager Online Help.
Installation
PRODAVE MPI/IE V6.0 A5E00388168-01 2-3
Licenses
Siemens AG distinguishes between the following user-oriented license types for its software products. The behavior of the software is controlled by different license keys for these license types. The type of use is derived from the relevant Certificate of License.
License Type Description
Single License The software can be used on any single computer desired for an unlimited amount of time.
Floating License The software can be used on a computer network ("remote use") for an unlimited amount of time.
Trial License The software can be used subject to the following restrictions:
• A period of validity of up to a maximum of 14 days,
• A total number of operating days after the day of first use,
• A use for tests and validation (exemption from liability).
Upgrade License An upgrade may require a specific system state:
• An upgrade license can be used to convert an "Old"Version x to a Version >x+... license.
• An upgrade may be necessary due to an increase in the volume of data being handled in the given system.
2.1.2 Installing the Automation License Manager
The Automation License Manager is installed by means of an MSI setup process. The installation software for the Automation License Manager is included on the PRODAVE MPI/IE V6.0 product CD
You can install the Automation License Manager at the same time you install PRODAVE MPI/IE V6.0 or at a later time.
Notes
• For detailed information on how to install the Automation License Manager, please refer to the current "Readme.wri" file.
• The online help for the Automation License Manager contains all the information you need on the function and handling of license keys.
Installation
PRODAVE MPI/IE V6.0 2-4 A5E00388168-01
Subsequent Installation of License Keys
If you start the PRODAVE MPI/IE V6.0 software and no license keys are in place, you will receive a message to that effect.
Notes
• You can use PRODAVE MPI/IE V6.0 without a license key to familiarize yourself with the user interface and functions.
• However, a license is required and necessary for full, unrestricted use in accordance with the license agreement.
• If you have not installed the license key, you will be prompted to do so at regular intervals.
You can subsequently install license keys in the following ways:
• Install license keys from diskettes
• Install license keys downloaded from the Internet. In this case, the license keys must be ordered first.
• Use floating license keys available in a network
For detailed information on installing license keys, refer to the online help for the Automation License Manager. To access this help context-sensitively, press F1 or select the Help > Help on License Manager menu command.
Notes
• In Windows 2000/XP, license keys will only be operational if they are installed on a local hard disk and have write-access status.
• Floating licenses can also be used within a network ("remote" use).
2.1.3 Guidelines for Handling License Keys
! Caution
Please note the information on handling license keys that is available in the online help on the Automation License Manager and also in the PRODAVE MPI/IE V6.0 Readme.wri file on the installation CD-ROM. If you do not follow these guidelines, the license keys may be irretrievably lost.
You can open the Automation License Manager Online Help context-sensitively by pressing F1, or by selecting the Help > Help on Automation License Manager command.
This help section contains all the information you need on the function and handling of license keys.
Installation
PRODAVE MPI/IE V6.0 A5E00388168-01 2-5
2.2 Installing PRODAVE MPI/IE V6.0 PRODAVE MPI/IE V6.0 contains a Setup program that performs an automatic installation.On-screen input requests take you through the entire installation procedure step-by-step. Execute Setup using the standard Windows 2000/XP software installation procedure.
The major stages in the installation are:
• Copying the data to your programming device
• Configuration of communication drivers,
• Entering the ID No.
• Installing the license keys (if desired).
Installation Requirements
• Operating system Microsoft Windows 2000, Windows XP.
• Basic hardware: Programming device or PC with:
- Pentium Processor ( for Microsoft Windows 2000, P233, for Windows XP, P 333).
- RAM Memory extension: at least 256 MB.
- Color monitor, keyboard and mouse, all of which are supported by Microsoft Windows.
A programming device (PG) is a PC with a special compact design for industrial use. It is fully equipped for programming SIMATIC PLCs.
• Hard disk space: Refer to the "README.WRI" file for information on required hard disk space.
• MPI interface optional): An MPI interface is only required to interconnect the PG/PC and the PLC if you want to use it for communication with the PLC under PRODAVE MPI/IE V6.0. In this case you require:
- A PC adapter and a zero modem cable (RS232), which are connected to the communications interface of your device, or
- An MPI module (for example, CP 5611) that is installed in your device.
PGs are supplied with a pre-installed MPI interface.
Notes Refer to the information on PRODAVE MPI/IE V6.0 .
You can find the Readme file in the start menu under Start > Simatic > Product Notes.
Installation
PRODAVE MPI/IE V6.0 2-6 A5E00388168-01
2.2.1 Installation Procedure
Preparations
The operating system (Windows 2000 or XP) must be started before you can start your software installation.
• You do not require an external storage medium if the installable PRODAVE MPI/IE V6.0 software is already stored on the hard disk of the PG.
• To run Setup from CD-ROM, place the CD-ROM into the CD-ROM drive of your PC.
Starting the Installation Program
To install the software, proceed as follows:
1. Insert the CD-ROM and double click on the file "SETUP.EXE".
2. Follow the on-screen step-by-step instructions of the installation program.
The program guides you through all steps of the installation. You can go to the next step or return to the previous step.
During installation, the dialog boxes prompt you to make your choice from the displayed options. The following notes will help you to quickly and easily find the right answers.
Selecting the Installation Options
You have three options when determining the scope of installation:
• PRODAVE MPI 5.6: all the functions of version 5.6. Please check the current product information for the hard disk space required.
• PRODAVE MPI/IE V6.0: all the functions of version V6.0. Please check the current product information for the hard disk space required.
• PRODAVE MPI 5.6 and PRODAVE MPI/IE V6.0: all the functions of versions 5.6 and V6.0. Please check the current product information for the hard disk space required.
ID Number
You will be prompted during setup to enter an ID number Enter the ID number. You will find it on the software product certificate or on the License key diskette that comes with it.
Installation
PRODAVE MPI/IE V6.0 A5E00388168-01 2-7
Installing License Keys
During setup, the program checks to see whether a corresponding license key is installed on the hard disk. If no valid license key is found, a message stating that the software can be used only with a license key is displayed. If you want, you can install the license key immediately or continue setup and then install the key later. If you want to install the license key now, insert the authorization diskette when prompted to do so.
PG/PC Interface Settings
During installation, a dialog box is displayed where you can assign parameters to the programming device/PC interface. You will find more information on it in "Setting the PG/PC Interface."
Setup errors
Setup may be aborted due to the following errors:
• If an initialization error occurs immediately after the start of setup, it is more than likely setup was not started under Windows.
• Insufficient hard disk space: Minimum free hard disk space required for a standard software installation is 50 Mbytes, regardless of the scope of your installation.
• Bad CD-ROM: If the CD is faulty, please contact your local Siemens representative.
• Operator error: Restart setup and follow the instructions carefully.
After the Installation has been Completed…
An on-screen message reports the successful installation.
If any changes were made to system files during the installation, you are prompted to restart Windows. After restarting (warm start) you can start the user interface of PRODAVE MPI/IE V6.0.
A program group for PRODAVE MPI/IE V6.0 is set up after a successful installation.
Installation
PRODAVE MPI/IE V6.0 2-8 A5E00388168-01
2.2.2 Setting the PG/PC Interface
You configure the communication between the PG/PC and the PLC with the settings entered here. During installation, a dialog box is displayed for setting the PG/PC interface. You can also open this dialog box after installation, by calling the program "Setting PG/PC Interface" in the PRODAVE MPI/IE V6.0 program group. This enables you to modify the interface parameters at a later time, independently of the installation.
Basic Procedure
To operate an interface, you will require the following:
• Configurations in the operating system
• A suitable interface configuration
If you are using a PC with an MPI card or communications processors (CP), you should check the interrupt and address assignments in the Windows "Control Panel" to ensure that there are no interrupt conflicts and that no address areas overlap.
In Windows 2000 and Windows XP, the ISA component MPI-ISA card is no longer supported and therefore no longer offered for installation.
In order to make it easier to assign parameters to the programming device/PC interface, a dialog box will display a selection list of default basic parameter sets (interface configurations).
Assigning Parameters to the PG/PC Interface
Procedure (details to be found in the Online Help):
Double-click on "Setting PG/PC Interface" in the "Control Panel" of Windows.
1. Set the "Access Point of Application" to "S7ONLINE."
2. In the list "Interface parameter set used", select the required interface parameter set. If the required interface parameter set is not displayed, you must first install a module or protocol via the "Select" button. The interface parameter set is then generated automatically. On plug-and-play systems, you cannot install plug and play CPs manually (CP 5611 and CP 5511). They are integrated automatically in "Setting PG/PC Interface" after you have installed the hardware in your PG/PC.
- If you select an interface with automatic bus parameter recognition (e. g. CP 5611 (Auto)), then you can connect the PG and/or the PC to MPI and/or PROFIBUS without having to set bus parameters. If the transmission rate is < 187.5 Kbps, there may be a delay of up to one minute while the bus parameters are read. Requirement for automatic recognition: Masters who broadcast bus parameters cyclically are connected to the bus. All new MPI components do this; for PROFIBUS subnets the cyclic broadcast of bus parameters must be enabled (default PROFIBUS network setting).
Installation
PRODAVE MPI/IE V6.0 A5E00388168-01 2-9
- If you select an interface which does not automatically recognize the bus parameters, you can display the properties and adapt them to match the subnet.
Changes will also be necessary if conflicts with other settings arise (for example, interrupt or address assignments). In this case, make the appropriate changes with the hardware recognition and Control Panel in Windows (see below).
! Caution
Do not remove any "TCP/IP" parameters from your interface configuration.
This could cause malfunctioning of other applications.
Checking the Interrupt and Address Assignments
If you use a PC with an MPI card, you should always check whether the default interrupt and the default address area are free and, if necessary select a free interrupt and/or address area.
Windows 2000
In Windows 2000 you can have the resources displayed
• with Control Panel > Administrative Tools > Computer Management > System > System Information > Hardware Resources.
• with Control Panel > Administrative Tools > Computer Management > System > Device Manager > SIMATIC NET > CP-Name > Properties> Resources you can change the resources.
Windows XP
In Windows 2000 you can have the resources displayed
• with Start > All Programs > Accessories > System > System Programs > System Information > Hardware Resources.
• with Control Panel > My Computer > Properties > Device Manager > SIMATIC NET > CP-Name > Properties > Change Resources you can change the resources.
Installation
PRODAVE MPI/IE V6.0 2-10 A5E00388168-01
2.3 Uninstalling PRODAVE MPI/IE V6.0
2.3.1 Uninstalling PRODAVE MPI/IE V6.0
Use the standard Windows method to uninstall PRODAVE MPI/IE V6.0:
1. Open the "Control Panel" in Windows, then double-click "Software" to open the software setup dialog box.
2. Select the PRODAVE MPI/IE V6.0 entry in the displayed list of installed software. Click the button to "Remove" the software.
3. If the "Remove free file" dialog box appears, click "No" if you are uncertain.
PRODAVE MPI/IE V6.0 A5E00388168-01 3-1
3 New Functions as of PRODAVE MPI/IE V6.0
The following table shows a list of all the new functions
Version PRODAVE MPI/IE V6.0
Description
Library PRODAVE6.DLL
Header PRODAVE6.H
Basic Functions
LoadConnection_ex6 x MPI/Profibus, ISO or TCP/IP Protocol
UnloadConnection_ex6 x MPI/Profibus, ISO or TCP/IP Protocol
SetActiveConnection_ex6 x MPI/Profibus, ISO or TCP/IP Protocol
SetPassword_ex6 x
UnSetPassword_ex6 x
Functions for Data Communication Traffic to the S7 300/400
as_info_ex6 x
as_zustand_ex6 x
db_buch_ex6 x
db_read_ex6 x extended by double words
db_write_ex6 x extended by double words
bst_read_ex6 x Reading out the"Advanced" block code
bst_read_diag_ex6 x "Advanced" block lists/header information
bst_read_stat_ex6 x "Advanced" block lists/header information
read_diag_buf_ex6 x Reading out the "Advanced" diagnostic buffer
field_read_ex6 x Summary of all _field_read
field_write_ex6 x Summary of all _field_write
mb_setbit_ex6 x Setting a bit
mb_bittest_ex6 x
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-2 A5E00388168-01
Functions for Data Communication Traffic to the S7 200
as200_as_info_ex6 x
as200_as_zustand_ex6 x
as200_field_read_ex6 x Summary of all _field_read
as200_field_write_ex6 x Summary of all _field_write
as200_mb_setbit_ex6 x
as200_mb_bittest_ex6 x
Convenience Functions
GetErrorMessage_ex6 x
kg_2_float_ex6 x
float_2_kg_ex6 x
gp_2_float_ex6 x
float_2_gp_ex6 x
testbit_ex6 x
byte_2_bool_ex6 x
bool_2_byte_ex6 x
kf_2_integer_ex6 x
kf_2_long_ex6 x extended by double words
swab_buffer_ex6 x
copy_buffer_ex6 x
ushort_2_bcd_ex6 x
bcd_2_ushort_ex6 x
ulong_2_bcd_ex6 x extended by double words
bcd_2_ulong_ex6 x extended by double words
GetLoadedConnections_ex6 x
TeleService Functions
ts_dial_ex6 x
ts_hang_up_dial_ex6 x
ts_set_ringindicator_ex6 x
ts_read_info_ex6 x
ts_hang_up_ring_ex6 x
ts_get_modem_name_ex6 x
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-3
Functions
All the functions listed are described from the PRODAVE MPI/IE V6.0 user view. Nevertheless, you must also add the WINAPI call convention / load tool to each function.
int WINAPI load_tool (char chConNo, …).
The old PRODAVE MPI 5.6 Libraries (W95_S7.DLL, KOMFORT.DLL) and the new PRODAVE MPI/IE V6.0 Library (PRODAVE6.LIB) can be used parallel in a user program.
You can continue to use old Prodave V5.6 programs. It is not, however, possible to interlace the two versions, i.e. it is not possible to create a connection to the AS with an old function and then to read data with a new function and vice versa. The connection and the reading or writing of the data must take place homogeneously, with the same Prodave Version.
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-4 A5E00388168-01
3.1 Basic Functions
3.1.1 LoadConnection_ex6
The basic LoadConnection_ex6 function initializes the adapter, checks if the driver is loaded, initializes the addresses that have been assigned parameters and activates the selected interface.
LoadConnection_ex6 is used to set up a transport connection via MPI/PB- or IP addresses (TCP/IP protocol)
int LoadConnection_ex6 (int ConNr, char* pAccessPoint, int ConTableLen, CON_TABLE_TYPE * pConTable);
Parameters
ConNr
[in] Number of the connection (max. 64 connections).
pAccessPoint
[in] access point (zero-terminated) of the driver used, e.g. "S7ONLINE" for the MPI driver or 0 (default).
ConTableLen
[in] length of the table of connections provided by the user in bytes
pConTable
[in] pointer to address list of connected users; ‘Adr ==0’ is taken as the end mark of the list.
#pragma pack(1)
typedef union {
unsigned char Mpi; // MPI/PB station address (2)
unsigned char Ip[4]; // IP address (192.168.0.1)
unsigned char Mac[6]; // MAC address (08-00-06-01-AA-BB)
} CON_ADR_TYPE;
typedef struct {
CON_ADR_TYPE Adr; // connection address
unsigned char AdrType; // Type of address: MPI/PB (1), IP (2), MAC (3)
unsigned char SlotNr; // Slot number
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-5
unsigned char RackNr; // Rack number
} CON_TABLE_TYPE;
#pragma pack(1)
Return Values
If there were no errors, the function supplies 0 as the return value.
If an error occurs, the error number is returned; this can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
After eliminating the cause of the error LoadConnection_ex6 has to be executed again in order to create a connection to the AS.
Call example
A new entry in the connection table is prepared for each connection.
unsigned short ConNr= 0; // First connection (0 ... 63)
char AccessPoint[] = {"S7ONLINE"}; // Default access point S7ONLINE
CON_TABLE_TYPE ConTable[MAX_CONNECTION+1] = {0};
// Connection table
CON_TABLE_TYPE * pConTable = ConTable; // Pointer on connection table
unsigned short ConTableLen = sizeof(ConTable); // Length of the connection table
int RetValue;
pConTable[ConNo].Adr.Ip[0] = 192; // Default IP address (192.168.0.1)
pConTable[ConNo].Adr.Ip[1] = 168;
pConTable[ConNo].Adr.Ip[2] = 0;
pConTable[ConNo].Adr.Ip[3] = 1;
pConTable[ConNo].AdrType = 2; // Address type = IP
pConTable[ConNo].SlotNr = 2; // Slot number = 2
pConTable[ConNo].RackNr = 0; // Rack number = 0
RetValue = LoadConnection_ex6 (ConNr, &AccessPoint, ConTableLen, pConTable);
If connection errors take place during operation, you must close the connection and reload it.
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-6 A5E00388168-01
Requirements
V5.6 load_tool, load_tool_ex
V6.0 Load_Connection_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
UnloadConnection_ex6, SetActiveConnection_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-7
3.1.2 UnloadConnection_ex6
The basic UnloadConnection_ex6 deinitialises the connections and the adapter and must be called up before exiting the application.
int UnloadConnection_ex6 (unsigned short ConNr);
Parameters
ConNr
[in] Number of the connection, which was assigned with LoadConnection_ex6.
Return Values
If there were no errors, the function supplies 0 as the return value or an error message is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
If the currently active connection has been closed, an (error) warning is returned.
Call example
Has to be called for each connection in the ConTable connection table.
unsigned short ConNr= 0; // First connection (0 ... 63)
int RetValue;
RetVal = UnloadConnection_ex6 (ConNr);
Requirements
V5.6 unload_tool V6.0 Unload_Connection_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
LoadConnection_ex6, SetActiveConnection_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-8 A5E00388168-01
3.1.3 SetActiveConnection_ex6
The basic SetActiveConnection_ex6 function activates the connection of the PG/PC over which the subsequent data exchange will take place.
int SetActiveConnection_ex6 (unsigned short ConNr);
Parameters
ConNr
[in] Number of a connection assigned with LoadConnection_ex6, which is to be activated.
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error number is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
Call examples
unsigned short ConNr= 7; // (0 ... 63)
int RetValue;
RetVal = SetActiveConnection_ex6(ConNr);
Requirements
V5.6 new_ss V6.0 SetActiveConnection_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
LoadConnection_ex6, UnloadConnection_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-9
3.1.4 SetPassword_ex6
The SetPassword_ex6 function sets a password for a specific connection with a CPU.
int SetPassword_ex6 (unsigned short ConNr, unsigned char * Password);
Parameters
ConNr
[in] Connection number
Password
[in] Pointer to an UCHAR string, length 8
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error number is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
Call examples
If a CPU was saved with a password, a password is required in order to perform changes to the state of the CPU. For this purpose the SetPassword_ex6 must be called after LoadConnection_ex6.
unsigned char passw[8]; // password
unsigned short ConNr= 13; // Connection number
int RetValue;
RetValue = SetPassword_ex6 (ConNr, &passw[0]);
Requirements
V5.6 new_ss V6.0 SetPassword_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
As_zustand_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-10 A5E00388168-01
3.1.5 UnSetPassword_ex6
The UnSetPassword_ex6 function removes the password for a specific connection with a CPU.
int UnSetPassword_ex6 (unsigned short ConNr);
Parameters
ConNr
[in] Connection number
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error number is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
Call examples
unsigned short ConNr= 13; // Connection number
int RetValue;
RetValue = UnSetPassword_ex6 (ConNr);
Requirements
V5.6 new_ss V6.0 UnSetPassword_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
As_zustand_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-11
3.1.6 as_info_ex6
The as_info_ex6 function reads out the release version of the AS software and the PG interface module as well as the MLFB number of the AS and files it as a zero-terminated ASCII string in the transfer buffer of the PG/PC.
int as_info_ex6 (unsigned long BufLen, AS_INFO_TYPE * pInfoBuffer, unsigned long * pDatLen);
Parameters
BufLen
[in] Length of the transfer buffer provided by the user in bytes.
pInfoBuffer
[out] pointer to transfer buffer with the AS information to be delivered:
typedef struct {
unsigned char Plcas[4]; // release version of the hardware
unsigned char Pgas[2]; // Release version of the hardware
char Mlfb[20]; // MLFB of the connected AS.
} AS_INFO_TYPE;
pDatLen
[out] pointer to the length if the data delivered in the buffer in bytes. If the "Transfer buffer provided too small for data" error occurs, the required size of the buffer is given here.
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error number is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
Some AS cannot output the MLFB or the release version of the FW and HW. If this is the case, the MLFB if it had been possible to read it, is written in pInfoBuffer and a corresponding error message is issued.
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-12 A5E00388168-01
Call examples
AS_INFO_TYPE Buffer; // Create transfer buffer
AS_INFO_TYPE * pInfoBuffer = &Buffer; // Transfer buffer address
unsigned long BufLen = sizeof(Buffer); // Transfer buffer length
unsigned long DatLen; // Data length
int RetValue;
RetValue = as_info_ex6 (BufLen, pInfoBuffer, &DatLen);
Requirements
V5.6 ag_info V6.0 as_info_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
see also:
as_zustand_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-13
3.1.7 as_zustand_ex6
The as_zustand_ex6 function reads the AS state (RUN or STOP) and files the dta in a storage area of the PG/PC.
int as_zustand_ex6 (unsigned char * pState);
Parameters
pState
[out] transfer buffer with the AS states to be supplied (length required 1 byte)
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error number is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
Call examples
unsigned char State; // transfer bytes for the AS state to be delivered
int RetValue;
RetValue = as_zustand_ex6 (&State);
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-14 A5E00388168-01
"Current operating state" (values in Hex)
OM ID Meaning
00 Configuration in RUN (EVAL at R-KiR)
01 STOP (update)
02 STOP (memory reset)
03 STOP (self-initialization)
04 STOP (internal)
05 Startup (cold restart)
06 Startup (warm restart)
07 Startup (Hot restart)
08 RUN (Solo)
09 RUN (redundant)
0A HALT
Bx COUPLE
Cx UPDATE
0D Defect
Ex TEST
FX NOPOWER
Requirements
V5.6 ag_zustand V6.0 as_zustand_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
as_info_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-15
3.1.8 db_buch_ex6
The db_buch_ex6 function examines which data blocks are available in the AS.
int db_buch_ex6 (unsigned long BufLen, unsigned short * pBuchBuffer, unsigned long * pDatLen);
Parameters
BufLen
[in] Length of the transfer buffer you provided in bytes.
pBuchBuffer
[out] pointer on transfer buffer for the data blocks already read. The numbers of the data blocks present are written as word values (block number can be 9) in the buffer array.
pDatLen
[out] pointer to the length of the data delivered in the buffer in bytes. If the "Transfer buffer provided too small for data" error occurs, the required size of the buffer is given here.
If pDatLen has the value 0 no data blocks were found.
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error number is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
Call examples
unsigned short Buffer[MAX_BUFFER]; // Transfer buffer
unsigned short * pBuchBuffer = Buffer; // Transfer buffer address
unsigned long BufLen = sizeof(Buffer); // Transfer buffer length
unsigned long DatLen; // Data length
int RetValue;
RetValue = db_buch_ex6 (BufLen, pBuchBuffer, &DatLen);
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-16 A5E00388168-01
Requirements
V5.6 db_buch V6.0 db_buch_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-17
3.1.9 db_read_ex6
The db_read_ex6 reads out a number of data words from a data block in AS and transfers them into a storage area (buffer) of the PG/PC.
It is possible to read out data words word-by-word/double word-by-word (pAmount = 1) or block-by-block (pAmount > 1) with db_read_ex6.
int db_read_ex6 (unsigned short BlkNr, unsigned char DatType, unsigned short StartNr, unsigned long * pAmount, unsigned long BufLen, unsigned char * pReadBuffer, unsigned long * pDatLen)
Parameters
BlkNr
[in] Number of the data block
DatType
[in] Type of data to be read:
0x02 = BYTE, 0x04 = WORD, 0x06 = DWORD default: DatType = 0x02
StartNo
[in] Start number of the first byte or data word / double word to be read
pAmount
[in/out] Amount of data bytes / data words/ data double words to be read
BufLen
[in] Length of the transfer buffer provided by the user in bytes.
pReadBuffer
[out] pointer on transfer buffer for the data words / data double words already read
pDatLen
[out] pointer to the length of the data delivered in the buffer in bytes. If the "Transfer buffer provided too small for data" error occurs, the required size of the buffer is given here.
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error number is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
If the data block does not exist, this is shown by a return value = error number.
If more data are to be read than is present in the data block, the data actually read are written in pReadBuffer; the number (in bytes) of the data actually read is written in pAmount and an error message "block limit exceeded" is returned.
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-18 A5E00388168-01
Call examples
unsigned short blkNr = 0; // Block number = 0
unsigned char DatType = 0x04; // Data type = word
unsigned short StartNr = 2; // First word to be read = 2
int Amount = 6; [in] Amount of words to be read = 6
Unsigned char buffer[MAX_BUFFER]; // Transfer buffer
unsigned char * pReadBuffer = Buffer; // Transfer buffer address
unsigned long BufLen = sizeof(Buffer); // Transfer buffer length
unsigned long DatLen; // Data length
int RetValue;
RetValue = db_read_ex6 (BlkNr, DatType, StartNr, &Amount, BufLen, pReadBuffer, &DatLen);
unsigned short * wBuffer = (unsigned short *)Buffer;
// word-by-word access
unsigned long * dwBuffer = (unsigned long *)Buffer;
// double word-by-word access
Attention!
When accessing a data block the data words in the buffer are not filed according to Intel notation (low byte - high byte), but in STEP5 Notation (high byte – low byte). If the data are to be further processed, attention must be paid to this. The kf_2_integer_ex6, kf_2_long_ex6 and swab_buffer_ex6 functions are available for swapping bytes.
Requirements
V5.6 db_read V6.0 db_read_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
db_write_ex6, kf_2_integer, kf_2_long_ex6, swab_buffer_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-19
3.1.10 db_write_ex6
The db_write_ex6 writes a number of data words that are located in a defined storage area (buffer) in the PG/PC into a data block in the AS.
It is possible to read out data words word-by-word/double word-by-word (pAmount = 1) or block-by-block (pAmount > 1) with db_write_ex6.
int db_write_ex6 (unsigned short BlkNr, unsigned char DatType, unsigned short StartNr, unsigned long * pAmount, unsigned long BufLen, unsigned char * pWriteBuffer);
Parameters
BlkNr
[in] Number of the data block
DatType
[in] Type of data to be written:
0x02 = BYTE, 0x04 = WORD, 0x06 = DWORD default: DatType = 0x02
StartNr
[in] Start number of the first data word / double word to be written
pAmount
[in/out] The number of the data words / data double words to be written
BufLen
[in] Length of the transfer buffer provided by the user in bytes.
pWriteBuffer
[out] pointer on transfer buffer for the data words / double words alreadywritten
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error number is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
If the data block does not exist, this is shown by a return value = error number.
If more data are to be written than are present in the data block, the data actually read are written in pReadBuffer; the number (in bytes) of the data actually read is written in pAmount and an error message "Block limit exceeded" is returned.
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-20 A5E00388168-01
Call examples
unsigned short BlkNr = 0; // Block number = 0
unsigned char DatType = 0x04; // Data type = word
unsigned short StartNr = 2; // First word to be written = 2
int Amount = 6; // Number of words to be written = 6
unsigned char pWriteBuffer [MAX_BUFFER];
// Transfer buffer
unsigned char *pBuffer = Buffer; // Transfer buffer address
unsigned long BufLen = sizeof(Buffer); // Transfer buffer length
int RetValue;
RetValue = db_write_ex6 (BlkNr, DatType, StartNr, &Amount, BufLen, pWriteBuffer);
unsigned short * wBuffer = (unsigned short *)Buffer;
// Word-by-word access
unsigned long * dwBuffer = (unsigned long *)Buffer;
// Double word-by-word access
Requirements
V5.6 db_write V6.0 db_write_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
db_read_ex6, kf_2_integer, kf_2_long_ex6, swab_buffer_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-21
3.1.11 bst_read_diag_ex6
The bst_read_diag_ex6 function reads block lists and header information for the diagnosis (FCs/FBs).
The information is transferred as a structure containing the blocks that are present and the time stamp of each block making it possible to recognize changed blocks (online/offline comparison).
int bst_read_diag_ex6 (int BlkType, unsigned short StartNr, unsigned long * pAmount, unsigned long BufLen, BST_DIAG_TYPE * pDiagBuffer, unsigned long * pDatLen);
If all blocks are to be read, StartNr and pAmount must be set to = 0. After executing the function pAmount shows the number of blocks that have been read.
If the block with the start number (StartNr) is not found, the next higher block is used as the starting block.
Parameters
BlkType
[in] Type of block to be read:
BlkType: 0x08 = OB, 0x0a = DB, 0x0c = FC, 0x0e = FB default: BlkTyp = 0x0a
StartNr
[in] Start number of the first block to be read
Amount
[in/out] Amount of blocks to be read
BufLen
[in] Length of the transfer buffer provided by the user in bytes.
pDiagBuffer
[out] Pointer on transfer buffer for the data blocks already read.
typedef struct {
unsigned short BlkNr; // Block number
struct tm BlkTimestamp; // Time stamp of the block number
} BST_DIAG_TYPE;
pDatLen
[out] pointer to the length of the data delivered in the buffer in bytes. If the "Transfer buffer provided too small for data" error occurs, the required size of the buffer is given here.
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-22 A5E00388168-01
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error number is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
If more data are to be read than are present in the AS, only the diagnosis information actually read is written in pDiagBuffer; the number of blocks read is written in pAmount and an error message "Block limit exceeded" is returned.
Call examples
int BlkType = 0x0a; // Block type = DB
unsigned short StartNr = 2; // First block to be read = 2
int Amount = 4; // Amount of blocks to be read = 4
BST_DIAG_TYPE Buffer[MAX_BLK]; // Transfer buffer array with block lists
BST_DIAG_TYPE * pDiagBuffer = &Buffer;
// Transfer buffer address
unsigned long BufLen = sizeof(Buffer); // Transfer buffer length
unsigned long DatLen; // Data length
int RetValue;
RetValue = bst_read_diag_ex6 (BlkType, StartNr, &Amount, BufLen, pDiagBuffer, &DatLen);
Requirements
V6.0 bst_read_diag_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
bst_read_stat_ex6, bst_read_ex6, read_diag_buf_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-23
3.1.12 bst_read_stat_ex6
The bst_read_stat_ex6 function reads block lists and header information for the status displays (OBs/FCs/FBs/DBs).
int bst_read_stat_ex6 (int BlkType, unsigned long BufLen, BST_STAT_TYPE * pStatBuffer, unsigned long * pDatLen);
Parameters
BlkType
[in] Type of the block to be read
BlkType: 0x08 = OB, 0x0a = DB, 0x0c = FC, 0x0e = FB default: BlkTyp = 0x0a
BufLen
[in] Length of the transfer buffer provided by the user in bytes.
pStatBuffer
[out] Transfer buffer for the data already read.
typedef struct {
unsigned short BlkType; // Block type
unsigned short BlkNumber; // Block number
char BlkName[8]; // Block name
unsigned char BlkVersion; // Block version
unsigned long BlkLength; // Block length
struct tm BlkTimestamp1; // Time stamp 1 of the block number
struct tm BlkTimestamp2; // Time stamp 2 of the block number
unsigned char blkSecurity[4]; // Block password and protection level
} BST_STAT_TYPE;
pDatLen
[out] pointer to the length of the data delivered in the buffer in bytes. If the "Transfer buffer provided too small for data" error occurs, the required size of the buffer is given here.
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error number is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-24 A5E00388168-01
Call examples
int BlkType = 0x0a; // Block type = DB
BST_STAT_TYPE Buffer[MAX_BLK]; // Transfer buffer for the data already read.
BST_STAT_TYPE * pStatBuffer = &Buffer; // Transfer buffer address
unsigned long BufLen = sizeof(Buffer); // Transfer buffer length
unsigned long DatLen; // Data length
int RetValue;
RetValue = bst_read_stat_ex6 (BlkType, BufLen, pStatBuffer, &DatLen);
Requirements
V6.0 bst_read_stat_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
bst_read_diag_ex6, bst_read_ex6, read_diag_buf_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-25
3.1.13 bst_read_ex6
The bst_read_ex6 function reads blocks into a buffer. "Code" blocks are read in completely (header and data), in the case of OBs and DBs only the header is read.
int bst_read_ex6 (int BlkType, unsigned short blkNr, unsigned long BufLen, unsigned char * pReadBuffer, unsigned long * pDatLen);
Parameter
BlkType
[in] Type of block to be read:
BlkType: 0x08 = OB, 0x0a = DB, 0x0c = FC, 0x0e = FB default: BlkTyp = 0x0a
BlkType
[in] Block number of the block to be read
BufLen
[in] Length of the transfer buffer specified by the user in bytes
pReadBuffer
[out] Pointer on transfer buffer for read data
pDatLen
[out] Pointer on length of data delivered to the buffer in bytes. In event of error, "Transfer buffer supplied too small for data" is returned and required buffer size given.
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error message is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
Know-how protected blocks cannot be read. In this case, an appropriate error code is returned.
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-26 A5E00388168-01
Block
Byte Name
0 Programming language
2 Block type 4 Block number
6 Attributes System version number
8 Block length (total)
10 PG block header
12 Length of section 1 (L1) MC5 length 14
16 Length of section 2 (L2) SSB length
18
20 Length of section 3 (L3) ADDINFO length
22
24 Length of dyn. local data
26
tm Timestamp 1
62
tm Timestamp 2
98 Block security
100
102 Producer name
110 Block family name
118 Block name
126 Version (release no.) reserved Header extension
128 Checksum
130 CPU type
134 Signature
136 reserved
138 Section 1 (MC5 code)
138+L1 Section 2 (SSB data)
138+L1+L2 Section 3 (ADDINFO data)
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-27
Header of read block:
typedef struct {
unsigned char ProgLang; // Programing language
unsigned char BlkType; // Block type
unsigned short BlkNumber; // Block number
unsigned char Attribute[8]; // Attributes
unsigned char BlkVersion; // Block version
unsigned long BlkLength; // Block length
unsigned long Length[3]; // Data length
unsigned char DynLen; // Length of dyn. local data
struct tm BlkTimestamp1; // Time stamp 1 of the block number
struct tm BlkTimestamp2; // Time stamp 2 of the block number
unsigned char blkSecurity[4]; // Block level of protection
unsigned char ProducerName[8]; // Producer name
unsigned char BlkFamName[8]; // Block family name
unsigned char BlkName[8]; // Block name
unsigned char Version; // This is a user version and
has nothing to do with block version
.
unsigned short chckSum; // Check sum
unsigned long CPUType; // CPU type
unsigned short signature; // Signature
} BST_HEADER_TYPE;
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-28 A5E00388168-01
Call examples
int BlkType = 0x0a; // Block type = DB
unsigned short blkNr = 34; // Block number 34
BST_HEADER_TYPE Buffer[MAX_BUFFER];
// Transfer buffer read data
BST_HEADER_TYPE *pReadBuffer = Buffer;
// Transfer buffer address
unsigned long BufLen = sizeof(Buffer); // Transfer buffer length
unsigned long DatLen; // Data length
int RetValue;
RetValue = bst_read_ex6 (BlkType, blkNr, BufLen, &Buffer[0], &DatLen);
Requirements
V6.0 bst_read_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
bst_read_diag_ 60, bst_read_stat_ex6, read_diag_buf_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-29
3.1.14 read_diag_buf_ex6
The function read_diag_buf_ex6 reads data from the diagnostic buffer and SSLs in order to gain specific information about the status of the CPU.
int read_diag_buf_ex6 (unsigned long BufLen, unsigned char * pDiagBuffer, unsigned long * pDatLen);
Parameters
BufLen
[in] Length of the transfer buffer specified by the user in bytes
pDiagBuffer
[out] Pointer on transfer buffer for read data
pDatLen
[out] Pointer on length of data delivered to the buffer in bytes. In event of error, "Transfer buffer supplied too small for data" is returned and required buffer size given.
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error message is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
Notes
The maximum deliverable number of available queries can be dependent on operating mode (product-specific definition). For example, a CPU can only return all information when in STOP operating mode.
In RUN operating mode, only a product-specific subset can be returned.
Example of a diagnosis entry
typedef struct {
unsigned short EventID; // EventID
unsigned char EventInfo[20]; // Information about event
unsigned char Timestamp[8]; // Time stamp of event
} DIAG_BUFFER_TYPE;
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-30 A5E00388168-01
Call examples
Unsigned char Buffer[MAX_BUFFER]; // Transfer buffer read data
(DIAG_BUFFER_TYPE) &Buffer[0]; // Place structure over buffer
unsigned long BufLen = sizeof(Buffer); // Length of transfer buffer
unsigned long DatLen; // Data length
int RetValue;
RetValue = read_diag_buf_ex6 (BufLen, pDiagBuffer, &DatLen);
Requirements
V6.0 read_diag_buf_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
bst_read_diag_ex6, bst_read_stat_ex6, bst_read_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-31
3.1.15 field_read_ex6
The function field_read_ex6 reads a number of bytes or words from the AS and transfers them to a PG/PC transfer buffer.
int field_read_ex6 (char FieldType, unsigned short BlkNr, unsigned short StartNr, unsigned long Amount, unsigned long BufLen, unsigned char * pBuffer, unsigned long * pDatLen);
Parameters
FieldType
[in] Value types as ASCII characters: Data byte (d/D), input byte (e/E), output byte (a/A), memory byte (m/M), timer word (t/T), counter word (z/Z)
BlkNr
[in] Block number (only required for data blocks), default = 0
StartNr
[in] Start number of the first byte or word to be read
Amount
[in] Amount of bytes or words to be read
BufLen
[in] Length of the transfer buffer specified by the user in bytes
pBuffer
[out] Transfer buffer for the read bytes or words
pDatLen
[out] Pointer on length of data delivered to the buffer in bytes. In event of error, "Transfer buffer supplied too small for data" is returned and required buffer size given.
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error message is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-32 A5E00388168-01
Call examples
char FieldType = ’D’ // Value type = data byte (D)
unsigned short blkNr = 0; // Block number = 0
unsigned short StartNr = 2; // First word to be read = 2
int Amount = 6; // Number of words to be read = 6
unsigned char Buffer[MAX_BUFFER]; // Transfer buffer
unsigned char *pBuffer = Buffer; // Transfer buffer address
unsigned long BufLen = sizeof(Buffer); // Length of transfer buffer
unsigned long DatLen; // Data length
int RetValue;
RetValue = field_read_ex6 (FieldType, BlkNr, StartNr, Amount, BufLen, pBuffer, &DatLen);
unsigned short * wBuffer = (unsigned short *)Buffer;
// Word by word access
Requirements
V5.6 d|e|a|m|t|z_field_read V6.0 field_read_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
field_write_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-33
3.1.16 field_write_ex6
The function field_write_ex6 writes a number of bytes or words from a PG/PC transfer buffer into the AS.
int field_write_ex6 (char FieldType, unsigned short BlkNr, unsigned short StartNr, unsigned long Amount, unsigned long BufLen, unsigned char * pBuffer);
Parameters
FieldType
[in] Value types as ASCII characters: Data byte (d/D), input byte (e/E), output byte (a/A), memory byte (m/M), timer word (t/T), counter word (z/Z)
BlkNr
[in] Block number (only required for data blocks), default = 0
StartNr
[in] Start number of the first byte or word to be written.
Amount
[in] Amount of bytes or words to be written
BufLen
[in] Length of the transfer buffer specified by the user in bytes
pBuffer
[out] Pointer on transfer buffer for the bytes or words to be written
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error message is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-34 A5E00388168-01
Call examples
char FieldType = ’D’ // Value type = data byte (D)
unsigned short blkNr = 0; // Block number = 0
unsigned short StartNr = 2; // First word to be written = 2
int Amount = 6; // Number of words to be written = 6
unsigned char Buffer[MAX_BUFFER]; // Transfer buffer
unsigned char *pBuffer = Buffer; // Transfer buffer address
unsigned long BufLen = sizeof(Buffer); // Length of transfer buffer
int RetValue;
RetValue = field_write_ex6 (FieldType, BlkNr, StartNr, Amount, BufLen, pBuffer);
unsigned short * wBuffer = (unsigned short *)Buffer;
// Word by word access
Requirements
V5.6 d|e|m|z_field_write V6.0 field_write_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
field_read_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-35
3.1.17 mb_setbit_ex6
The function mb_setbit_ex6 sets a bit memory in the AS to 1 or 0. It is not checked if the memory bit exists in the currently used AS.
int mb_setbit_ex6 (unsigned short MbNr, unsigned short BitNr, unsigned char Value);
Parameters
MbNr
[in] Number of the memory byte
BitNr
[in] Bit number in memory bytes
Value
[in] Value to be set (0/1)
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error message is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
Call examples
unsigned short MbNr = 2; // Memory byte number 2
unsigned short BitNr = 4; // Bit number 4
unsigned char Value = 1; // Value to be set = 1
int RetValue;
RetValue = mb_setbit_ex6 (MbNr, BitNr, Value);
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-36 A5E00388168-01
Requirements
V5.6 mb_setbit, mb_resetbit
V6.0 mb_setbit_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
mb_bittest_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-37
3.1.18 mb_bittest_ex6
The function mb_bittest_ex6 checks a bit in a given memory byte for a given value and returns the state of the given bit into a transfer buffer.
int mb_bittest_ex6 (unsigned short MbNr, unsigned short BitNr, int * pValue);
Parameters
MbNr
[in] Number of the memory byte
BitNr
[in] Bit number in memory bytes
pValue
[out] Pointer on transfer byte with the tested bit value
Value == TRUE Bit set or 1
Value == FALSE Bit not set (or 0)
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error message is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
Call examples
unsigned short MbNr = 2; // Memory byte number 2
unsigned short BitNr = 4; // Bit number 4
int Value; // Transfer byte for the bit value to be tested
int RetValue;
RetValue = mb_bittest_ex6 (MbNr, BitNr, &Value);
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-38 A5E00388168-01
Requirements
V5.6 mb_bittest V6.0 mb_bittest_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
mb_setbit_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-39
3.2 Functions for Data Transfer to S7-200
3.2.1 as200_as_info_ex6
Die Function as200_as_info_ex6 reads the AS software release and the PG interface module, as well as the PLC type of the AS and sets these in ASCII string format in the PG/PC’s transfer buffer.
int as200_as_info_ex6 (unsigned long BufLen, AS200_INFO_TYPE * pBuffer, unsigned long * pDatLen);
Parameters
BufLen
[in] Length of the transfer buffer specified by the user in bytes
pBuffer
[out] Pointer on transfer buffer containing AS information to be delivered.
typedef struct {
unsigned char Firmware[4]; // FW release version
unsigned char ASIC[4]; ASIC release version
char Mlfb[16]; // MLFB of connected AS
} AS200_INFO_TYPE;
pDatLen
[out] Pointer on length of data delivered to the buffer in bytes. In event of error, "Transfer buffer supplied too small for data" is returned and required buffer size given.
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error message is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-40 A5E00388168-01
Call examples
AS200_INFO_TYPE Buffer; // Create transfer buffer
AS200_INFO_TYPE * pBuffer = &Buffer; // Transfer buffer address
unsigned long BufLen = sizeof(Buffer); // Length of transfer buffer
unsigned long DatLen; // Data length
int RetValue;
RetValue = as200_as_info_ex6 (BufLen, pBuffer, &DatLen);
Requirements
V5.6 as200_ag_info V6.0 as200_as_info_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
as200_as_zustand_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-41
3.2.2 as200_as_zustand_ex6
Die Function as200_as_zustand_ex6 reads the AS state (RUN or STOP) from the AS and stores the data in a storage area on the PG/PC.
int as200_as_zustand_ex6 (unsigned char * pState);
Parameters
pState
[out] Transfer buffer with AS states to be delivered (required length 1 byte)
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error message is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
Call examples
unsigned char State; // Transfer byte for the AS state to be delivered
int RetValue;
RetValue = as200_as_zustand_ex6 (&State);
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-42 A5E00388168-01
Current Operating Mode (values in hex)
OM ID Meaning
00 STOP
01 RUN
Requirements
V5.6 as200_ag_zustand V6.0 as200_as_zustand_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
as200_as_info_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-43
3.2.3 as200_field_read_ex6
The function as200_field_read_ex6 reads a number of bytes or words from the AS and transfers them to a PG/PC transfer buffer.
int as200_field_read_ex6 (char FieldType, unsigned short BlkNr, unsigned short StartNr, unsigned long Amount, unsigned long BufLen, unsigned char * pBuffer, unsigned long * pDatLen);
Parameters
FieldType
[in] Value types as ASCII characters: Input byte (e/E), output byte (a/A), memory byte (m/M), special memory byte (s/S), variable storage byte (v/V), timer value (t/T), counter value (z/Z)
BlkNr
[in] Block number (only required for data blocks), default = 0
StartNr
[in] Start number of the first byte or word to be read
Amount
[in] Amount of bytes or words to be read
BufLen
[in] Length of the transfer buffer specified by the user in bytes
pBuffer
[out] Transfer buffer for the read bytes or words
pDatLen
[out] Pointer on length of data delivered to the buffer in bytes. In event of error, "Transfer buffer supplied too small for data" is returned and required buffer size given.
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error message is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-44 A5E00388168-01
Call examples
char FieldType = 0x45 // Value type = input byte (E)
unsigned short blkNr = 0; // Block number = 0
unsigned short StartNr = 2; // First word to be read = 2
int Amount = 6; // Number of words to be read = 6
unsigned char Buffer[MAX_BUFFER]; // Transfer buffer
unsigned char *pBuffer = Buffer; // Transfer buffer address
unsigned long BufLen = sizeof(Buffer); // Length of transfer buffer
unsigned long DatLen; // Data length
int RetValue;
RetValue = as200_field_read_ex6 (FieldType, BlkNr, StartNr, Amount, BufLen, pBuffer, &DatLen);
Requirements
V5.6 as200_e|a|…_field_read V6.0 as200_field_read_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
as200_field_write_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-45
3.2.4 as200_field_write_ex6
The function as200_field_write_ex6 writes a number of bytes or words from a PG/PC transfer buffer into the AS.
int as200_field_write_ex6(char FieldType, unsigned short BlkNr, unsigned short StartNr, unsigned long Amount, unsigned long BufLen, unsigned char * pBuffer);
Parameters
FieldType
[in] Value types as ASCII characters: Input byte (e/E), output byte (a/A), memory byte (m/M), special memory byte (s/S), variable storage byte (v/V), timer value (t/T), counter value (z/Z)
BlkNr
[in] Block number (only required for data blocks), default = 0
StartNr
[in] Start number of the first byte or word to be written.
Amount
[in] Amount of bytes or words to be written
BufLen
[in] Length of the transfer buffer specified by the user in bytes
pBuffer
[out] Pointer on transfer buffer for the bytes or words to be written
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error message is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-46 A5E00388168-01
Call examples
char FieldType = 0x45 // Value type = input byte (E)
unsigned short blkNr = 0; // Block number = 0
unsigned short StartNr = 2; // First word to be written = 2
int Amount = 6; // Number of words to be written = 6
unsigned char Buffer[MAX_BUFFER]; // Transfer buffer
unsigned char *pBuffer = Buffer; // Transfer buffer address
unsigned long BufLen = sizeof(Buffer); // Length of transfer buffer
int RetValue;
RetValue = as200_field_write_ex6 (FieldType, BlkNr, StartNr, Amount, BufLen, pBuffer);
Requirements
V5.6 as200_e|m|…_field_write
V6.0 as200_field_write_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
as200_field_read_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-47
3.2.5 as200_mb_setbit_ex6
The function as200_mb_setbit_ex6 sets a bit memory in the AS at 1 or 0. It is not checked if the memory bit exists in the currently used AS.
int as200_mb_setbit_ex6 (unsigned short MbNr, unsigned short BitNr, unsigned char Value);
Parameter
MbNr
[in] Number of the memory byte
BitNr
[in] Bit number in memory bytes
Value
[in] Value to be set (0/1)
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error message is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
Call examples
unsigned short MbNr = 2; // Memory byte number 2
unsigned short BitNr = 4; // Bit number 4
unsigned char Value = 1; // Value to be set = 1
int RetValue;
RetValue = as200_mb_setbit_ex6 (MbNr, BitNr, Value);
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-48 A5E00388168-01
Requirements
V5.6 as200_mb_setbit, …_resetbit V6.0 as200_mb_setbit_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
as200_mb_bittest_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-49
3.2.6 as200_mb_bittest_ex6
The function as200_mb_bittest_ex6 checks a bit in a given memory byte and returns the state of the given bit into a transfer buffer.
int as200_mb_bittest_ex6 (unsigned short MbNr, unsigned short BitNr, int * pValue);
Parameters
MbNr
[in] Number of the memory byte
BitNr
[in] Bit number in memory bytes
pValue
[out] Pointer on transfer byte with the tested bit value
Value == TRUE Bit set or 1
Value == FALSE Bit is not set (or 0)
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error message is given which can be evaluated in accordance with the error table (see GetErrorMessage_ex6).
Call examples
unsigned short MbNr = 2; // Memory byte number 2
unsigned short BitNr = 4; // Bit number 4
int Value; // Transfer byte for the bit value to be tested
int RetValue;
RetValue = as200_mb_bittest_ex6 (MbNr, BitNr, &Value);
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-50 A5E00388168-01
Requirements
V5.6 as200_mb_bittest V6.0 as200_mb_bittest_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
as200_mb_setbit_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-51
3.3 Convenience Functions
3.3.1 GetErrorMessage_ex6
The function GetErrorMessage_ex6 returns the error text corresponding to an error number as a zero-terminated character string.
int GetErrorMessage_ex6 (int ErrorNr, unsigned long BufLen, unsigned char * pBuffer);
Parameters
ErrorNr
[in] Fehlernummer
BufLen
[in] Length of the transfer buffer specified by the user in bytes
pBuffer
[out] Pointer on transfer buffer with error texts
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise the function returns one of the following values:
File ERROR.DAT is not available or cannot be opened.
1. Error when reading the file ERROR.DAT
2. File ERROR.DAT has the wrong format.
3. No error text available for this error number.
4. Too many error texts in file ERROR.DAT.
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-52 A5E00388168-01
Call examples
int ErrorNr = 0x303; // Block boundary exceeded, correct the number
unsigned char Buffer[MAX_BUFFER]; // Transfer buffer for error text
unsigned long BufLen = sizeof(Buffer); // Buffer length
unsigned char *pBuffer = Buffer; // Transfer buffer address
int RetValue;
RetValue = GetErrorMessage_ex6 (ErrorNr, BufLen, pBuffer);
ERROR.DAT should not contain more than 512 error texts. The error text may not exceed 200 characters.
When transferring the error number 0 the file name in "Buffer" may contain the error text file to be transferred (e.g. an English or German language error text file). If no valid file name is available or a NULL (ZERO) pointer is transferred, the ERROR.DAT file in the current directory will be read. For this reason, it should be ensured that the ERROR.DAT file exists and is placed in the same directory as the program.
The ERROR.DAT file will be read when function GetErrorMessage_ex6 is called for the first time and the text will be stored in a field.
It is recommended to call function GetErrorMessage_ex6 with error_no = 0 shortly after the program begins in order to load the ERROR.DAT file. This ensures that execution times for subsequent calls to the function are more or less constant.
Structure of the error text file
[Error number as ASCII Hex]: [Error text]
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-53
Example for error texts in ERROR.DAT:
00E1: Too many open channels
00E9: sin_serv.exe not started
00CE: Module not found
00CF: Driver not loaded
00CA: No resources available
00F1: No global DOS memory available
0101: Connection not established / assigned parameters
010a: Negative acknowledgement received / timeout error
010c: File does not exist or is blocked
0201: Interface given is incorrect
0202: Maximum number of interfaces exceeded
0203: Toolbox already installed
0204: Toolbox already installed with other connections
0205: Toolbox not installed
0206: Handle cannot be set
0207: Data segment cannot be blocked
0209: Data field erroneous.
0302: Block too small, data word not available
0303: Block boundary exceeded, correct the number
0310: Module not found
0311: Hardware error
...
...
FFFE: unknown error FFFE hex
FFFF Timeout error. Check interface
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-54 A5E00388168-01
Requirements
V5.6 error_message V6.0 GetErrorMessage_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-55
3.3.2 kg_2_float_ex6
The function kg_2_float_ex6 converts an S5 floating point value into a float type value (IEEE format).
int kg_2_float_ex6 (unsigned long kg, float * pieee);
Parameters
kg
[in] S5 floating point value
pieee
[out] Counter on float value
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise 1.
Call examples
unsigned long kg = S5_FLOAT_VALUE;
float ieee;
int RetValue;
RetValue = kg_2_float_ex6 (kg, &ieee); // The IEEE floating point value will be delivered into ieee
Requirements
V5.6 kg_to_float V6.0 kg_2_float_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
float_2_kg_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-56 A5E00388168-01
3.3.3 float_2_kg_ex6
The function float_2_kg_ex6 converts a value of type float (IEEE format) into a S5 floating point value.
int float_2_kg_ex6 (float ieee, unsigned long * pkg);
Parameters
ieee
[in] Float value
pkg
[out] Pointer on S5 floating point value
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise 1.
Call examples
float ieee = FLOAT_VALUE;
unsigned long kg;
int RetValue;
RetValue = float_2_kg_ex6 (ieee, &kg); // The S5 floating point value will be delivered to kg
Requirements
V5.6 float_to_kg V6.0 float_2_kg_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
kg_2_float_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-57
3.3.4 gp_2_float_ex6
The function gp_2_float_ex6 converts an S7 floating point value into a value of type float (IEEE format).
int gp_2_float_ex6 (unsigned long kg, float * pieee);
Parameters
gp
[in] S7 floating point value
pieee
[out] Counter on float value
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise 1.
Call examples
unsigned long gp = S7_FLOAT_VALUE;
float ieee;
gp_2_float_ex6 (gp, &ieee); // The IEEE floating point value will be delivered into ieee
Requirements
V5.6 gp_to_float V6.0 gp_2_float_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
float_2_gp_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-58 A5E00388168-01
3.3.5 float_2_gp_ex6
The function float_2_gp_ex6 converts a value of type float (IEEE format) into a S7 floating point value.
int float_2_gp_ex6 (float ieee, unsigned long * pgp);
Parameters
ieee
[in] Float value
pgp
[out] Pointer on S7 floating point value
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise 1.
Call examples
float ieee = FLOAT_VALUE;
unsigned long gp;
float_2_gp_ex6 (ieee, &gp); // The S7 floating point value will be delivered to gp
Requirements
V5.6 float_to_gp V6.0 float_2_gp_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
gp_2_float_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-59
3.3.6 testbit_ex6
The function testbit_ex6 checks if a given bit is set in a byte variable The byte variable and bit number are transferred to the function by way of parameters.
int testbit_ex6 (char Value, int BitNr);
Parameters
Value
[in] Value of byte variable
BitNr
[in] Bit to be tested in byte variable
Return Values
Return value TRUE: Bit is set (or 1)
Return value FALSE: Bit is not set (or 0)
Call examples
none
Requirements
V5.6 testbit V6.0 testbit_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-60 A5E00388168-01
3.3.7 byte_2_bool_ex6
The function byte_2_bool_ex6 converts a byte into 8 logical values (PC representation).
void byte_2_bool_ex6 (unsigned char Value, int * pBuffer);
Parameters
Value
[in] Byte value
pBuffer
[out] pointer on buffer with 8 converted logical values
Return Values
none
Call examples
The transferred pointer should point to an unsigned char field with the following structure:
Buffer[0] Buffer[1] Buffer[2] Buffer[3] Buffer[4] Buffer[5] Buffer[6] Buffer[7]
bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7
#define SIZE_BOOL_BYTE 8
int Buffer[SIZE_BOOL_BYTE]; // Buffer for 8 logical values
unsigned char Value = 1;
byte_2_bool_ex6 (Value, Buffer); // TRUE will be delivered in Buffer[0], FALSE in BUFFER[1]-[7].
Requirements
V5.6 byte_boolean V6.0 byte_2_bool_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-61
See also:
bool_2_byte_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-62 A5E00388168-01
3.3.8 bool_2_byte_ex6
The function bool_2_byte_ex6 converts 8 logical values (PC representation) into a byte.
unsigned char bool_2_byte_ex6 (int * pBuffer);
Parameter
pBuffer
[in] Pointer on buffer with 8 logical values
Return Values
Converted byte value
Call examples
The transferred pointer should point to an unsigned char field with the following structure:
Buffer[0] Buffer[1] Buffer[2] Buffer[3] Buffer[4] Buffer[5] Buffer[6] Buffer[7]
bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7
#define SIZE_BOOL_BYTE 8
int Buffer[SIZE_BOOL_BYTE] = {0}; // Buffer for 8 logical values
Buffer[0] = TRUE ;
unsigned char RetValue;
RetValue = bool_2_byte_ex6 (Buffer); // RetValue has a value of 1
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-63
Requirements
V5.6 boolean_byte V6.0 bool_2_byte_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
byte_2_bool_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-64 A5E00388168-01
3.3.9 kf_2_integer_ex6, kf_2_long_ex6
The functions swap the high and low byte of a given value.
kf_2_integer_ex6 swaps the high and low bytes of a 16-bit value.
kf_2_long_ex6 swaps the high and low bytes of a 32-bit value.
unsigned short kf_2_integer_ex6 (unsigned short wValue);
unsigned long kf_2_long_ex6 (unsigned long dwValue);
Parameters
wValue
[in] 16-bit values
dwValue
[in] 32-bit values
Return Values
kf_integer delivers a 16-bit value with swapped bytes.
kf_long_ex6 delivers a 32-bit value with swapped bytes.
Call examples
Example: (Double word)
0 1 2 3
…swap…
3 2 1 0
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-65
Requirements
V5.6 kf_integer V6.0 kf_2_integer_ex6, kf_2_long_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
swab_buffer_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-66 A5E00388168-01
3.3.10 swab_buffer_ex6
The function swab_buffer_ex6 swaps the high and low bytes of a given buffer.
void swab_buffer_ex6 (unsigned char * pBuffer, unsigned long Amount);
Parameters
pBuffer
[in/out] Pointer on the buffer in which the bytes are to be swapped
Amount
[in] Number of bytes to be swapped
Return Values
none
Call examples
The standard C function void_swab(char * src, char * dest, int n) will be called internally.
a b …swap… b a
c d d c
x y y x
Requirements
V5.6 swab_buffer V6.0 swab_buffer_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
kf_2_integer_ex6, kf_2_long_ex6, copy_buffer_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-67
3.3.11 copy_buffer_ex6
The function copy_buffer_ex6 copies a number of bytes from one buffer into another.
void copy_buffer_ex6 (unsigned char * pTargetBuffer, unsigned char * pSourceBuffer, unsigned long Amount);
Parameters
pTargetBuffer
[out] Pointer on the buffer in which the bytes are to be copied
pSourceBuffer
[in] Pointer on the buffer from which the bytes are to be fetched.
Amount
[in] Amount of bytes to be copied
Return Values
none
Call examples
The standard C function void *memcpy(char * dest, char * src, size_t count) will be called internally.
Requirements
V5.6 copy_buffer V6.0 copy_buffer_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
swab_buffer_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-68 A5E00388168-01
3.3.12 ushort_2_bcd_ex6, ulong_2_bcd_ex6
The functions are conversion routines that convert a number of binary values into BCD values.
ushort_2_bcd_ex6 converts 16-bit values (words).
ulong_2_bcd_ex6 converts 32-bit values (double words).
void ushort_2_bcd_ex6 (unsigned short * pwValues, unsigned long Amount, int InBytechange, int OutBytechange);
void ulong_2_bcd_ex6 (unsigned long * pdwValues, unsigned long Amount, int InBytechange, int OutBytechange);
Parameters
pwValues
[in] Pointer on 16-bit binary values
pdwValues
[in] Pointer on 32-bit binary values
Amount
[in] Amount of values
InBytechange
[in] TRUE or FALSE
OutBytechange
[in] TRUE or FALSE
Return Values
After calling the function, pwValues points to 16-Bit BCD values, pdwValuese to 32-bit BCD values.
Call examples
The function can be used, for example, to set counters or provide time functions.
If the parameter 'InBytechange' is set (1) then the high and low bytes will be swapped before the conversion to BCD values. If however, the parameter ‘OutBytechange’ is set, the high and low bytes will be swapped after the conversion.
If neither of the ByteChange arguments is set, then no high-low conversion will take place.
The available value range for 16-bit BCD values is +999 to -999.
The available value range for 32-bit BCD values is +9 999 999 to -9 999 999.
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-69
Requirements
V5.6 USHORT_2_bcd V6.0 ushort_2_bcd_ex6, ulong_2_bcd_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
bcd_2_ushort_ex6, bcd_2_ulong_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-70 A5E00388168-01
3.3.13 bcd_2_ushort_ex6, bcd_2_ulong_ex6
The functions are conversion routines that convert a number of BCD values into binary values.
bcd_2_ushort_ex6 converts 16-bit values (words).
bcd_2_ulong converts 32-bit values (double words).
void bcd_2_ushort_ex6 (unsigned short * pwValues, unsigned long Amount, int InBytechange, int OutBytechange);
void bcd_2_ulong_ex6 (unsigned long * pdwValues, unsigned long Amount, int InBytechange, int OutBytechange);
Parameters
pwValues
[in/out] Pointer on 16-bit BCD values
pdwValues
[in/out] Pointer on 32-bit BCD values
Amount
[in] Amount of values
InBytechange
[in] TRUE or FALSE
OutBytechange
[in] TRUE or FALSE
Return Values
After calling the function, pwValues points to 16-bit binary values, pdwValuese to 32-bit binary values.
Call examples
The function can be used, for example, to set counters or provide time functions.
If the parameter 'InBytechange' is set (1) then the high and low bytes will be swapped before the conversion to binary values. If however, the parameter ‘OutBytechange’ is set, the high and low bytes will be swapped after the conversion.
If neither of the ByteChange arguments is set, then no high-low conversion will take place.
The available value range for 16-bit BCD values is +999 to -999.
The available value range for 32-bit BCD values is +9 999 999 to -9 999 999.
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-71
Requirements
V5.6 bcd_2_USHORT V6.0 bcd_2_ushort_ex6, bcd_2_ulong_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
See also:
ushort_2_bcd_ex6, ulong_2_bcd_ex6
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-72 A5E00388168-01
3.3.14 GetLoadedConnections_ex6
Fills an array with 64 Boolean values The user receives information as to which of the 64 connection numbers (ConNr) are already occupied and which connections are already installed.
void GetLoadedConnections_ex6(unsigned long BufLen, int *pBuffer)
Parameters
BufLen
[in] Length of the transfer buffer specified by the user in bytes
pBuffer
[out] Pointer on an array with Boolean values
Return Values
none
Call examples
none
Requirements
V6.0 GetLoadedConnections_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-73
3.4 TeleService Functions
3.4.1 ts_dial_ex6
The function ts_dial_ex6 calls a remote station via modem and creates a connection to the TS adapter.
int ts_dial_ex6 (char * cModemName, char * cStandort, char * cTelNo, char * cUserName, char * cPassword, HANDLE WindowHandle, unsigned int Message, WPARAM wParam, char * Res1);
Parameters
cModemName
[in] Name of modem to be used, configurable in Control Panel / Phone and Modem Options / Dialing Rules.
cStandort
[in] Name of modem location, configurable in Control Panel / Phone and Modem Options / Dialing Rules.
cTelNo
[in] Telephone number to be called by connected modem.
cUserName
[in] The user name is entered here as set up in TS adapter's parameters.
cPassword
[in] The password is given here as set up in TS adapter’s parameters.
WindowHandle
[in] A window handle can be given here.
Message
[in] Message to be sent to window in the event of successful connection or expired timeout.
wParam
[in] Parameters for the message.
Res1
[in] Reserved for future expansions, must currently be preset to NULL (ZERO).
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error message which can be evaluated in accordance with the error table (see GetErrorMessage).
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-74 A5E00388168-01
Note
When function ts_dial_ex6 is called asynchronously, no error number will be generated in the event of error. In this case, inform the user and allow him/her to decide whether the function should be called again or if more detailed error information is required. For detailed information, please use synchronous call.
Call examples
none
Requirements
V5.6 ts_dial V6.0 ts_dial_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-75
3.4.2 ts_hang_up_dial_ex6
The function ts_hang_up_dial_ex6 interrupts the current connection or a currently running asynchronous dial operation.
int ts_hang_up_dial_ex6 (void);
Parameters
none
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error message which can be evaluated in accordance with the error table (see GetErrorMessage).
Call examples
none
Requirements
V5.6 ts_hang_up_dial V6.0 ts_hang_up_dial_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-76 A5E00388168-01
3.4.3 ts_set_ringindicator_ex6
The function ts_set_ringindicator_ex6 initializes the low-frequency system for call acceptance, connection set-up and announcement (ring indication).
int ts_set_ringindicator_ex6 (char * ModemName, char * NumberOfRings, HANDLE WindowHandle, unsigned int Message, WPARAM wParam, char * Res1);
Parameters
ModemName
[in] Name of modem to be used for purpose of ring indication, configurable in Control Panel / Modems.
NumberOfRings
[in] Number of rings until modem picks up.
WindowHandle
[in] A window handle can be given here.
Message
[in] Message to be sent to window in the event of successful connection or expired timeout.
wParam
[in] Parameters for the message.
Res1
[in] Reserved for future expansions, must currently be preset to NULL (ZERO).
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error message which can be evaluated in accordance with the error table (see GetErrorMessage).
Call examples
none
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-77
Requirements
V5.6 ts_set_ringindicator V6.0 ts_set_ringindicator_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-78 A5E00388168-01
3.4.4 ts_read_info_ex6
The function ts_read_about_ex6 delivers information about the alarming station.
int ts_read_info_ex6 (void * IventId, unsigned char * MpiAdr);
Parameters
IventId
[in] Pointer on a 16-byte long field. Information about the alarming station is entered here.
MpiAdr
[in] Pointer on a byte. The MPI address of the alarm-triggering station is entered here.
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error message which can be evaluated in accordance with the error table (see GetErrorMessage).
Call examples
none
Requirements
V5.6 ts_read_info V6.0 ts_read_info_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 A5E00388168-01 3-79
3.4.5 ts_hang_up_ring_ex6
The function ts_hang_up_ring_ex6 interrupts the connection made by the TS-Adapter.
int ts_hang_up_ring_ex6 (void);
Parameters
none
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error message which can be evaluated in accordance with the error table (see GetErrorMessage).
Call examples
none
Requirements
V5.6 ts_hang_up_ring V6.0 ts_hang_up_ring_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
New Functions as of PRODAVE MPI/IE V6.0
PRODAVE MPI/IE V6.0 3-80 A5E00388168-01
3.4.6 ts_get_modem_name_ex6
The function ts_get_modem_name_ex6 delivers the names of all system recognized modems.
int ts_get_modem_name_ex6 (int ModemId, char * Buffer, int * BufferLen);
Parameters
ModemId
[in] Modem ID 0 ... n
Buffer
[out] Pointer on the buffer for modem names
BufferLen
[in/out] Pointer on the length of the buffer; contains the actual length of the string with the modem name after the call.
Notice!
BufferLen must be selected large enough for the expected modem name before the function is called.
Return Values
If there were no errors, the function supplies 0 as the return value, otherwise an error message which can be evaluated in accordance with the error table (see GetErrorMessage).
Call examples
none
Requirements
V5.6 ts_get_modem_name V6.0 ts_get_modem_name_ex6
Windows: 2000, XP
Header: PRODAVE6.H
Library: PRODAVE6.DLL
PRODAVE MPI/IE V6.0 A5E00388168-01 Glossary-1
Glossary
Bit Memory (M)
A memory area in the system memory of a SIMATIC S7 CPU. This area can be accessed using write or read access (bit, byte, word, and double word). The bit memory area can be used by the user to store interim results.
Central Processing Unit (CPU)
The CPU is the central module in the programmable control system in which the user program is stored and processed. It consists of an operating system, processing unit, and communication interfaces.
Data Block (DB)
Data blocks are blocks which contain data and parameters with which the user program works. In contrast to all other types of blocks, they contain no logic instructions.
ERROR SEARCH Mode
This is an operating state of the standby CPU in an H system where the CPU executes a complete self-test. At the same time, the master CPU is in RUN mode.
Function (FC)
According to the International Electrotechnical Commission's IEC 1131-3 standard, functions are logic blocks without static data. A function allows you to pass parameters in the user program, which means they are suitable for programming complex functions that are required frequently, for example, calculations. Note: As there is no memory available, the calculated values must be processed immediately following the FC call.
Function Block (FB)
According to the International Electrotechnical Commission's IEC 1131-3 standard, function blocks are logic blocks that reference an instance data block, meaning they have static data. As function blocks have a 'memory' in the form of the associated instance data block, its parameters (outputs, for example) can be accessed at any time and any point in the user program.
Glossary
PRODAVE MPI/IE V6.0 Glossary-2 A5E00388168-01
HOLD Mode
The HOLD state is reached from the RUN mode via a request from the programming device. Special test functions are possible in this mode.
Logic Block
In SIMATIC S7, a logic block is a block that contains part of the STEP 7 user program. The other type of block is a data block which contains only data. Logic blocks are: Organization blocks (OB), function blocks (FB), functions (FC), system function blocks (SFB) and system functions (SFC).
Multi Point Interface (MPI)
The multipoint interface is the programming device interface in SIMATIC S7/M7. It allows a number of programmable modules, text displays, and operator panels to be accessed from a central point.
The nodes on the MPI can communicate with each other.
Offline
When offline, no data link between the programming device and the programmable logic controller exists.
Online
When online, a data link between the programming device and the programmable logic controller exists.
Organization Block (OB)
Organization blocks form the interface between the S7 CPU operating system and the user program. The sequence in which the user program should be processed is laid down in the organization blocks.
PLC (AS)
A PLC is a programmable logic controller which consists of a central rack, a CPU, and other I/O modules.
Point-to-Point Interface (PPI)
For the Point-to-Point interface, the communication processor is the interface between a programmable logic controller and a communication partner.
Programming Device (PG)
Personal computer in special industry-suitable and compact form. A PG is completely equipped to configure SIMATIC automation systems.
Glossary
PRODAVE MPI/IE V6.0 A5E00388168-01 Glossary-3
RUN Mode
In the RUN state the user program is processed and the process image is updated cyclically. In addition, all digital outputs are enabled.
STARTUP Mode
The CPU goes through the STARTUP state during the transition from the STOP mode to the RUN mode. This mode can be set:
• By using the mode selector
• Following power-on
• By an operation on the programming device.
A distinction is made between the STARTUP types cold restart, warm restart, and hot restart.
STOP Mode
The following events place the CPU in the STOP state:
• Moving the mode selector to the STOP position
• An internal error in the CPU
• An operation on the programming device
All modules are switched to a safe state.
In S7: The user program is not processed in STOP mode. Certain programming functions and operator interface functions are, however, possible.
In M7: User programs can still be processed in STOP mode
System Data Block (SDB)
System data blocks are data areas in the CPU which contain the system settings and module parameters. The system data blocks are generated and modified by the STEP 7 Basic software.
System Function (SFC)
A system function (SFC) is a function integrated in the S7 CPU operating system which can be called like a function in the user program when required.
System Function Block (SFB)
A system function block (SFB) is a function block integrated in the S7 CPU operating system which can be called like a function block in the user program when required.
Glossary
PRODAVE MPI/IE V6.0 Glossary-4 A5E00388168-01
UPDATE Mode
The standby CPU of an H system reaches the UPDATE state when the H system is in the update system mode. The master CPU updates the dynamic data of the standby CPU
PRODAVE MPI/IE V6.0 A5E00388168-01 Index-1
Index
A
as_info_ex6 3-11 as_zustand_ex6 3-13 as200_as_info_ex6 3-39 as200_as_zustand_ex6 3-41 as200_field_read_ex6 3-43 as200_field_write_ex6 3-45 as200_mb_bittest_ex6 3-49 as200_mb_setbit_ex6 3-47 Assigning Parameters to the PG/PC
Interface 2-8 Automation License Manager 2-1
B
bcd_2_ulong _ex6 3-70 bcd_2_ushort_ex6 3-70 bool_2_byte_ex6 3-62 bst_read_diag_ex6 3-21 bst_read_ex6 3-25 bst_read_stat_ex6 3-23 byte_2_bool_ex6 3-60
C
Certificate of License 2-1 Checking the Address assignment 2-8 Checking the Interrupt Assignment 2-9 copy_buffer_ex6 3-67
D
db_buch_ex6 3-15 db_read_ex6 3-17 db_write_ex6 3-19
F
field_read_ex6 3-31 field_write_ex6 3-33 Flash memory file system 2-6 float_2_gp_ex6 3-58 float_2_kg_ex6 3-56
G
GetErrorMessage_ex6 3-51 GetLoadedConnections_ex6 3-72 gp_2_float_ex6 3-57 Guidelines for Handling License Keys 2-4
I
Installation Procedure 2-6 Installation Requirements 2-5 Installing PRODAVE MPI/IE V6.0 2-5
K
kf_2_integer_ex6 3-64 kf_2_long_ex6 3-64 kg_2_float_ex6 3-55
L
License Key 2-4 License types
Floating License 2-3 Single License 2-3 Trial License 2-3 Upgrade License 2-3
License Types Enterprise License 2-1 Upgrade License 2-1
LoadConnection_ex6 3-4
M
mb_bittest_ex6 3-37 mb_setbit_ex6 3-35 MPI card in the PG/PC 2-8 MPI interface 2-5 MPI Interface 2-5 MPI-ISA-Card (Auto) 2-8
P
PG/PC Interface 2-8 Parameter Assignment 2-8
PRODAVE MPI/IE V6.0 Errors during Installation 2-7 Installation 2-5 Uninstalling 2-10
Index
PRODAVE MPI/IE V6.0 Index-2 A5E00388168-01
R
read_diag_buf_ex6 3-29
S
SetActiveConnection_ex6 3-8 SetPassword_ex6 3-9 Setting
PG/PCInterface 2-8 Setup
Enter ID Number 2-6 Setup errors 2-6 swab_buffer_ex6 3-66
T
testbit_ex6 3-59 ts_dial_ex6 3-73 ts_get_modem_name_ex6 3-80 ts_hang_up_dial_ex6 3-75 ts_hang_up_ring_ex6 3-79 ts_read_info_ex6 3-78 ts_set_ringindicator_ex6 3-76
U
ulong_2_bcd_ex6 3-68 Uninstalling
PRODAVE MPI/IE V6.0 2-10 User rights 2-4
UnloadConnection_ex6 3-7 UnSetPassword_ex6 3-10 User Rights Through The Automation
License Manager 2-1 ushort_2_bcd_ex6 3-68