Lenze Global Drive PLC Developer Studio User Manual

L
Manual
Global Drive PLC Developer Studio
Global Drive
Function library
LenzeFpiDrv.lib
The function library LenzeFpiDrv.lib can be used for the following Lenze PLCs:
Type from hardware version from software version
9300 Servo PLC EVS93XX−xI 2K 2.0 9300 Servo PLC EVS93XX−xT 2K 2.0 Drive PLC EPL10200 VC 2.0 ECSxA ECSxAxxx 1C 7.0
Important note :
The software is supplied to the user as described in this document. Any risks resulting from its quality or use remain the responsibility of the user. The user must provide all safety measures protecting against possible maloperation.
We do not take any liability for direct or indirect damage, e.g. profit loss, order loss or any loss regarding business.
2001 Lenze GmbH & Co KG No part of this documentation may be copied or made available to third parties without the explicit written approval of Lenze GmbH & Co KG. All information given in this online documentation has been carefully selected and tested for compliance with the hardware and software
described. Nevertheless, discrepancies cannot be ruled out. We do not accept any responsibility or liability for any damage that may occur. Required corrections will be included in updates of this documentation.
Windows, Windows NT and MS−DOS are either registered trademarks or trademarks of Microsoft Corporation in the U.S.A and/or other coun­tries. IBM and VGA are registered trademarks of International Business Machines, Inc. All other brand names are trademarks of the corresponding owners.
Version 1.1 03/2005 − TD02
LenzeFpiDrv.lib function library

Contents

1 Preface and general information 1−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1 About this Manual 1−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.1 Conventions used in this Manual 1−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.2 Structure of function descriptions 1−2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.3 Pictograms used in this Manual 1−2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.4 Terminology used 1−2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Version identifiers of the function library 1−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 General information about the RS−232C interface 2−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1 Mechanical features 2−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.1 Types of plug−in connectors 2−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.2 Terminal assignment with a FP interface 2−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 Electrical features 2−2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.1 Voltage level 2−2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.2 Baud rate/data transmission rate 2−2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3 Synchronous/asynchronous transmission mode 2−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4 Data flow check (handshake) 2−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.5 Transmission parameters 2−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.6 ASCII character set 2−5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.6.1 Standard 2−5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.6.2 Extended, Latin−1 2−6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.6.3 Meaning of control characters 2−7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3 Functions 3−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1 Initialisation (L_Rs232Open) 3−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 Deactivation (L_Rs232Close) 3−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3 Send data (L_Rs232SendData) 3−4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4 Send status (L_Rs232GetSendState) 3−6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.5 Receive data (L_Rs232ReceiveData) 3−7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.6 Receive status (L_Rs232GetReceiveState) 3−10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
l
LenzeFpiDrv.lib EN 1.1
i
LenzeFpiDrv.lib function library
Preface and general information

1 Preface and general information

1.1 About this Manual

This manual contains information about the function library LenzeFpiDrv.lib for the Drive PLC Developer Studio.
· The function library LenzeFpiDrv.lib contains functions for a freely programmable RS−232C
interface with the 2103 FP interface communication module.
· With the 2103 FP interface communication module the automation interface (AIF) of the
9300 Servo PLC / Drive PLC can be used as freely programmable RS−232C interface for
controlling printers, modems, measuring devices and other components equipped with a serial RS−232C interface.
Tip!
For installation and technical data of the 2103 FP interface communication module please see the Mounting Instructions.
1.1.1 Conventions used in this Manual
This Manual uses the following conventions to distinguish between different types of information:
Variable identifiers
are shown in the explanatory texts in italics:
· Use byEndChar1 ..."
Tip!
for information about the conventions which are used for variables of Lenze system organization units, function blocks and functions can be obtained from the appendix of the DDS online documentation Introduction into IEC1131−3 programming". The conventions ensure universal and uniform labelling and support the readability of PLC programs.
Functions
can be recognized by the names. They always begin with L_":
· The function L_Rs232Open..."
Program listings
are written in Courier", keywords are printed in bold:
· IF (ReturnValue < 0) THEN..."
l
LenzeFpiDrv.lib EN 1.1
1−1
LenzeFpiDrv.lib function library
Preface and general information
1.1.2 Structure of function descriptions
All function descriptions given in this Manual have the same structure:
 
Headline stating the function and the function identifierDeclaration of the function:
· Data type of the feedback value
· Function identifier
· List of transfer parameters
Short description of the function and its most important featuresFunction chart including all corresponding variables (transfer parameters
and feedback value)
Table giving information about the transfer parameters:
· Identifier
· Data type
· Possible settings
· Info
Table giving information about the feedback value:
· Data type of the feedback value
· Possible feedback values and their meaning:
Note
If a function cannot be executed properly, a negative feedback value which is an error number, will be sent.
· Every error number stands for an error reason which is shown under
Meaning".
· If different error numbers (−1, −2, ...) are possible, every error
number is assigned to a certain priority (1, 2, ...) Functions
– The lower the number, the higher the priority,
i. e. 1" stands for highest priority.
– If several error reasons occur at the same time, the error number
with the highest priority will be sent first.
More information about the function
(Notes, tips, application examples, etc.)
1.1.3 Pictograms used in this Manual
Use of pictograms
Warning of material damage
Other notes Tip!
Signal words
Stop! Warns of potential damage to material .
Note!
1.1.4 Terminology used
Term In the following text used for
DDS Drive PLC Developer Studio FB Function block FP interface Lenze 2103 FP interface communication module GDC Global Drive Control (parameter setting program from Lenze) Parameter codes Codes for setting the functionality of a function block SB System block
Consequences if disregarded: Damage of the controller/drive system or its environment
Indicates a tip or note.
.
1−2
LenzeFpiDrv.lib EN 1.1
l
LenzeFpiDrv.lib function library
Preface and general information

1.2 Version identifiers of the function library

The version of the function library can be found under the global constant C_w[Function library name]Version .
Version identifiers as of PLC software version 7.x:
Constant Meaning
C_w[FunctionLibraryName]VersionER External Release 01
C_w[FunctionLibraryName]VersionEL External Level 05
C_w[FunctionLibraryName]VersionIR Internal Release 00
C_w[FunctionLibraryName]VersionBN Build No. 00
The value of this constant is a hexadecimal code.
· In the example, "01050000" stands for version "1.05".
Example value
Version: 01 05 00 00
l
LenzeFpiDrv.lib EN 1.1
1−3
LenzeFpiDrv.lib function library
Preface and general information
1−4
LenzeFpiDrv.lib EN 1.1
l
LenzeFpiDrv.lib function library
General information about the RS−232C interface
2 General information about the RS−232C interface
RS−232C stands for Recommended Standard−232C, which is an American Standard of the EIA (Electronic Industries Association). It describes the serial connection between a DTE (Data Terminal Equipment) and a DCE (Data Communications Equipment) and all the electrical and mechanical features.
· The RS−232C is often also described by the V.24/V.28, which is the international
recommendation of the CCITT (today knows as ITU − International Telecommunication Union). The V.24 specifies the mechanical features and the V.28 the electrical features.
Although the standard RS−232C only describes the connection between a DTE and a DCE, the RS−232C interface has been established as standard for serial data transmission over short distances.
The following chapters inform about the mechanical and electrical features of the RS−232C interface and the serial data transmission.

2.1 Mechanical features

2.1.1 Types of plug−in connectors
In general subminiature−D−plug−in connectors in 9 or 25−pole design are used as interface connectors. They are distinguished as follows:
Master
(e. g. Lenze PLC with FP interface)
9−pole SubD connector (male)
or
25−pole SubD socket (female)
The FP interface requires a connection cable with a 9−pole SubD connector (male).
2.1.2 Terminal assignment with a FP interface
9−pole SubD socket for RS−232C interface
Pin Designation Input/output Explanation
1 not used 2 RxD Input Receive data 3 TxD Output Send data 4 DTR Output no function (logic 0") 5 GND Reference potential 6 DSR Input no function 7 not used 8 not used 9 + 5V max. output current 50 mA
Slave
9−pole SubD socket (female)
l
LenzeFpiDrv.lib EN 1.1
2−1
LenzeFpiDrv.lib function library
General information about the RS−232C interface

2.2 Electrical features

2.2.1 Voltage level
The logical states of the individual bits are sent as voltage states via send or receive cables:
Logical state Voltage level Min. voltage level − sender*
1 −3 ... −15 V −5 V 0 +3 ... +15 V +5 V
The achievable distance between two RS−232C devices depends on the cable and baud rate used. We recommend not to exceed a distance of 15 to 30 meters at a baud rate of 9600 baud.
2.2.2 Baud rate/data transmission rate
The baud rate indicates how many bits are transferred per second. This figure together with the other transmission parameters (number of stop bits/data bits and parity bit) result in the data transmission rate which is usually indicated in characters per second.
Transmissionrate +
Total number of bits transmitted per character
Baud rate
* at permissible ohmic load > 3 kW
Example
Transmissionrate +
1 (start bit) + 8 (data bits) + 1 (parity bit) + 1 (stop bit)
9600
+ 872 characters/s
The following table indicates the data transmission rates possible when using a FP interface for a transmission with 8 data bits, 1 stop bit and even parity.
Baud rate*
(Bit/s)
600 18.33 54 1200 9.17 109 2400 4.58 218 4800 2.29 436 9600 1.15 872
19200 0.573 1745 38400 0.286 3490
* With the FP interface every 250 ms a character can be sent, therefore a baud rate higher than 38400 baud cannot be recommended.
Transmission time per character
(ms)
Data transmission rate
(characters/s)
2−2
LenzeFpiDrv.lib EN 1.1
l
Loading...
+ 18 hidden pages