Function library lenze8200drive.lib, Functions/function blocks – Lenze DDS Function library 8200 Drive User Manual

Page 15

Advertising
background image

Function library Lenze8200Drive.lib

Functions/function blocks

3.1

L_8200Parameter − Initialisation of codes

3−3

L

Lenze8200Drive.lib EN 1.0

Concept I: Parameterisation through direct instructions in the FBs

For this, use the FB L_8200Parameter as template and create a new function block in which the
parameter data are selected by direct assignments.

Note!

Please observe that FB changes (e. g. new assignments) require a new compilation and program
download to the PLC.

·

If you want to change the parameters "online" via the Parameter Monitor or keypad, use
concept II ("Parameterisation by means of codes").

Tip!

The FB L_8200Parameter already includes commented assignments for all parameters relevant
for frequency inverter control.

·

The parameters are listed in the table on the next page.

·

The names of the inputs and outputs of the FBs L_8200CtrlWord and L_8200StatusWord
have been adapted to the selected parameters.

·

If you want to use the pre−assignments, simply copy the assignments to the new FB and
remove the comment characters so that the assignments will become effective.

·

Of course, it is also possible to adapt the assignments to your application.

Proceed as follows:

1. Create a new function block.

2. Use the Library Manager and copy the source code of the FB L_8200Parameter to the new

function block.

3. Remove the comment characters around the assignments to accept the pre−assignments or

adapt the assignments to your application.

FUNCTION_BLOCK Parameter82Device1

VAR_OUTPUT

byNoOfParameter :

BYTE;

awCodeNo :

ARRAY [1..45] OF WORD;

abySubCodeNo :

ARRAY [1..45] OF BYTE;

abyFraction :

ARRAY [1..45] OF BYTE;

anValue :

ARRAY [1..45] OF INT;

END_VAR

(* max. frequency *)
awCodeNo[1]:=11; abySubCodeNo[1]:=0; anValue[1]:=5000; abyFraction[1]:=2;

(* acceleration time Tir *)
awCodeNr[2]:=12; abySubCodeNo[2]:=0; anValue[2]:=0010; abyFraction[2]:=2;

(* deceleration time Tif *)
awCodeNo[3]:=13; abySubCodeNr[3]:=0; anValue[3]:=0010; abyFraction[3]:=2;

(* standardization for C0011 => 16384 *)
awCodeNo[4]:=127; abySubCodeNo[4]:=0; anValue[4]:=1; abyFraction[4]:=0;

...

Fig. 3−1

Example: Source code (extract) of a new FB based on the FB L_8200Parameter

Advertising