beautypg.com

1 l_aifparmapinit - configuration of code mapping, L_aifparmapinit − configuration of code mapping, Function library lenzeaifparmapdrv.lib – Lenze DDS Global Drive PLC Developer Studio User Manual

Page 12: 1 l_aifparmapinit − configuration of code mapping, Functions

background image

3.1

L_AifParMapInit − configuration of code mapping

Function library LenzeAifParMapDrv.lib

Functions

3−2

L

LenzeAifParMapDrv.lib EN 1.1

3.1

L_AifParMapInit − configuration of code mapping

INT L_AifParMapInit (byIndex, wCode, bySubCode,
wCorrCode, byCorrSubCode)

This function is used to configure the mapping table and the redirection of codes.

·

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

·

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

Code to be redirected

Redirection target

byIndex

wCode

bySubCode

wCorrCode

byCorrSubCode

0

1

11

0

3011

3

2

...

255

Transfer parameters

Identifiers

Data type

Possible settings

Info

byIndex

Byte

0 ... 255

Number of the configuration entry in the mapping table.

Code to be redirected:

wCode

Word

1 ... 7999

Code number

bySubCode

Byte

0 ... 255

Subcode number

Redirection target:

wCorrCode

Word

1 ... 7999

Code number

byCorrSubCode

Byte

0 ... 255

Subcode number

Return value

Data type

Value

Meaning

Integer

0

Entry in the mapping table has been successful.

−20

Error: Transfer parameter wCode is invalid.

−30

Error: Transfer parameter wCorrCode is invalid.

Note!

If the function L_AifParMapInit is called while read or write requests for codes are active an error
may occur!

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

Example

Calling the function in ST:

nReturnInitIndexCode := L_AifParMapInit(byIndex:=1,
wCode:=11,
bySubCode:=0,
wCorrCode:=3011,
byCorrSubCode:=3);