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

Page 15

Advertising
background image

Drive PLC Developer Studio

Introduction

2-3

l

DDS EN 2.3

Function CheckBounds

Tip!

Definition of a function with the name CheckBounds in your project will automatically check
whether the boundaries have been exceeded on access to an array in your project! (refer example
below).
Also refer the Checkbound library (Checkbound.lib).

The function name is defined and must not be changed.

The following program example to test the CheckBounds function corrects access outside defined
array boundaries.

The function CheckBounds ensures that the value TRUE is not assigned to position A[10], but to
the upper permissible range limit A[7].

Use the function CheckBounds to correct accesses outside array boundaries.

2.2.3.1

Example of a function

Example of a function in IL:

Example of the function call of the function shown on the left:

IL

LD 7
Fct 4,2
ST result

ST

result := Fct(7, 4, 2);

FBD

Show/Hide Bookmarks

Advertising