EasyManuals Logo
Home>Delta Electronics>Controller>DVP15MC11T

Delta Electronics DVP15MC11T User Manual

Delta Electronics DVP15MC11T
601 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #240 background imageLoading...
Page #240 background image
Chapter 8 Logic Instructions
8_
Real Number to Integer
Real numbers can be converted to integers. And some instructions are shown below.
For the real number-to-integer conversion, there are two cases in which the fractional part is
truncated and rounded up as follows.
Case 1: If the first digital number of the fractional part is less than 5, the fractional part will be
truncated and the integer part will not change.
Case 2: If the first digital number of the fractional part is greater than or equal to 5, the
fractional part will be truncated and the integer part will add by 1.
Input value
Output result
Data type
Output value
Case 1
1.36
SINT
1
USINT
1
-2.4
SINT
-2
USINT
254
Case 2
1.6
SINT
2
USINT
2
-2.6
SINT
-3
USINT
253
Note:
For the Real Number-to-Integer Conversion, there are two cases for the value of a real number.
1. If the number of input digits of a real number exceeds what is allowed, the result will be an
unsure value. Please set a limit in the user program in order to get a correct value.
For example: Then the input value is 123456789 and the number of its digits exceeds the
set limit 7. The digits which go beyond the limit are abnormal. Then the output value is
123456792.
2. If the number of input digits does not exceed the set limit, the result is calculated based on
the conversion rule.
Real Number to Bit string
Real numbers can be converted to bit strings. And some instructions are shown below.
REAL_TO_SINT
EN ENO
Out
In
REAL_TO_USINT
EN ENO
Out
In
LREAL_TO_DINT
EN ENO
Out
In
LREAL_TO_LINT
EN ENO
Out
In
REAL_TO_BYTE
EN ENO
Out
In
REAL_TO_WORD
EN ENO
Out
In
REAL_TO_BYTE
EN ENO
Out
In
REAL_TO_WORD
EN ENO
Out
In
8-169

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Delta Electronics DVP15MC11T and is the answer not in the manual?

Delta Electronics DVP15MC11T Specifications

General IconGeneral
BrandDelta Electronics
ModelDVP15MC11T
CategoryController
LanguageEnglish

Related product manuals