Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
160
Добавлен:
11.10.2020
Размер:
2.81 Mб
Скачать

Appendix D: - The CoDeSys Libaries

LIMITALARM

This function block specifies whether the input value is within a set range and which limits it has violated if it has done so.

The input values IN, HIGH and LOW are each of the type INT, while the outputs O, U and IL are of the type BOOL.

If the upper limit HIGH is exceeded by IN, O becomes TRUE, and when IN is below LOW, U becomes TRUE. IL is TRUE if IN lies between LOW and HIGH.

Example in FBD: Result:

10.18 The AnalyzationNew.lib library

This library provides modules for the analysis of expressions. If a composed expression is FALSE, those of its components can be evaluated which are adding to this result. In the SFC-Editor the flag SFCErrorAnalyzationTable uses this function implicitely for the analysis of expressions in transitions.

Example of an expression:

b OR NOT(y < x) OR NOT (NOT d AND e)

The functions:

The following variables are used by all modules:

InputExpr: BOOL, expression to be analysed

DoAnalyze: BOOL, TRUE starts analysis

ExpResult: BOOL, current value of the expression

Different is the output of the result of the analyzation:

AnalyzeExpression returns in a string the components of the expression, which are adding to the total value FALSE. Function AppendErrorString is used for this purpose, separating the particular components in the output string by "|" characters.

OutString: STRING, Result of the analysis, Sequence of the concerned components of the expression (e.g. y < x | d)

AnalyseExpressionTable writes the components of the expression, which are adding to the total value FALSE, to an array. For each component the following information is provided by structure ExpressionResult: name, address, comment, (current)value.

OutTable: ARRAY [0..15] OF ExpressionResult;

10-58

CoDeSys V2.3

Appendix D: - The CoDeSys Libaries

e.g..

AnalyseExpressionCombined combines the functionalities of AnalyzeExpression plus AnalyseExpressionTable

10.19 The CoDeSys System Libraries

Note

It depends on the currently used target system which system libraries are supported and can be used in the program. For respective information please see the document SysLibs_Overview.pdf.

CoDeSys V2.3

10-59

Appendix D: - The CoDeSys Libaries

10-60

CoDeSys V2.3

Соседние файлы в папке 759-333