1 operating principle - example, Operating principle − example, Function library lenzecandsxdrv.lib – Lenze DDS Global Drive PLC Developer Studio User Manual

Page 10: Introduction, 1 operating principle − example, 2 candsx driver

Advertising
background image

2.2

CanDSx driver

Function library LenzeCanDSxDrv.lib

Introduction

2−2

L

LenzeCanDSxDrv.lib EN 1.2

2.2.1

Operating principle − example

Task

A user has implemented a functionality in his PLC which can be parameterised under user code
C3200/5. Code C3200 is automatically assigned to the index

dec

:

Index = 24575

dec

− code = 24575

dec

− 3200 = 21375

dec

The communication profile requires, however, that the functionality is parameterised under the index
4101

dec

/subindex 2.

Solution

Use the functions of function library LenzeCanDSxDrv.lib to redirect index 4101

dec

/subindex 2

within the PLC to code C3200/5 so that the communication profile need not be changed.

Operating principle

The operating system (as of V6.0) of Lenze PLCs includes a "mapping table" which allows to map
up to 256 codes on codes other than the automatically assigned codes within the PLC.

If a CAN telegram is received and the index is within the valid range, the system checks whether the
index is listed in the mapping table.

·

If the index is listed in the mapping table, the PLC accesses the new code assigned to the
index in the mapping table.



·

If the index is not listed in the mapping table, the PLC accesses the automatically assigned
code which results from the above formula.

‚

SDO telegram

Index number

valid ?

CAN subindex

4101

yes

Index access:

4101/2

Code access:

C3200/5

Mapping table

CAN index

Lenze code

Lenze subcode

2

3200

5

4101

1

20000

0

3200

4

3000

0

SDO telegram

Index number

valid ?

CAN subindex

4101

yes

Index access:

21475/1

Lenze code = 24575 - Index = 24575 - 21475 = 3100
Code access =

C3100/1

Mapping table

CAN index

Lenze code

Lenze subcode

2

3200

5

4101

1

20000

0

3200

4

3000

0



‚

Fig. 2−1

Redirection of indeces to codes

Advertising