System bus (can) for lenze plc devices, Lenzecandsxdrv.lib function library – Lenze DDS System bus CAN for PLC User Manual

Page 159

Advertising
background image

System bus (CAN) for Lenze PLC devices

LenzeCanDSxDrv.lib function library

11.3

L_CanDSxInitIndexCode − Configuration of index mapping

11−3

L

PLC−Systembus EN 2.0

11.3

L_CanDSxInitIndexCode − Configuration of index mapping

Function

This function is used to configure the mapping table and the redirection of indeces to codes other
than the automatically assigned codes.

·

With every function call one index and the corresponding Lenze code can be entered in the
mapping table.

Declaration

INT

L_CanDSxInitIndexCode (byTabIndex,

wCANIndex, byCANSubIndex,
wLenzeCodeNumber, byLenzeSubCodeNumber);

Transfer parameters

Data type

Information/possible settings

byTabIndex

Byte

0 ... 255

Number of the configuration entry in the mapping table.

Index to be redirected:

wCANIndex

Word

1000

hex

...

8FFF

hex

(4096

dec

...

36863

dec

)

CAN index

byCANSubIndex

Byte

0 ... 255

CAN subindex

Redirection target (Lenze code):

wLenzeCodeNumber

Word

1 ... 7999

Code number

byLenzeSubCode
Number

Byte

0 ... 255

Subcode number

Return value

Data type

Value/meaning

Integer

Status

0 Entry in the mapping table has been successful.

−20 Error: Transfer parameter wCANIndex is invalid.

−30 Error: Transfer parameter wLenzeCodeNumber is invalid.

·

A maximum of 256 entries can be entered in the mapping table:

Code to be redirected

Redirection target

byTabIndex

wCANIndex

byCANSubIndex

wLenzeCodeNumber

byLenzeSubCodeNumber

0

1

4104

2

3200

5

2

...

255

Note!

If the function L_CanDSxInitIndexCode is called while code read or write requests are active an
error may occur!

This is why all actions with code access should be completed before this function is called.

Advertising