Drive plc developer studio – Lenze DDS v2.3 User Manual

Page 203

Advertising
background image

Drive PLC Developer Studio

Resources

8-13

l

DDS EN 2.3

Code max./ Int. max. and Code min./ Int. min.

These four input fields are used to define input limits and to scale the code value.

Use the input fields Code max./Code min. to enter the limits the code value will be checked for
when written. If the limits are not adhered to during writing, the code value will be rejected by the
runtime system.

Together with the values entered in Int. max./Int. min., an assignment is made between code value
and scaled variable value used in the program. Scaling uses a line equation whose gradient and zero
point are determined by the specified four factors.

The line equation is:

m

=

int. Max.

− int. Min.

Codest. Max.

− Codest. Min

Variable value

= m(Code value − Code. Max.) + Int. Max.

Example:

The code limits are to be between

±100%

The variable limits are to be between

±16384 (integer)

Calculate the variable value at a set code value of 50% .

m

=

16384

− (− 16384)

100%

− (-100%)

Variable value

= m(50% − 100%) + 16384 = 8192

At a code value of 50% the variable value is 8192. This calculation shows that it is possible to enter
an external code value of 50% while calculating internally with the variable value 8192. Thus the
value was scaled by 50% to 8192.

Scale function

Scale functions can be inserted for POUs as optional subprograms (IEC 61131-3 program). Such
a program can be used to program a complex scaling of a variable with an assigned code. Refer
Type Parameter Manager: “ Scale functions”

(

^ 8-18)

Access

Use the group field Access to define whether the code can be read and written or read only.

Initialization

Use the input field Initialization to enter the code value to be used to initialize the variable by loading
” C0002 = Default setting” . The initialization value (code value) is the scaled value, i. e. the initial value
is scaled by means of the scale factors before it can be used as variable value in the IEC 61131-3
program.

The initial value of the Parameter Manager has priority if a variable was initialized with a value
in both the declaration editor and the Parameter Manager.

Tip!

Initialization is also possible when no code is assigned.

A variable can be initialized with a scaled value that is transferred on launching the PLC program.
The advantage of this is that physical values are used as initial values, for example.

Unit

Use the list field Unit to assign a physical or fictitious unit to the code. Use the button New to define
new application-specific units (e. g. bottles/minute).

Show/Hide Bookmarks

Advertising