UD70
Issue code: 70nu2
7-16
Reference
INT
Syntax 1
result % = INT (float expression)
This function converts a floating-point variable to an integer variable (see
FLOAT
instruction) and rounds-up the result to the next whole number.
Example
a = 14.234
res% = INT(a) / 2 //converts ‘a’ into an integer and divides
//by 2
Result = 7
Note
If the integer value of the float expression exceeds 31 bits
(214783647), the UD70 will trip on
Error 50: Maths Error
.
LIMIT
Syntax 1
result% = LIMIT (expression%, limit_value_expression
%)
result = LIMIT (expression, limit_value_expression)
This mathematical function limits the value returned to the Drive
parameters. This prevents out-of-range values being written to the
parameters. This function applies to both the negative and positive values
of the expression.
Input
Output
Limit
Limit
Example
#1.21 = LIMIT (inc%, 1000)
;if inc% > 1000 then limit to 1000
;if inc% < –1000 then limit to –1000
This limits the output to
±
1000.
See also
MIN
instruction and
MAX
instruction.
Содержание UD70
Страница 6: ......
Страница 14: ...UD70 Issue code 70nu2 2 6 Installation...
Страница 42: ...UD70 Issue code 70nu2 4 20 DPL programming...
Страница 98: ...UD70 Issue code 70nu2 7 22 Reference...
Страница 142: ...UD70 Issue code 70nu2 9 6 Diagnostics...