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

Page 272

Advertising
background image

Drive PLC Developer Studio

IEC 61131-3 Operators

12-2

l

DDS EN 2.3

Library CheckDiv.lib

The library CheckDiv contains the global variable

g_bErrorCheckDiv

Open the library management with Window

WLibrary Manager.

Insert the library from the library folder. Via the menu command Insert

WAdditional Library,

you can select the library and insert it into the actual project.

Select the library in the library management. On the index card Global Variables, the
variable and additional information are listed.

Note!

The global variable

g_bErrorCheckDiv checks for divisions by zero.

The library function CheckDiv recognizes that the target system has executed a division by zero.

The global variable

g_bErrorCheckDiv is set to TRUE.

The status TRUE is not set back during runtime. If the status = TRUE, at least once a division
by zero has been executed.

Note!

Use of CheckDiv functions.

CheckDiv functions do not allow divisions by zero. The divisor zero is replaced by one.

The following functions are available in CheckDiv.lib.

CheckDivByte

CheckDivDint

CheckDivDWord

CheckDivInt

CheckDivReal

CheckDivSInt

CheckDivUDint

CheckDivUInt

CheckDivUSInt

CheckDivWord

If a DIV operator is used, the value of the divisor can be checked. The respective function must have
exactly the shown syntax. In the case of a division by zero(100/0), the divisor is replaced by one
(100/1). At the same time the variable

g_bErrorCheckdiv is set to TRUE.

Show/Hide Bookmarks

Advertising