Plc programming – Lenze ETC Motion Control User Manual

Page 380

Advertising
background image

PLC programming

Library
V24 functions

8

8.8
8.8.2

l

380

EDSTCXN EN 2.0

8.8.2.7

WRITEV24

FUNCTION WriteV24: DINT

VAR_INPUT

req_pr

: DINT;

(* Address of the V24 request structure *)

chr_di

: DINT;

(* character to be written *)

END_VAR

Writing a character into the send buffer. The send buffer is implemented as
FIFO and is read and written a character at a time.

This function always provides an immediate return even if the FIFO is full. In
this case the character will not be written and −1 (EOF) will be returned.
Generally a return value of less than 0 indicates an error (

391).

requestV24_p

: DINT;

zeichen_di

: DINT;

ret_di

: DINT;

zeichen_di

: = 65;

ret_di

: = WRITEV24(requestV24_p, zeichen_di);

8.8.2.8

CLRRXBUFFER

FUNCTION ClrRxBuffer: BOOL

VAR_INPUT

req_pr

: DINT;

(* Address of the V24 request structure *)

END_VAR

This function can be used to delete the reception FIFO completely.

The return value of the function is of no consequence.

requestV24_p

: DINT;

requestV24_p

: = ALLOCV24(1, 127);

CLRRXBUFFER(requestV24_p);

Declaration

Description

Example

Declaration

Description

Example

Advertising