Plc programming – Lenze ETC Motion Control User Manual

Page 365

Advertising
background image

PLC programming

Library

General functions

8

8.8

8.8.1

l

365

EDSTCXN EN 2.0

8.8.1.7

IO_SET

FUNCTION IO_SET: BOOL

VAR_INPUT

byte_w

: WORD;

bit_w

: WORD;

END_VAR

The function inverts the state of an output. In the output byte byte_w (value
range 0 ... 31) the bit bit_w (value range 0 ... 7) will be inverted. The return
value of the function is of no consequence.

IO_SET(1,3);

inverts the output Q0.10

8.8.1.8

Load_Param

FUNCTION LOAD_PARAM: DINT

VAR_INPUT

dateiname_s

: STRING(15);

(* "device:filename" *)

pindex_di

: DINT;

(* P field index *)

anzahl_di

: DINT;

(* number of the P field values *)

END_VAR

LOAD_PARAM reads anzahl_di P field values from the RAM disk (device: rd),
the FLASHPROM (device: sd) or a floppy disk (device: fd), which was
previously saved with SAVE_PARAM in the file, and enters the value after the
index pindex_di into the P field.

A return value other than 0 signals an error (

391).

ret_di

: DINT;

ret_di

:= LOAD_PARAM(’rd:daten.dat’, 1200, 30);

30 P field values from the file " daten.dat" are read from the RAM disk and
stored after index 1200 in the P field.

8.8.1.9

READ_PARAM_INT (only ETCxC)

FUNCTION READ_PARAM_INT: INT

VAR_INPUT

IDX_DI

: DINT;

(* Parameter index *)

END_VAR

The function returns the value of the parameter idx_di (as data type INT)
from the P field.

Declaration

Description

Example

Declaration

Description

Example

Declaration

Description

Advertising