Parker Hannifin S.p.A. - S.B.C. Division HPD N User’s Manual
78
Example 13: reading 4-digit controller
(FILE: E005.HPD)
You wish to change the value of parameter Pr83 using a 4-digit controller. Four digital inputs and four
digital outputs are used for this:
block 12 of X2 = output to select the first digit (least significant) of the controller
block 13 of X2 = output to select the second digit of the controller
block 14 of X2 = output to select the third digit of the controller
block 15 of X2 = output to select the fourth digit of the controller
blocks 12...15 of X3 = inputs to read digits in BCD (block 12 is the least significant bit; the connection
diagram is shown on the following page).
LD
90.1
OUT 80.0
LD 90.2
OUT 80.1
LD 90.3
OUT 80.2
LD 90.4
OUT 80.3
LD 91.1
MUL 80.73.81
LD 91.2
MUL 80.75.81
LD 91.3
MUL 80.76.81
LD 91.4
MUL 80.77.81
LD 99.13
ADD 81.82.82
LD 91.4
ADD 82.72.83
SUB 82.82.82
LD 91.3
OUT 91.4
LD 91.2
OUT 91.3
LD 91.1
OUT 91.2
LDN 91.2
ANDN 91.3
ANDN 91.4
OUT 91.1
END
MUL
90.1
91.4
91.1
80 73 81
913
90.2
91.2
END
90.4
91.1
91.2
91.3
91.4
99.13
91.4
90.3
80.2
80.0
80.1
80.3
MUL
80 75 81
MUL
80 76 81
MUL
80 77 81
ADD
81 82 82
ADD
82 72 83
SUB
82 82 82
91.3
91.4
91.2
91.3
91.1
91.2
Copy bit 0 digit BCD
copy bit 1 digit BCD
copy bit 2 digit BCD
copy bit 3 digit BCD
if first digit
calculate units
if second digit
calculate tens places
if third digit
calculate hundreds
if fourth digit
calculate thousands
sum the digitd calculated in the
auxiliary parameter Pr81
if last digit (most significant)
copy the final value in Pr83
set parameter Pr82 to zero
updates the outputs so as to enable
the reading of the next digit
if the last digit has already been
read, restart the scan of the digits
starting from the units
end of program
Summary of Contents for HPD2N
Page 3: ......
Page 4: ......
Page 121: ...Parker Hannifin S p A S B C Division HPD N User s Manual 118...
Page 125: ......