F
3--
08
T
H
M
--n
8C
h.
T
he
rm
oc
ou
ple
In
.
9--11
F3--08THM--n 8-Channel Thermocouple Input
By adding a couple of simple rungs you can easily monitor the temperature for
positive vs. negative readings. (For example, you have to know whether the
temperature is +100
_
F or --100
_
F.) Notice how we’ve changed Channel 2 to control
an output that denotes the sign of the temperature.
374
DSTR3
R011
F53
Read the data
This rung loads the four data bits into the
accumulator from Register 011 on every scan.
DOUT1
R501
F61
114
DOUT
R400
F60
Store channel 1
DOUT
R402
F60
Store channel 2
DOUT
R404
F60
Store channel 3
The channel selection inputs are used to let the
CPU know which channel has been loaded into the
accumulator. By using these inputs to control a
DOUT instruction, you can easily move the data to
a storage register. Notice the DOUT instruction
stores the data in two bytes. (Two bytes are
required for four digit BCD numbers.)
Temporarily store the bits to Register 501.
DSTR1
R001
F51
This rung loads the eight data bits into the
accumulator from Register 001.
DOUT1
R500
F61
Temporarily store the bits to Register 500. Since
the most significant bits were loaded into 501, now
R500 and R501 contain all twelve bits in order.
DSTR
R500
F50
BCD
F86
Now that all the bits are stored, load all twelve bits
into the accumulator.
Math operations are performed in BCD. This
instruction converts the binary data to BCD. (You
can omit this step if your application does not
require the conversion.)
115
116
114
115
116
114
115
116
114
DOUT
R406
F60
Store channel 4
115
116
SET
200
114
115
116
117
If 117 is on, then the temperature on channel 2 is
negative.
RST
200
114
115
116
117
If 117 is off, then the temperature on channel 2 is
positive.
Using the Sign Bit