beautypg.com

2 v24 functions, V24 functions, Plc programming – Lenze ETC Motion Control User Manual

Page 377

background image

PLC programming

Library

V24 functions

8

8.8

8.8.2

l

377

EDSTCXN EN 2.0

8.8.2

V24 functions

8.8.2.1

ALLOCV24

FUNCTION AllocV24: DINT

VAR_INPUT

unit_di

: DINT;

(* Interface: COM1 (X3), COM2 (X4) *)

pri_di

: DINT;

(* Priority (−128 ... +127) *)

END_VAR

A V24 interface must be allocated with AllocV24() before it can be used. It can
then be initialised as required with InitV24().

The request is only met if the interface is available or the request priority is
higher than the actual priority. An allocated V24 interface can be released
again with FreeV24(); this restores the previous state prior to the allocation.

Possible interfaces are COM1 (unit_di = 0) and COM2 (unit_di = 1). For the
priority, values between −128 (lowest) and +127 (highest) can be used, with
a priority of 127 meaning that the interface cannot be "appropriated".

The function returns the address of the allocated V24 request structure. If it
returns 0 the interface could not be allocated.

request_p

: DINT;

request_p

: = ALLOCV24(0, 110);

The first V24 interface (X3 connector) is allocated with a priority of 110.

Declaration

Description

Example