2 dpv1_read / dpv1_readex function block, Dpv1_read / dpv1_readex function block, Control technology | profibus communication manual – Lenze PROFIBU PC-based Automation User Manual
Page 51

DMS 2.2 EN 07/2011 TD17
L
51
Control technology | PROFIBUS communication manual
Function libraries
SysLibDPV1Hilscher.lib function library
8.4.2
DPV1_Read / DPV1_ReadEx function block
This function block serves to read 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
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_ReadEx 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.