Plc programming – Lenze ETC Motion Control User Manual

Page 371

Advertising
background image

PLC programming

Library

General functions

8

8.8

8.8.1

l

371

EDSTCXN EN 2.0

Format string: The % sign in a format string opens a format definition with
the general form:

% Flag output field lengths Accuracy Data type definition

Flag

<nothing>

flush right, leading spaces / nulls

flush left, following spaces / nulls

+

Always output operational sign

Output field length

0n

min. n digits, fill with nulls

n

min. n digits, fill with spaces

Accuracy

<nothing>

6 digits

.0

do not output a decimal point

.n

output max. n digits after the decimal point

Data type (CoDeSys)

Data type definition (format string)

DWORD

u

DINT

D

REAL

f
e

LREAL

lf
le

STRING

s

The return value of the function is of no consequence.

SPSERROR(304, 4, ’Spindle does not start’, 0);

TYPE PARAMETER_TR

STRUCT

jobno_dw

: DWORD;

text_ps

: POINTER TO STRING;

pos_lr

: LREAL;

END_STRUCT

END_TYPE

param_tr

string_s

param_tr.jobno_dw

param_tr.text_ps

param_tr.pos_lr

SPSERROR(303, 1, ’Auftragsnr%u %s %9.3lf’, ADR(param_tr));

Example 1

Example 2

Advertising