Example Of Calculation - Hitachi HIDIC EH-150 EH-PT4 Applications Manual

Resistance temperature detective input module
Table of Contents

Advertisement

7.3 Example of Calculation

The program shown below as an example converts the temperature conversion data in WR0 to
BCD 4 digit data in WM6.
In case the temperature is minus, the bit internal output R0 will be turned on.
(1) Because the calculation with sign is that by double words, extend the word temperature
conversion data(WR0) to double word data(stored in DM0).
(2) (3) Calculate by the expression mentioned on previous page. Because the calculation with
decimal point (dividing by 40.96) is not possible, multiply the numerator with 100 (2) and then
divide by 4,096(3).
(4) When the temperature data (result of calculation) is minus, the R0 is turned on.
(5) Turn to an absolute variable (for plus temperature data, use as it is and for minus temperature
data remove the sign to turn it to a plus value.) (Use WM0 because the result of calculation can
be incorporated in a word (less than 16 bits).
(6) WM 4 is converted to BCD 4 digits vaule(WM6).
EXT (DM000,WR0000)
DM000 = DM000 S* 100
DM002 = DM000 S/ 4096
R0
= DM002 S< 0
ABS (WM004,WM002)
BCD (WM006,WM004)
7-4
7. Collection of Temperate Data
(1)
(2)
(3)
(4)
(5)
(6)

Advertisement

Table of Contents
loading

Table of Contents