3 dpv1_write / dpv1_writeex function block, Dpv1_write / dpv1_writeex function block, Control technology | profibus communication manual – Lenze PROFIBU PC-based Automation User Manual

Page 52

Advertising
background image

Control technology | PROFIBUS communication manual

Function libraries

SysLibDPV1Hilscher.lib function library

52

L

DMS 2.2 EN 07/2011 TD17

8.4.3

DPV1_Write / DPV1_WriteEx function block

This function block serves to write data.

Inputs (VAR_INPUT)

Outputs (VAR_OUTPUT)

Identifier/data type

Meaning/possible settings

ENABLE

BOOL

The function block is activated in an edge-controlled manner:

• Positive edge (TRUE) = diagnostics information is detected and READY is set to

TRUE.

Device

INT

Index of the Hilscher card to which the order is transferred.

StationAddr

INT

Station address of the slave in PROFIBUS.

Slot

INT

Data slot for identifying the data in the slave.

Index

INT

Data index for identifying the data in the slave.

Len

INT

Length of the data to be read/written in bytes.

• Here, the maximum length of the buffer data buffer is transferred.

buffer

DWORD

The local address of the data (created with ADR()).

Identifier/data type

Meaning/possible settings

READY

BOOL

FALSE: The read request is processed.

TRUE: The read request is completed.

STATE

POINTER TO

V1State

Information on the status of the order

• See

V1State structure ( 50)

Size

INT

Length of the actually read/written data when executed successfully.

Error

ARRAY [0 ... 7]

OF BYTE

Information on errors occurred

• Only contained in DPV1_WriteEx function block.

Byte 1 Hilscher error code

• See documentation of Hilscher PROFIBUS cards "Protocol

Interface Manual Profibus DP" for detailed information.

Byte 2 Error class code

• See PROFIBUS standard for detailed information.

Byte 3 + 4 Index 2 + 3: Slave-specific error information

• See documentation of the slave for detailed information.

Advertising