82
Analog I/O Modules (AD268 / DA264 / TC218)
6. Parameters
PART 3 TC218
6.3 Sample program for setting the parameters
A sample program to set the parameters is shown below.
This is an example to set the input type as the type J thermocouple (type = 1) for each channel.
In this sample program, it is assumed that he TC218 is allocated to XW000 to XW007.
For details of READ and WRITE instructions, refer to the T-series Instruction Set manual.
(Main program)
In this sample program, the rung 1 is activated at the beginning of RUN mode (at the second
scan) automatically. The input type is set to the type J thermocouple for all 8 channels.
When the parameter setting process is completed, the flags R1000 to R1002 are returned to
OFF.
For reading the parameters from the TC218, there is no special procedure. Simply read the
data from the TC218’s buffer memory by using READ instruction.
Step (1):
Writes 0 into the
command
register (H8020).
Step (2):
Writes parameters.
• Gain = 32000
• Offset = 0
• Average = 1
• Type = 1 (type J)
Total 32 words
starting with
Step (3):
Writes 1 into the
command
register (H8020).
Step (4):
Waits until the
response
register (H8021)
comes 1.
Step (5):
Writes 0 into the
command
register (H8020)
to return to initial
state.
(H8020)
(H8000)
(H8020)
(H8021)
(H8020)
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net