Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
SYPT PRO User Guide / SYPT PRO User Guide.doc
Скачиваний:
244
Добавлен:
03.03.2016
Размер:
17.32 Mб
Скачать

Cmp - Comparison Block

Compares two integer numbers and returns two boolean outputs representing the relationship between the two input numbers and also returns the higher and lower of the two input values.

Arguments

Val1%, Val2%

The two values to be compared.

Return Values

GT%

This value is set to 1 if Val1% > Val2%.

EQ%

This value is set to 1 if Val1% is equal to Val2%.

MIN%

This value is set to to the smaller of Val1% and Val2%.

MAX%

This value is set to to the larger of Val1% and Val2%.

Target/ Language Restrictions

None.

________________________________________________________________________________

Condparw - Conditional Parameter Write

This function block writes to a given drive parameter when the control input is set.

Arguments

Ctrl%

A value will only be written to a parameter when Ctrl% has the value 1. If Ctrl% is 0, the parameter will not be written.

Param%

The parameter to be written in MMPP form, e.g. 1820 means write to parameter #18.20.

Val%

The value to be written to the parameter.

DPos%

The number of decimal places in Val%, e.g. to write the value 1.23 to a parameter, set Val% to 123 and DPos to 2.

An integer parameter write (#INT) can be performed by setting DPos to -1.

Return Values

Q%

Value

Meaning

0

Operation failed OR Ctrl% was 0.

1

Operation succeeded.

Example

The main purpose of this block is to avoid the use of conditional jumps within a LD or FB diagram. By setting or clearing the Ctrl% input, the user can control whether or not a value is written to a parameter. This is demonstrated in the following LD/ FB diagram. Depending on whether parameter #20.20 has a value greater than 1000, the value 100 or -100 is written to parameter #18.20.

Target/ Language Restrictions

None.

________________________________________________________________________________

ConvertBackwards

This command takes a 32-bit integer value from the input In% and multiplies it by the denominator / numerator. The inverse of this function is ConvertForwards().

Arguments

In%

Input value.

Return Values

Out%

The output value (In% * Denominator/ Numerator).

Target/ Language Restrictions

This operation is only available on SM-Applications and SM-Applications Lite.

See Also (Non-APC Conversion Functions)

  • SetConverterNumerator

  • SetConverterDenominator

  • ConvertForwards

The Advanced Position Controller information given in this help file should only be used as a quick reference guide. For further information please refer to the Advanced Position Controller User Guide which is available via the DPL Editor's Help menu.

________________________________________________________________________________

ConvertForwards

This command takes a 32-bit integer value from the input In% and multiplies it by the numerator / denominator. The inverse of this function is ConvertBackwards().

Arguments

In%

Input value.

Return Values

Out%

The output value (In% * Numerator/ Denominator).

Target/ Language Restrictions

This operation is only available on SM-Applications and SM-Applications Lite.

See Also (Non-APC Conversion Functions)

  • SetConverterNumerator

  • SetConverterDenominator

  • ConvertBackwards

The Advanced Position Controller information given in this help file should only be used as a quick reference guide. For further information please refer to the Advanced Position Controller User Guide which is available via the DPL Editor's Help menu.

________________________________________________________________________________