CRBasic Example 1: Measuring one thermocouple
'Program Example: Measuring a type-T thermocouple
Public
tc1
BeginProg
CPIAddModule
(TEMP120, 16, "TEMP120-16", 1)
Scan
(2000000, usec, 500, 0)
'Measure Type T thermocouple on TEMP 120, CPI address 1
CDM_TCComp
(TEMP120, 1, tc1, 1, 1, TypeT, 1, 0)
NextScan
EndProg
9.5 Data logger connection
TEMP 120 devices communicate with a data logger through a CPI port. Each TEMP 120 ships with
a 6-inch RJ45 cable for this connection, though any CAT5e, or better, RJ45 cable can be used. To
allow daisy-chaining, two CPI ports are available on the TEMP 120. Either CPI port on the TEMP
120 connects directly to the CPI port on a GRANITE 10, GRANITE 9, GRANITE 6, CR6, or CR1000X
data logger.
9.6 Connecting multiple GRANITE
Measurement Modules
The CPI bus, which handles the communications between the data logger and GRANITE
Measurement Modules, can accept addresses 1 to 120. Multiple GRANITE Measurement Modules
may be connected to a single data logger using a daisy-chain or star topology. In both network
configurations, as total cable length increases, the maximum possible bit rate decreases.
Therefore, in networks with long cable lengths, it may be necessary to use the
CPISpeed()
instruction to decrease the CPI network bit rate from its default 250 kbps. Limitations on cable
length and bit rate are discussed further in
(p. 22) and listed in
23).
9.6.1 Daisy-chain topology
In a daisy-chain topology, GRANITE Measurement Modules are connected one after another, as
shown in
TEMP 120
17