Plc programming – Lenze ETC Motion Control User Manual

Page 369

Advertising
background image

PLC programming

Library

General functions

8

8.8

8.8.1

l

369

EDSTCXN EN 2.0

8.8.1.17

SETINPUT_WORD

FUNCTION SETINPUT_WORD: BOOL

VAR_INPUT

WORD_W

: WORD;

(* No. of the data word *)

VAL_W

: WORD;

END_VAR

The function executes a boolean OR operation with the value val_w and the
data word word_w of the input process image and writes the result to the
same data word.

Return value FALSE indicates a wrong transfer parameter.

The function allows the developer to create a test environment (without
hardware).

8.8.1.18

SINGLEBLOCK (only ETCxC)

FUNCTION SINGLEBLOCK: BOOL

VAR_INPUT

Sentence string

: STRING(80);

(* sentence string *)

PARAMETER_P

: DINT

(* Address of a structure *)

END_VAR

This function sends an individual sentence to the NC computer. (The
sentence string must be used as described under SPSERROR.)

SINGLEBLOCK(’G0 X100.2 Y50.73’, 0);

An individual sentence without parameter is sent to the NC computer.

TYPE PARAMETER_TR

STRUCT

pos_X_lr

: LREAL;

pos_Y_di

: DINT;

END_STRUCT

END_TYPE

param_tr:

PARAMETER_TR;

SINGLEBLOCK(>G0 X%f Y%d’, ADR(param_tr));

An individual sentence with parameters is sent to the NC computer.

Declaration

Description

Declaration

Description

Example 1

Example 2

Advertising