3 accessing ipc parameters from the plc, 1 the ldm_parameteraccess_fb function block, Industrial pc | parameter setting & configuration – Lenze PC-based Automation Industrial PC User Manual

Page 61

Advertising
background image

2.5 EN - 01/2012

L

61

Industrial PC | Parameter setting & configuration

Programming with the »PLC Designer«

Accessing IPC parameters from the PLC

8.3

Accessing IPC parameters from the PLC

For the parameter access to parameters of the Industrial PC from the PLC an interface to

the PLC is provided by means of the PLCDataManagerAccess library.

8.3.1

The LDM_ParameterAccess_FB function block

With the LDM_ParameterAccess_FB function block the device parameters of the Industrial

PC can be read and written by the PLC.

Inputs

Function library:

PLCDataManagerAccess

LDM_ParameterAccess_FB

BOOL ⎯ bExecute

bDone ⎯ BOOL

LDM_tDIR ⎯ eDirection

bBusy ⎯ BOOL

STRING(255) ⎯ sTopoAddr

bError ⎯ BOOL

WORD ⎯ wCode

dwErrorID ⎯ DWORD

WORD ⎯ wIndex

eDataRType ⎯ LDM_tVT

BYTE ⎯ bySubIndex

sDataR ⎯ STRING (255)

LDM_tVT ⎯ eDataType

byDataR ⎯ BYTE

STRING(255) ⎯ sDataW

wDataR ⎯ WORD

BYTE ⎯ byDataW

dwDataR ⎯ DWORD

WORD ⎯ wDataW
WORD ⎯ dwDataW

Identifier/data type

Information/possible settings

bExecute

BOOL

Rising edge starts the access

eDirection

LDM_tDIR

Access direction

• LDM_READ - read

• LDM_WRITE - write

sTopoAddr

STRING(255)

Topology address

'/' - access to parameters of the Industrial PC

wCode

WORD

Code of the parameter (Lenze)

Then wIndex has to be set to 0

wIndex

WORD

Index of the parameter (CANopen)

Then wCode has to be set to 0

bySubIndex

Byte

Subindex/subcode of the parameter

eDataType

LDM_tVT

Specification of the type of the parameter to be written

Example: LDM_VT_I2 : 2 bytes integer

Example: LDM_VT_I4 : 4 bytes integer

sDataW

STRING(255)

Value to be written (string) - table

[8-1]

byDataW

Byte

Value to be written (1*byte) - table

[8-1]

Advertising