Function library lenzedrive.lib, Communication – Lenze DDS Function library Drive User Manual

Page 72

Advertising
background image

2.6.5

Write codes (L_ParWrite)

Function library LenzeDrive.lib

Communication

2−62

L

LenzeDrive.lib EN 1.7

Tip!

For converting the code number into the value required for wIndex you can use the function

L_FUNCodeIndexConv (see example).

If you want to write the value to be written in DINT format you can use the FB L_DintToByteArray
to convert the DINT value into the 4−byte array required for abyData (see example).

Parameter values with decimal places

Tip!

The parameters of the Lenze controllers are stored in different formats.

Detailed information about this can be found in the "Table of attributes" in the corresponding drive
controller Manual.

If the code to be written uses a data format with decimal places the number of decimal places has
to be communicated to the function block L_ParWrite via the input byFraction.

The following formats apply:

byFraction (number of decimal places)

Value assigned to FB L_ParWrite

Code value to be written

0

1

1

1

10

1.0

2

100

1.00

3

1000

1.000

4

10000

1.0000

Example:

Transmitting the value "20" for a code in fixed32 data format.

·

Fixed32 is a fixed−point format with 4 decimal places. For data transfer the value therefore has
to be multiplied by 10000:

Data

1...4

+ 20 @ 10000 + 200000 + 00 03 0D 40

hex

·

Select the value "4" at the input byFraction.

·

Enter the value "20,0000" under the code.

Tip!

If the code does not use the fixed−point format the value "255" has to be selected at the input
byFraction.

Detailed information about reading and writing parameters via the system bus (CAN) can be found
in the Manual "System bus (CAN) for PLC devices".

Advertising