5 write codes (l_parwrite), Write codes (l_parwrite), Function library lenzedrive.lib – Lenze DDS Function library Drive User Manual
Page 69: Communication

Function library LenzeDrive.lib
Communication
2.6.5
Write codes (L_ParWrite)
2−59
L
LenzeDrive.lib EN 1.7
2.6.5
Write codes (L_ParWrite)
This FB is used to write parameters, with Lenze so−called codes. The FB can write both the PLC
codes and codes of other devices via the system bus (CAN).
L_ParWrite
bExecute
wIndex
bySubIndex
abyData
byComChannel
wTargetAddress
wFailNumber
bFail
bBusy
bDone
byFraction
VariableName
DataType
VariableType
Note
wTimeOut
Word
VAR CONSTANT
RETAIN
1 ... 65335
Time−out time in ms is the time for processing the order.
·
Initialized with 1000 ms.
·
This variable can be parameterized by means of a user
code.
bExecute
Bool
VAR_INPUT
FALSE/TRUE transition activates a write request.
wIndex
Word
VAR_INPUT
0 ... 65535
Code index
Conversion formula: Index = 24575 − code number
bySubIndex
Byte
VAR_INPUT
0 ... 255
Subindex (subcode number) of the code
abyData
Byte [0 ... 3]
VAR_INPUT
The four data bytes with the code value to be written.
byFraction
Byte
VAR_INPUT
0 ... 254
Number of decimal places of the code to be written.
255
Code without decimal places
(e.g. hexadecimal code).
byComChannel
Byte
VAR_INPUT
0
Constant:
Writing a PLC code.
C_PLC
10
Constant:
Writing a code in a device connected via the system bus (CAN).
C_SYSTEMBUS_CAN
wTargetAddress
Word
VAR_INPUT
Selecting the parameter data channel of the target device
(only with byComChannel = 10)
1 ... 64
Data transfer via SDO1 of the target device:
wTargetAddress = CAN device address of the target device
65 ... 127
Data transfer via SDO2 of the target device:
wTargetAddress = CAN device address of the target device +
64
bDone
Bool
VAR_OUTPUT
TRUE
Order has been processed (observe bFail ).
bBusy
Bool
VAR_OUTPUT
TRUE
Order is being processed.
bFail
Bool
VAR_OUTPUT
TRUE
Error occurred.