Functions, 1 initialisation (l_rs232open), 3 functions – Lenze Global Drive PLC Developer Studio User Manual

Page 16: Initialisation (l_rs232open), Lenzefpidrv.lib function library, 3functions

Advertising
background image

LenzeFpiDrv.lib function library

Functions

3.1

Initialisation (L_Rs232Open)

3−1

L

LenzeFpiDrv.lib EN 1.1

3

Functions

3.1

Initialisation (L_Rs232Open)

DWORD

L_Rs232Open (wDrvNr, dwBaudrate, byNumberOfDataBits,

byNumberOfStopBits, byParity)

The interface must be initialised with the required transfer parameters using this function before it is
possible to work with the FP interface.

Note!

·

After the initialisation has been completed successfully, the automation interface (AIF) only
works with the FP interface.

·

Other AIF modules (keypad, INTERBUS−S, PROFIBUS−DP, etc.) will only be accepted after
execution of the function L_Rs232Close.

·

If this function is called up again, the interface can be changed over to other transfer
parameters. This however results in a cancellation of all existing send and receipt orders!

L_Rs232Open

wDrvNr
dwBaudrate
byNumberOfDataBits
byNumberOfStopBits
byParity

Fig. 3−1

Initialisation (L_Rs232Open)

Transfer parameter

Identifier

Data type

Possible settings

Info

wDrvNr

Word

30

AIF interface

dwBaudrate

Double Word

600, 1200, 2400, 4800
9600, 19200, 38400

Baud rate

byNumberOfDataBits

Byte

7 or 8

Number of data bits*

byNumberOfStopBits

Byte

1 or 2

Number of stop bits

byParity

Byte

0: None
1: Even
2: Odd

Parity*

* When using 7 data bits, a parity bit will always be created so that the setting No parity"

(byParity = 0) is not admissible!

Advertising