communication manual

communication manual
TELEDYNE ANALYTICAL INSTRUMENTS
Instruction Manual
INFRARED GAS
ANALYZER
COMMUNICATION
FUNCTIONS (MODBUS)
TYPE: 7500 / 7600
Teledyne Analytical Instruments
CONTENTS
1. COMMUNICATION FUNCTIONS ...............................................…...........................3
1.1 General..............................................................................................................3
2. SPECIFICATIONS..........................................................................................................4
2.1 Communication specifications...........................................................................4
3. CONNECTION................................................................................................................5
3.1 Terminal allocation ..............................................................….........................5
3.2 Connection ...................................................................….................................5
4. SETTING OF COMMUNICATION CONDITION........................................................6
4.1 Set items.........................…................................................................................6
4.2 Setting operation................................................................................................6
5. MODBUS COMMUNICATION PROTOCOL..............................................................7
5.1 General...............................................................................................................7
5.2 Composition of message....................................................................................8
5.3 Response of slave station.................................................................................10
5.4 Function code...................................................................................................11
5.5 Calculation of error check code (CRC-16) ...................…..............................12
5.6 Transmission control procedure.......................................................................14
6. DETAILS OF MESSAGE ............................................................................................16
6.1 Read-out of word data [Function code:03H] ..................................................16
6.2 Read-out of read only word data [Function code:04H]...................................18
6.3 Write-in of word data (1 word) [Function code:06H].................…................20
6.4 Write-in of continuous word data [Function code:10H] ...........…..................21
7. ADDRESS MAP AND DATA FORMAT....................................................................23
7.1 Data format .......................................…..........................................................23
7.2 Address map ................................................…................................................25
7.3 Supplement to address map ............................................................................34
8. SAMPLE PROGRAM ................................................…..............................................36
9. TROUBLESHOOTING.................................................................................................42
2
Teledyne Analytical Instruments
1.
COMMUNICATION FUNCTIONS
1.1
General
• This instrument provides a communication function through RS-232 interface, which
allows data transmit to or receive from the host computer and other devices.
• The communication system is comprised of a master station and slave stations. One slave
station (this instrument) can be connected to one master station. It is also possible to adapt
the instrument to the environment of RS-485 interface using RS-232  RS-485
converter. In this case, up to 31 of slave station (present instrument) can be connected per
master station.
• Because the master station can communicate with only one slave station at a time, the
destination can be identified by the "Station No" set for each slave station.
• In order that the master station and the slave station can communicate, the format of the
transmit/receive data must coincide. In this instrument, the format of the communication data
is determined by the MODBUS protocol.
[RS-232  RS-485 converter] (recommended article)
Type: KS-485 (non-isolated type) / SYSTEM SACOM Corp.
Type: SI-30A (isolated type) / SEKISUI ELECTRONICS Co., Ltd.
3
Teledyne Analytical Instruments
2.
SPECIFICATIONS
2.1
Communication Specifications
Item
Electrical specification
Transmission system
Synchronizing system
Connection format
Number connectable units
Transmission speed
Data format
Transmission code
Error detection
Isolation
Specifications
Based on EIA RS-232
2-wire, semi-duplicate
Start-stop synchronous system
1:1
1 unit (or 31 if RS-485 interface is used
9600bps
Data length
8 bits
Stop hit
1 bit
Parity
None
X flow control
None
HEX value (MODBUS RTU mode)
CRC-16
No isolation between transmission circuit and others
4
Teledyne Analytical Instruments
3.
CONNECTION
WARNING: For avoiding electric shock and malfunctions, do not turn on power supply until
all wiring has been completed.
3.1 Terminal allocation (Input / Output terminal CN2)
Terminal number
2
3
5
Others
Signal name
Receive data
Transmit data
Signal GND
NC
Pin connection
9-pin D-Sub (male)
3.2
Connection
As connecting cable, use a commercially available RS-232 reverse cable.
Connect the cable to CN2 on the input/output terminal block (on rear for 7500, separate for
7600).
5
Teledyne Analytical Instruments
4.
SETTING OF COMMUNICATION CONDITION
In order that the master station and instrument can correctly communicate, following settings
are required.
• All communication condition settings of the master station are the same as those of
instruments.
• All instruments connected on a line are set to "Station Nos. (STno)" which are different
from each other. (Any "Station No." is not shared by more than one instrument.)
4.1
Set items
The parameters to be set are shown in the following table. Set them by operating the front
panel keys.
Item
Setting range
Remarks
Transmission speed
Data length
Stop bit
Parity setting
Value at
delivery
9600bps
8 bits
1 bit
None
Fixed (cannot be changed)
Fixed (cannot be changed)
Fixed (cannot be changed)
Fixed (cannot be changed)
Station No.
1
Fixed (cannot be changed)
Set the same
communication
condition to the
master station and
all slave stations
Set a different value
to each station.
4.2
Setting operation
Set the station No. on the analyzer maintenance mode display (see the instruction manual).
6
Teledyne Analytical Instruments
5.
MODBUS COMMUNICATION PROTOCOL
5.1
General
The communication system by the MODBUS protocol is that the communication is always
started from the master station and a slave station responds to the received message.
Transmission procedures is as shown below.
1. The master station sends a command message to a slave station.
2. The slave station checks that the station No. in the received message matches with the
own station No. or not.
3. If matched, the slave station executes the command and sends back the response
message.
4. If mismatched, the slave station leaves the command message and wait for the next
command message.
a) In case when the station No. in the received command message matches with the
own slave station No.
b) In a case when the station No. in the received command message mismatches with
the own slave station No.
The master station can individually communicate with any one of slave stations connected on
the same line upon setting the station No. in the command message.
7
Teledyne Analytical Instruments
5.2
Composition of message
Command message and response message consist of 4 fields ; Station No., Function code,
Data and Error check code. And these are sent in this order.
Station No. (1 byte)
Function code (1 byte)
Data (2 to 133 bytes)
Error check code (CRC-16) (2 bytes)
Fig. 5.1 Composition of message
In the following, each field is explained.
(1) Station No.
Station No. is the number specifying a slave station. Only a slave station that corresponds to
a value to which "Station No." is set on the analyzer maintenance mode display executes a
command.
(2) Function code
This is a code to designate the function executed at a slave station. For details, refer to
section 5.4.
(3) Data
Data are the data required for executing function codes. The composition of data varies with
function codes. For details, refer to chapter 6.
A register number is assigned to each data in the analyzer. For reading/writing the data by
communication, designate the register number.
Note that the register number transmitted on message is expressed as its relative address.
The relative address is calculated by the following expression.
* * Relative address * * (The lower 4 digits of the Register number) - 1
For example, when the resister number designated by a function code is 40003,
* * Relative address = (The lower 4 digits of 40003) - 1
= 0002
is used on the message
8
Teledyne Analytical Instruments
(4) Error check code
This is the code to detect message errors (change in bit) in the signal transmission.
On the MODUBUS protocol (RTU mode), CRC-16 (Cycric Redundancy Check) is applied.
For CRC calculation method, refer to section 5.5.
9
Teledyne Analytical Instruments
5.3 Response of slave station
(1) Response for normal command
To a relevant message, the slave station creates and sends back a response message which
corresponds to the command message. The composition of message in this case is the same
as in section 5.2. Contents of the data field depend on the function code. For details, refer to
Chapter 6.
(2) Response for abnormal command
If contents of a command message have an abnormality (for example, non-actual function
code is designated) other than transmission error, the slave station does not execute that
command but creates and sends back a response message at error detection.
The composition of response message at error detection is as shown in Fig. 5-2 The value
used for function code field is function code of command message plus 80H.
Table 5-1 gives error codes.
Station No.
Function code +80n
Error code
Error check (CRC-16)
Fig. 5-2 Response message at error detection
Table 5-1 Error code
Error code
01H
Contents
Illegal function
02H
Illegal function
03H
Illegal function
Description
Non-actual function code is designated. Check
for the function code.
A relative address of a resister number to which
the designated function code can not be used.
Because the designation of number is too much,
the area where resister numbers do not exist is
designated.
(3) No Response
Under any of the following items, the slave station takes no action of the command message
and sends back no response.
A station number transmitted in the command message differs from the station number
specified to the slave station.
An error check code is not matched, or a transmission error (parity error, etc.) is detected.
The time interval between the composition data of the message becomes longer than the time
corresponding to 24 buts. (Refer to section 5.6: Transmission control procedure.)
10
Teledyne Analytical Instruments
5.4 Function code
According to MODBUS protocol, register numbers are assigned by function codes.
Each function code acts on specific register number.
This correspondence is shown in Table 5-2, and the message length by function is shown in
Table 5-3.
Table 5-2 Correspondence between function codes and objective address.
No.
03H
04H
06H
10H
Function code
Function
Object
Read out
Holding
(continuously)
register
Read out
Input register
(continuously)
Write-in
Holding
register
Write-in
Holding
(continuously)
register

No.
4xxxx
3xxxx
4xxxx
4xxxx
Table 5-3: Function code and message length
Function
code
Contents
03H
Read-out of
word data
Read-out of
word data
(read-out
only)
Write-in of
word data
Write-in of
continuous
word data
04H
06H
10H
Number of
designatable
data
60 words
Resister No.
Contents
Read out / Write in
word data
Read out word
data
Read out / Write in
word data
Read out / Write in
word data
[Unit: byte]
Command message
Response message
Minimum Maximum Minimum Maximum
8
8
7
133
15 words
8
8
7
133
1 word
8
8
8
8
60 words
11
137
8
8
11
Teledyne Analytical Instruments
5.5 Calculation of error check code (CRC-16)
CRC-16 is the 2-byte (16-bits) error check code. From the top of the message (station No.) to
the end of the data field are calculated.
The slave station calculates the CRC of the received message, and does not respond if the
calculated CRC is different from the contents of the received CRC code.
The following shows the calculation procedure for CRC-16.
(a) Store FFFFH into 16 bit register (CRC register).
(b) Subject the 1st byte (8 bits) of transmit message and CRC register contents to an
exclusive logical summation (XOR), and store the result into the CRC register.
(c) Shift the CRC register contents 1 bit to the right. Store 0 at MSB.
(d) If LSB before shifting is 0, do nothing.
If LSB before shifting is 1, subject it and A001H to XOR, and store the result into the CRC
register.
(e) Repeat the steps (c) and (d) 8 times (shift by 8 bits).
(f) Execute steps (b) to (e) for the next byte of the transmit message.
Likewise, successively repeat the steps to each byte of the transmit message.
(g) The CRC code that is retained is the value of CRC register that stands when the
processing has ended for latest byte (latest data except error code) of the transmit message.
(h) As error check code of the transmit message, store this CRC value in the order of lower 8
bits and upper 8 bits.
Transmit message (ex.)
01
06H
00H
05H
03H
E8H
99H
Successively calculate data included here to obtain CRC. In this case, CRC = 75
75H
99H.
Attach the error check code to message upon interchanging the upper and lower orders.
Fig. 5-3 shows the flow of the CRC-16 calculation system.
12
Teledyne Analytical Instruments
Explanation of
variables CR:CRC
error check data (2
bytes)
I:Digits of calculation
characters in
command message
J:Check on the
number of times of
CR calculation
Fig. 5-3: Flow of the
CRC-16 calculation
system.
13
Teledyne Analytical Instruments
5.6 Transmission control procedure
(1) Transmission procedure of master station
The master station must proceed to a communication upon conforming to the following
items.
(1-1) Before sending a command message, provide 48 bits time or more vacant status.
(1-2) For sending, the interval between bytes of a command message is below 24 bits time.
(1-3) Within 24 bits time after sending a command message, the receiving status is posted.
(1-4) Provide 48 bits time or more vacant status between the end of response message
reception and beginning of next command message sending [same as in (1-1)].
(1-5) For ensuring the safety, make a confirmation of the response message and make an
arrangement so as to provide 3 times or more retries in case of no response, error occurrence,
etc.
Note) The above definition is for most unfavorable value. For ensuring the safety, it’s
recommended the program of the master to work with safety factors of 2 to 3. Concretely, it
is advised to arrange the program for 9600 bps with 10 ms or more for vacant status (1-1),
and within 1 ms for byte interval (1-2) and changeover from sending to receiving (1-3).
(2) Description
1) Detection of the message frame
The status on the line of the communication system is one of the 2 below.
(a) Vacant status (no data on line)
(b) Communication status (data is existing)
Instruments connected on the line are initially at a receiving status and monitoring the line.
When 24 bits time or more vacant status has appeared on the line, the end of preceding frame
is assumed and, within following 24 bits time, a receiving status is posted. When data
appears on the line, instruments receive it while 24 bits time or more vacant status is detected
again, and the end of that frame is assumed. I.e., data which appeared on the line from the
first 24 bits time or more vacant status to the next 24 bits time or more vacant status is
fetched as one frame.
Therefore, one frame (command message) must be sent upon confirming the following.
(1-1) 48 bits time or more vacant status precedes before the command message sending.
(1-2) Interval between bytes of 1 command message is smaller than 24 bits time.
2) Response of this instrument
After a frame detection (24 bits time or more vacant status), this instrument carries out
processing with that frame as a command message. If the command message is destined to
the own station, a response message is returned. Its processing time is 1 to 30 ms (depends on
contents of command message). After sending a command message, therefore, the master
station must observe the following.
(1-3) Receiving status is posted within 24 bits time after sending a command message.
14
Teledyne Analytical Instruments
Space time of longer than 5ms is needed
(longer than 10ms is recommended)
15
Teledyne Analytical Instruments
6. DETAILS OF MESSAGE
6.1 Read-out of word data [Function code: 03H]
Function
code
O3H
Max word number read-out Relative data
in one message
address
64 words
0000H
Resister No.
Contents
40001 40110
User setting
(1) Message composition
Command message composition (byte)
Station No.
Function code
Read-out start
Upper
No. (relative
Lower
address)
Read-out word
Upper
number
Lower
CRC data
Lower
Upper
} 1 to 64
Response message composition (byte)
Station No.
Function code
Read-out byte number
Content of the first Upper
word data
Lower
Contents of the last
word data
CRC data
Upper
Lower
Lower
Upper
* Arrangement of read-out word data
MSB
Upper byte of contents of the first word data
Lower byte of contents of the first word data
Upper byte of contents of the next word data
Upper byte of contents of the next word data
LSB
Upper byte of contents of the last word data
Upper byte of contents of the last word data
(2) Function explanations
Word data of continuous word numbers from the read-out start No. can be read. Read-out
word data are transmitted from the slave station in the order of upper and lower bytes.
16
Teledyne Analytical Instruments
(3) Message transmission (example)
The following shows an example of reading out from No. 1 station the setting CH2 (2nd
component) range-1 zero and span calibration concentration.
Relative address of CH2 range-1 zero calibration concentration setting: 0004H
Data number: 02H
Command message composition (byte)
Station No.
01H
Function code
03H
Read-out start No.
(relative address)
Read-out word
number
CRC data
Upper
Lower
Upper
Lower
Lower
Upper
Response message composition (byte)
Station No.
01H
Function code
03H
Read-out byte number
04H
Contents of the Upper
00H
first word data
Lower
00H
Contents of the Upper
03H
next word data
Lower
E8H
CRC data
Lower
FAH
Upper
8DH
00H
04H
00H
02H
85H
CAH
* Meaning of read-out data
CH2 range-1 zero calibration concentration setting 00 00H = 0
(contents of first word data)
CH2 range-1 span calibration concentration setting 03 E8H = 1000
(contents of next word data)
Provided decimal point position = 1, measurement unit = 1,
CH2 range-1 zero calibration concentration = 0.0 ppm
CH2 range-1 span calibration concentration =100.0 ppm
*For handling of the decimal point and unit, refer to Section 7.1.
17
Teledyne Analytical Instruments
6.2 Read-out of read only word data [Function code: 04H]
Function
code
04H
Max word number
read-out in one
message
64 words
Relative data
address
Resister No.
Contents
0000H 00BDH
30001 30190
0425H 0447H
31062 31096
Measurement
value and status
Fixed setting
(1) Message composition
Command message composition (byte)
Station No.
Function code
Read-out start
Upper
No. (relative
Lower
address)
Read-out word
Upper
number
Lower
CRC data
Lower
Upper
Response message composition (byte)
Station No.
Function code
Read-out byte number
Content of the first Upper
word data
Lower
Contents of the
Upper
next word data
Lower
Contents of the
next word data
CRC data
Upper
Lower
Lower
Upper
* Arrangement of read-out word data
MSB
Upper byte of contents of the first word data
Lower byte of contents of the first word data
Upper byte of contents of the next word data
Lower byte of contents of the next word data
LSB
Upper byte of contents of the last word data
Lower byte of contents of the last word data
(2) Function explanations
Word data of continuous word numbers from the read-out start No. can be read. Read-out
word data are transmitted from the slave station in the order of upper and lower bytes.
18
Teledyne Analytical Instruments
(3) Message transmission (example)
The following shows an example of reading out from No. 1 station the setting CH5
measurement concentration, decimal point position and measuring unit.
Relative address of CH5 measurement concentration setting: 000CH
Data number: 03H
Command message composition (byte)
Station No.
01H
Function code
04H
Read-out start No.
(relative address)
Read-out word
number
CRC data
Upper
Lower
Upper
Lower
Lower
Upper
Response message composition (byte)
Station No.
01H
Function code
03H
Read-out byte number
04H
Contents of the Upper
00H
first word data
Lower
00H
Contents of the Upper
03H
next word data
Lower
E8H
Contents of the Upper
00H
last word data
Lower
00H
CRC data
Lower
81H
Upper
0DH
00H
0CH
00H
03H
70H
08H
* Meaning of read-out data
First word data contents 04 0DH = 1200
Next word data contents 00 02H = 2 (decimal point position)
Latest word data contents 00 00DH = 0 (vol %)
In the above case, measurement concentration = 12.00 vol%
*For handling of the decimal point and unit, refer to Section 7.1.
19
Teledyne Analytical Instruments
6.3 Read-out of read only word data [Function code: 06H]
Function
code
06H
Max word number
write-in in one
message
1 word
Relative data
address
Resister No.
Contents
0000H 006DH
07D0H 07D1H
40001 40110
42001 42002
User setting
Operation
command
(1) Message composition
Command message composition (byte)
Station No.
Function code
Write-in designate
Upper
No. (relative address)
Lower
Write-in word data
Upper
Lower
CRC data
Lower
Upper
Response message composition (byte)
Station No.
Function code
Write-in designate
Upper
No. (relative address) Lower
Write-in word data
Upper
Lower
CRC data
Lower
Upper
(2) Function explanations
Designated word data is written in write-in designate No. Write-in data are transmitted from
master station in the order of upper and lower bytes.
(3) Message transmission (example)
The following shows an example of transmitting the "ZERO" key command to No. 1 station.
Key operation command Relative address: 07D0H
Command message composition (byte)
Station No.
01H
Function code
06H
Write-in designate
Upper 07H
No. (relative
Lower D0H
address)
Write-in word data Upper 00H
Lower 40H
CRC data
Lower
Upper
}ZERO
key
command
88H
B7H
Response message composition (byte)
Station No.
01H
Function code
06H
Write-in designate Upper 07H
No. (relative
Lower D0H
address
Write-in word data Upper 00H
Lower 40H
CRC data
20
Lower
Upper
88H
B7H
Teledyne Analytical Instruments
6.4 Read-out of read only word data [Function code:10H]
Function
code
10H
Max word number writein in one message
64 word
Relative data
address
0000H 006DH
Resister No.
Kind of data
40001 40110
User setting
(1) Message composition
Command message composition
(byte)
Station No.
Function code
Write-in designate
Upper
No. (relative address)
Lower
Write-in word number
Upper
Lower
Write-in byte number
Response message composition (byte)
Station No.
Function code
Write-in start
No. (relative address)
Write-in word number
}1 to 64
}Write-in
CRC data
word number
First write-in word data
Next write-in word data
Last write-in word data
CRC Data
Upper
Lower
Upper
Lower
Upper
Lower
Lower
Upper
* Arrangement of write-in word data
MSB
Upper byte of contents of the first word data
Lower byte of contents of the first word data
Upper byte of contents of the next word data
Lower byte of contents of the next word data
LSB
Upper byte of contents of the last word data
Lower byte of contents of the last word data
21
Upper
Lower
Upper
Lower
Lower
Upper
Teledyne Analytical Instruments
(2) Function explanations
Word data of continuous word number is written from write-in start address. Write-in word
data are transmitted from master station in the order of upper and lower bytes.
(3) Message transmission (example)
The following shows an example of writing the CH1 (1st component) alarm settings to No. 1
station.
CH1 range-1 high alarm setting = 1388H (= 5000D)
CH1 range-1 low alarm setting = 000AH (= 10D)
CH1 range-2 high alarm setting = 03E8H (= 1000D)
CH1 range-2 low alarm setting = 000AH (= 10D)
CH1 range-1 high alarm setting
Relative address: 0023H
Command message composition (byte)
Station No.
01H
Function code
10H
Write-in word number
Upper
00H
Lower
04H
Write-in byte number
08H
First write-in word data
Next write-in word data
Next write-in word data
Last write-in word data
CRC data
Upper
Lower
Upper
Lower
Upper
Lower
Upper
Lower
Lower
Upper
Data number: 04H
Response message composition (byte)
Station No.
01H
Function code
10H
Write-in start No.
Upper 00H
Lower 23H
Write-in word number Upper 00H
Lower 04H
CRC data
Lower 30H
Upper 00H
13H
88H
00H
0AH
03H
E8H
00H
0AH
E2H
A6H
Since the transmission data can not include a decimal point, data of 500.0 is transmitted as
"5000".
For transmission format of each data, refer to the Address map (Chapter 7).
22
Teledyne Analytical Instruments
7. ADDRESS MAP AND DATA FORMAT
7.1 Data format
7.1.1 Transmission data format
The MODBUS protocol used in this instrument is RTU (Remote Terminal Unit) mode.
Transmitted data is "numeric value" and not ASCII code".
7.1.2 Handling of decimal point position and measurement unit
When transmitted, the calibration concentration setting, alarm's high and low limits and
measurement concentration data have no decimal point nor measurement unit.
Calculate exact values of data upon point positioning as shown below.
(a) Calibration concentration setting (register No. 40001 to 40020)
Alarm setting (register No. 40036 to 40055)
You can know the point position for each CH (channel) and each range, and unit upon
reading in the decimal point position data (register No. 31087 to 31096), and the unit data
(register No. 31067 to 31076).
The decimal point position data has a value of 0, 1, 2 or 3. You can obtain an exact value by
the following calculation.
Case 0: Calibration concentration setting data /1
Case 1: Calibration concentration setting data /10
Case 2: Calibration concentration setting data /100
Case 3: Calibration concentration setting data /1000
The unit data has a value of 0, 1, 2 or 3, that corresponds as follows.
Case 0: vol%
Case 1: ppm
Case 2: mg/m3
Case 3: g/m3
For example, if:
CH1 range-1 span calibration concentration setting (register No. 40002) = 2000,
CH1 range-1 decimal point position (register No. 31087) = 1, and
CH1 range-1 unit (register No. 31067) = 1,
the value is 200.0 ppm.
For writing-in, proceed in the reverse. To obtain 200.0 ppm, write 2000 as calibration
concentration setting.
The decimal point position and unit are unchangeable because fixed to each CH and each
range.
23
Teledyne Analytical Instruments
(b) Measurement concentration (register No. 30001 to 30036)
The decimal point position and measurement unit for each concentration are stored in
registers following that of concentration, and can be known by reading them in.
The meaning of decimal point position data and measurement unit data values are the same as
in (a) above.
For example, if:
CH3 measurement concentration (register No. 30007) = 1270,
CH3 decimal point position (register No. 30008) = 2,
CH3 measurement unit (register No. 30009) = 0,
the value is 12.70 vol%
7.1.3 Handling at measurement data over-range
Even if the measurement data is at over-range, with "— — — —" displayed on the screen,
the concentration that stands then is transmitted as read-out measurement concentration.
24
Teledyne Analytical Instruments
7.2 Address map
For details of functions and settable ranges of different parameters, refer to the instruction
manual for the analyzer.
Word data [read-out/write-in]: Function code [03H, 06H, 10H]
User settings
Relative
address
Register
No.
Data
type
Memory contents
0000H
40001
Word
0001H
40002
Word
0002H
40003
Word
0003H
40004
Word
0004H
40005
Word
0005H
40006
Word
0006H
40007
Word
0007H
40008
Word
0008H
40009
Word
0009H
40010
Word
000AH
40011
Word
000BH
40012
Word
000CH
40013
Word
000DH
40014
Word
000EH
40015
Word
000FH
40016
Word
0010H
40017
Word
0011H
40018
Word
0012H
40019
Word
0013H
40020
Word
CH1 range-1 zero calibration
concentration
CH1 range-1 zero calibration
concentration
CH1 range-2 zero calibration
concentration
CH1 range-2 zero calibration
concentration
CH2 range-1 zero calibration
concentration
CH2 range-1 zero calibration
concentration
CH2 range-2 zero calibration
concentration
CH2 range-2 zero calibration
concentration
CH3 range-1 zero calibration
concentration
CH3 range-1 zero calibration
concentration
CH3 range-2 zero calibration
concentration
CH3 range-2 zero calibration
concentration
CH4 range-1 zero calibration
concentration
CH4 range-1 zero calibration
concentration
CH4 range-2 zero calibration
concentration
CH4 range-2 zero calibration
concentration
CH5 range-1 zero calibration
concentration
CH5 range-1 zero calibration
concentration
CH5 range-2 zero calibration
concentration
CH5 range-2 zero calibration
concentration
25
Read-on /
Write-in
data
0 to 9999
Decimal
point
position
depends
on range
Remarks or
corresponding
parameter
Calibration
value
Relevant
model
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
K
K
K
K
Teledyne Analytical Instruments
Word data [read-out/write-in]: Function code [03H, 06H, 10H]
User settings
Relative
address
Register
No.
Data
type
Memory contents
Read-on / Write-in data
0014H
0015H
0016H
0017H
0018H
0019H
001AH
001BH
001CH
001DH
001EH
001FH
0020H
0021H
0022H
0023H
0024H
0025H
0026H
0027H
0028H
0029H
002AH
002BH
002CH
002DH
002EH
002FH
0030H
0031H
0032H
0033H
0034H
0035H
0036H
40021
40022
40023
40024
40025
40026
40027
40028
40029
40030
40031
40032
40033
40034
40035
40036
40037
40038
40039
40040
40041
40042
40043
40044
40045
40046
40047
40048
40049
40050
40051
40052
40053
40054
40055
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
CH1 auto calibration switch
CH2 auto calibration switch
CH3 auto calibration switch
CH4 auto calibration switch
CH5 auto calibration switch
CH1 zero calibration switch
CH2 zero calibration switch
CH3 zero calibration switch
CH4 zero calibration switch
CH5 zero calibration switch
CH1 calibration range switch
CH2 calibration range switch
CH3 calibration range switch
CH4 calibration range switch
CH5 calibration range switch
CH1 range-1 high alarm setting
CH1 range-1 low alarm setting
CH1 range-2 high alarm setting
CH1 range-2 low alarm setting
CH2 range-1 high alarm setting
CH2 range-1 low alarm setting
CH2 range-2 high alarm setting
CH2 range-2 low alarm setting
CH3 range-1 high alarm setting
CH3 range-1 low alarm setting
CH3 range-2 high alarm setting
CH3 range-2 low alarm setting
CH4 range-1 high alarm setting
CH4 range-1 low alarm setting
CH4 range-2 high alarm setting
CH4 range-2 low alarm setting
CH5 range-1 high alarm setting
CH5 range-1 low alarm setting
CH5 range-2 high alarm setting
CH5 range-2 low alarm setting
0, 1
(0: Dn not calibrate in
auto calibration
1: Calibrate in auto
calibration)
0, 1
(0: Selectable, zero
calibration
1: Zero calibration at
once)
0, 1
(0: Calibrate indicated
range only
1: Calibrate both ranges
at the same time)
0 to 9999
26
Decimal point position
depends on range
Remarks or
corresponding
parameter
Auto calibration
component
About zero
calibration
About calibration
range
Alarm setting
Relevant
model
R/K
R/K
R/K
R/K
K
R/K
R/K
R/K
R/K
K
R/K
R/K
R/K
R/K
K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
K
K
K
K
Teledyne Analytical Instruments
Word data [read-out/write-in]: Function code [03H, 06H, 10H]
User settings
Relative
address
Register
No.
Data
type
Memory contents
Read-on / Write-in
data
0037H
0038H
0039H
003AH
003BH
003CH
003DH
003EH
003FH
0040H
0041H
40056
40057
40058
40059
40060
40061
40062
40063
40064
40065
40066
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
CH1 alarm mode
CH2 alarm mode
CH3 alarm mode
CH4 alarm mode
CH5 alarm mode
CH1 alarm mode
CH2 alarm mode
CH3 alarm mode
CH4 alarm mode
CH5 alarm mode
Alarm hysteresis
0, 1, 2
(0: High limit alarm,
1: Low limit alarm,
2: High or low limit)
0042H
40067
Word
Auto calibration start time (day)
0043H
40068
Word
0044H
40069
Word
Auto calibration start time
(hour)
Auto calibration start time (min)
0045H
0046H
0047H
0048H
40070
40071
40072
40073
Word
Word
Word
Word
Auto calibration cycle
Auto calibration cycle unit
Auto calibration switch
Auto calibration gas flow time
0049H
004AH
004BH
004CH
004DH
004EH
004FH
0050H
0051H
0052H
0053H
0054H
0055H
0056H
0057H
0058H
40074
40075
40076
40077
40078
40079
40080
40081
40082
40083
40084
40085
40086
40087
40088
40089
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
0059H
40090
Word
005AH
40091
Word
005BH
40092
Word
Key lock switch
Remote range switch
Response time 1
Response time 2
Response time 3
Response time 4
Response time 5
Response time 6
Response time 7
Response time 8
Oxygen meter response time
1st order moving average period
2nd order moving average period
3rd order moving average period
4th order moving average period
1st order moving average period
unit
2nd order moving average period
unit
3rd order moving average period
unit
4th order moving average period
unit
Remarks or
corresponding
parameter
Alarm setting
Relevant
model
Setting of auto
calibration
R/K
0, 1, 2
(0: Alarm OFF,
1: Alarm ON)
27
0000H to 0014H (0
to 20% FS)
00H to 06H (Sun to
Sat)
00H to 23H (BCD
code)
00H to 59H (BCD
code)
0,1 (0: h, 1: days)
0,1 (0: OFF, 1: ON)
003CH to 0257H (60
to 599 sec)
0,1 (0: OFF, 1: ON)
0,1 (0: OFF, 1: ON)
0000H to 0063H
(0 to 99 sec) *(a)
0000H to 003bH
(0 to 59 min or 1 to 4
h)
0,1
(0: h, 1: min)
R/K
R/K
R/K
R/K
K
R/K
R/K
R/K
R/K
K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
Key lock
Remote range
Response time
Average period
R/K
R/K
R/K
R/K
R/K
K
K
K
K
K
R/K
R/K
R/K
R/K
K
R/K
R/K
R/K
K
Teledyne Analytical Instruments
Word data [read-out/write-in]: Function code [03H, 06H, 10H]
User settings
Relative
address
Register
No.
Data
type
Memory contents
Read-on / Write-in data
005CH
40093
Word
Hold switch
005DH
40094
Word
Oxygen conversion reference
value
0, 1
(0: OFF, 1: ON)
01H to 13H (1% to
19%)
005EH
40095
Word
Peak alarm switch
005FH
40096
Word
Peak alarm concentration
0060H
40097
Word
Peak alarm count
0061H
40098
Word
Peak alarm hysteresis
0062H
40099
Word
0063H
40100
Word
0064H
40101
Word
0065H
0066H
40102
40103
Word
Word
0067H
0068H
40104
40105
Word
Word
0069H
006AH
006BH
006CH
006DH
40106
40107
40108
40109
40110
Word
Word
Word
Word
Word
Auto zero calibration start
time (day)
Auto zero calibration start
time (hour)
Auto zero calibration start
time (min)
Auto zero calibration cycle
Auto zero calibration cycle
unit
Auto zero calibration switch
Auto zero calibration gas
flow time
CH1 range change setting
CH2 range change setting
CH3 range change setting
CH4 range change setting
CH5 range change setting
0, 1
(0: OFF, 1: ON)
0064H to 03e8H
(100 to 1000 ppm)
0001H to 0063H
(1 to 99 times)
0000H to 0014H
(0 to 20% FS)
00H to 06H (Sun to Sat)
Remarks or
corresponding
parameter
Output hold
Relevant
model
Oxygen
conversion
reference value
Setting of peak
alarm
R/K
R/K
R/K
Setting of auto
zero calibration
00H to 23H ((BCD
code)
00H to 59H ((BCD
code)
R/K
R/K
R/K
R/K
R/K
0,1 (0:h, 1: days)
0,1 (0:OFF, 1: ON)
003CH to 0257H (60 to
599 sec)
0,1 (0: range-1; 1:range2)
R/K
R/K
R/K
Range
changeover
(disabled if
remote range
ON)
R/K
R/K
R/K
R/K
K
Remarks or
corresponding
parameter
Sending a value
simulates keying
Relevant
model
Force to return
to measurement
mode
R/K
Word data [write-in]: Function code [06H]
Operation command
Relative
address
Register
No.
Data
type
Memory contents
Read-on / Write-in data
07D0H
42001
Word
Keying command
07D1H
42002
Word
Display change
01H: MODE
02H: Side,
04H: Up, 08H: Down
10H: ESC, 20H: ENT
40H: ZERO, 80H: SPAN
1: Return to measurement
mode display
28
R/K
Teledyne Analytical Instruments
Word data [read-out only]: Function code [04H]
Measurement value and status
Relative
address
Register
No.
Data
type
Memory contents
Read-on / Write-in
data
0000H
0001H
0002H
0003H
0004H
0005H
0006H
0007H
0008H
0009H
000AH
000BH
000CH
000DH
000EH
000FH
0010H
0011H
0012H
0013H
0014H
0015H
0016H
0017H
0018H
0019H
001AH
001BH
001CH
001DH
001EH
001FH
0020H
0021H
0022H
0023H
30001
30002
30003
30004
30005
30006
30007
30008
30009
30010
30011
30012
30013
30014
30015
30016
30017
30018
30019
30020
30021
30022
30023
30024
30025
30026
30027
30028
30029
30030
30031
30032
30033
30034
30035
30036
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
CH1 concentration
CH1 decimal point position
CH1 measurement unit
CH2 concentration
CH2 decimal point position
CH2 measurement unit
CH3 concentration
CH3 decimal point position
CH3 measurement unit
CH4 concentration
CH4 decimal point position
CH4 measurement unit
CH5 concentration
CH5 decimal point position
CH5 measurement unit
CH6 concentration
CH6 decimal point position
CH6 measurement unit
CH7 concentration
CH7 decimal point position
CH7 measurement unit
CH8 concentration
CH8 decimal point position
CH8 measurement unit
CH9 concentration
CH9 decimal point position
CH9 measurement unit
CH10 concentration
CH10 decimal point position
CH10 measurement unit
CH11 concentration
CH11 decimal point position
CH11 measurement unit
CH12 concentration
CH12 decimal point position
CH12 measurement unit
Concentration: 9999 to 9999
29
(value
corresponding to
indication without
decimal point)
Decimal point
position: 0,1,2,3
(0; concentration/1
1; concentration/10
2;
concentration/100
3;
concentration/1000)
Measurement unit:
0, 1, 2, 3
(0; vol%
1; ppm
3
2; mg/m
3
3; g/m )
Transmit values
under current
measurement
conditions
Remarks or
corresponding
parameter
Relevant
model
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
K
K
K
K
K
K
K
K
K
K
K
K
Teledyne Analytical Instruments
Word data [read-out only]: Function code [04H]
Measurement value and status
Relative
address
Register
No.
Data
type
Memory contents
Read-on / Write-in
data
0024H
30037
Word
Peak count
0 to 100 times / hour
R/K
0025H
0026H
0027H
0028H
0029H
002AH
002BH
002CH
002DH
002EH
002FH
0030H
30038
30039
30040
30041
30042
30043
30044
30045
30046
30047
30048
30049
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
0,1
R/K
R/K
R/K
R/K
K
R/K
R/K
R/K
R/K
K
R/K
R/K
0031H
30050
Word
0032H
30051
Word
0033H
30052
Word
0034H
30053
Word
0035H
30054
Word
0036H
30055
Word
0037H
30056
Word
0038H
30057
Word
0039H
30058
Word
003AH
30059
Word
003BH
30060
Word
CH1 current range
CH2 current range
CH3 current range
CH4 current range
CH5 current range
CH1 high/low limit alarm
CH2 high/low limit alarm
CH3 high/low limit alarm
CH4 high/low limit alarm
CH5 high/low limit alarm
Peak count alarm
Auto (Auto zero) calibration in
progress
CH1 zero calibration in
progress
CH2 zero calibration in
progress
CH3 zero calibration in
progress
CH4 zero calibration in
progress
CH5 zero calibration in
progress
CH1 span calibration in
progress
CH2 span calibration in
progress
CH3 span calibration in
progress
CH4 span calibration in
progress
CH5 span calibration in
progress
Instrument error
003CH
30061
Word
Calibration erro
0,1 (0: No, 1: Yes)
003DH
003EH
003FH
0040H
0041H
30062
30063
30064
30065
30066
Word
Word
Word
Word
Word
Latest error no.
Latest error WEEK
Latest error HOUR
Latest error MIN
Latest error TARGET
-1 to 9 (Error No.1)*(b)
0 to 6 (Sun to Sat)
0 to 23 (hours)
0 to 59 (min)
0 to 4
30
Remarks or
corresponding
parameter
(0: range-1; 1::range2)
0,1,2
(0: No alarm,
1: High limit alarm,
2: Low limit alarm)
0,1 (0: No, 1: Yes)
0,1 (0: No, 1: Yes)
Whether or how
alarm is currently
produced
0,1 (0: No, 1: Yes)
Relevant
model
R/K
R/K
R/K
R/K
K
R/K
R/K
R/K
R/K
K
0,1 (0: No, 1: Yes)
Whether error is
produced
Whether error is
produced
Error log
contents
R/K
R/K
R/K
R/K
R/K
R/K
R/K
Teledyne Analytical Instruments
Word data [read-out only]: Function code [04H]
Measurement value and status
Relative
address
Register
No.
Data
type
Memory contents
Read-on / Write-in
data
0042H
0043H
0044H
0045H
0046H
30067
30068
30069
30070
30071
Word
Word
Word
Word
Word
The previous error No.
The previous error WEEK
The previous error HOUR
The previous error MIN
The previous error TARGET
-1 to 9 (Error No.-1)
0 to 6 (Sun to Sat)
0 to 23 (hours)
0 to 59 (min)
0 to 4
007EH
007FH
0080H
0081H
0082H
0083H
0084H
0085H
0086H
0087H
0088H
0089H
008AH
008BH
008CH
30127
30128
30129
30130
30131
30132
30133
30134
30135
30136
30137
30138
30139
30140
30141
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Oldest error No.
Oldest error WEEK
Oldest error HOUR
Oldest error MIN
Oldest error TARGET
Error 1
Error 2
Error 3
Error 10
CH1 Error 4
CH1 Error 5
CH1 Error 6
CH1 Error 7
CH1 Error 8
CH1 Error 9
-1 to 9 (Error No.-1)
0 to 6 (Sun to Sat)
0 to 23 (hours)
0 to 59 (min)
0 to 4
0,1 (0: No, 1: Yes)
0099H
009AH
009BH
009CH
009DH
009EH
009FH
00A0H
00A1H
00A2H
00A3H
00A4H
30154
30155
30156
30157
30158
30159
30160
30161
30162
30163
30164
30165
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
CH4
CH4
CH4
CH4
CH4
CH4
CH5
CH5
CH5
CH5
CH5
CH5
0,1 (0: No, 1: Yes)
0,1 (0: No, 1: Yes)
Error 4
Error 5
Error 6
Error 7
Error 8
Error 9
Error 4
Error 5
Error 6
Error 7
Error 8
Error 9
0,1 (0: No, 1: Yes)
31
Remarks or
corresponding
parameter
Whether error is
currently
produced
Relevant
model
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R
R
R/K
R/K
R/K
K
R/K
R/K
R/K
R/K
K
R/K
R/K
R/K
R/K
R/K
K
K
K
K
K
K
Teledyne Analytical Instruments
Word data [read-out only]: Function code [04H]
Measurement value and status
Relative
address
Register
No.
Data
type
Memory contents
Read-on / Write-in
data
00A5H
30166
Word
0,1 (0: No, 1: Yes)
00A6H
30167
Word
00A7H
30168
Word
CH1 auto zero calibration in
progress
CH1 auto span calibration in
progress
CH1 hold in progress
0,1 (0: No, 1: Yes)
R/K
R/K
00AEH
30175
Word
0,1 (0: No, 1: Yes)
K
00AFH
30176
Word
00B0H
00B1H
30177
30178
Word
Word
00B2H
30179
Word
00B3H
00B4H
00B5H
00B6H
00B7H
00B8H
00B9H
00BAH
00BBH
00BCH
00BDH
30180
30181
30182
30183
30184
30185
30186
30187
30188
30189
30190
Word
Word
Word
Word
CH4 auto zero calibration in
progress
CH4 auto span calibration in
progress
CH4 hold in progress
CH5 auto zero calibration in
progress
CH5 auto span calibration in
progress
CH5 hold in progress
Display information (1)
Display information (2)
Display information (3)
(Do not use)
(Do not use)
(Do not use)
(Do not use)
(Do not use)
Manual calibration channel
(Do not use)
Word
32
Remarks or
corresponding
parameter
Relevant
model
R/K
R/K
R/K
0,1 (0: No, 1: Yes)
0,1 (0: No, 1: Yes)
R/K
K
K
0,1 (0: No, 1: Yes)
* (c)
K
R/K
R/K
R/K
Cursor CH-1 * (d)
R/K
Teledyne Analytical Instruments
Word data [read-out only]: Function code [04H]
Measurement value and status
Relative
address
Register
No.
Data
type
Memory contents
Read-on / Write-in
data
0425H
0426H
0427H
0428H
0429H
042AH
042BH
042CH
042DH
042EH
042FH
0430H
0431H
0432H
0433H
0434H
0435H
0436H
0437H
0438H
0439H
043AH
043BH
043CH
043DH
043EE
043FH
0440H
0441H
0442H
0443H
0444H
0445H
0446H
0447H
31062
31063
31064
31065
31066
31067
31068
31069
31070
31071
31072
31073
31074
31075
31076
31077
31078
31079
31080
31081
31082
31083
31084
31085
31086
31087
31088
31089
31090
31091
31092
31093
31094
31095
31096
Word
Word
Word
CH1 range numbers
CH2 range numbers
CH3 range numbers
CH4 range numbers
CH5 range numbers
CH1 range-1 unit
CH1 range-2 unit
CH2 range-1 unit
CH2 range-2 unit
CH3 range-1 unit
CH3 range-2 unit
CH4 range-1 unit
CH4 range-2 unit
CH5 range-1 unit
CH5 range-2 unit
CH1 range-1 unit
CH1 range-2 unit
CH2 range-1 unit
CH2 range-2 unit
CH3 range-1 unit
CH3 range-2 unit
CH4 range-1 unit
CH4 range-2 unit
CH5 range-1 unit
CH5 range-2 unit
CH1 range-1 decimal point position
CH1 range-2 decimal point position
CH2 range-1 decimal point position
CH2 range-2 decimal point position
CH3 range-1 decimal point position
CH3 range-2 decimal point position
CH4 range-1 decimal point position
CH4 range-2 decimal point position
CH5 range-1 decimal point position
CH5 range-2 decimal point position
1,2
(1: 1 range,
2: 2 ranges)
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Remarks or
corresponding
parameter
0.1,2,3
(0: vol%
1: ppm,
2: mg/m3
3: g/m3)
1 to 9999
0.1,2,3
(0: Nothing below
decimal point,
1:1 digit below
decimal point,
2: 2 digits below
decimal point
3: 3 digits below
decimal point)
Notes
1. Relevant model: R: 7500, K: 7600.
For data for which only K or R is indicated, there is no data for the other
model.
2. For contents of *(a) to *(d), refer to Section 7.3 "Supplements to address
map".
33
Relevant
model
R/K
R/K
R/K
R/K
K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
K
K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
K
K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
R/K
K
K
Teledyne Analytical Instruments
7.3 Supplement to address map
* (a) Register No. 40076 to 40083 (response time 1 to 8)
The following shows signals corresponding to response time 1 to 8.
- 7500
Response time 1
Response time 2
Response time 3
Response time 4
1st component detector signal
2nd component detector signal
3rd component detector signal
Unused
The above does not include sensor signals of oxygen.
- 7600
Response time 1
Response time 2
Response time 3
Response time 4
Response time 5
Response time 6
Response time 7
Response time 8
1st component measurement detector signal
1st component interference compensation detector signal
2nd component measurement detector signal
2nd component interference compensation detector signal
3rd component measurement detector signal
3rd component interference compensation detector signal
4th component measurement detector signal
4th component interference compensation detector signal
The above does not include sensor signals of oxygen.
* (b) Register No. 30062 to 30131 (error log)
Up to 14 errors logged can be read in the order from the latest to older ones.
The contents are as follows.
Error No.: No. of produced error. Stored value is error number minus 1.
Error WEEK: Day when error occurred.
Error HOUR: Indicates at what o'clock error occurred.
Error MIN: Indicates at what minutes error occurred.
Error TARGET: No. of CH where error occurred.
CH No. minus 1 is stored.
0 at error No. 1, 2, 3 or 10.
No. of optical system where error occurred minus 1 if error No. is 1 in
case of 7600.
34
Teledyne Analytical Instruments
* (c) Register numbers 30181, 30182, 30183 (display information (1), (2), (3))
The display information is values for knowing the current display status of the
instrument.
• Contents of values of display information (1) (status of each setting panel)
0: Measurement mode display (manual calibration display included)
1: Menu mode display
2: Changeover of range display
3: Calibration setting display
4: Alarm setting display
5: Automatic calibration setting display
6: Peak alarm setting display
7: Parameter setting display
8: Maintenance mode display
9: Factory mode display
10: Auto zero calibration setting display
• Contents of values of display information (2) (status at manual calibration)
0: Measurement mode display
4: Channel selection display at manual zero calibration
5: Zero calibration wait display at manual zero calibration
6: Zero calibration in progress display at manual zero calibration
7: Channel selection display at manual span calibration
8: Span calibration wait display at manual span calibration
9: Span calibration in progress display at manual span calibration
10: Error contents indication display
• Contents of values of display information (3)
Correspond to value of CH (channel) from which the measurement mode is
displayed.
Top channel number minus 1 is stored.
* (d) Register number 30189 (manual calibration channel)
Data for knowing a channel (component) which the cursor is positioned at to carry
out a calibration at when a manual calibration is under way.
Channel number to carry out a calibration at minus 1 is stored.
35
Teledyne Analytical Instruments
8. SAMPLE PROGRAM
This chapter concerns data read-out/write-in sample program which operates on N88Japanese BASIC (*2) for PC-9801 (*1) or compatible PCs.
Note that the program shown here is for reference for you to create a program and not for
guaranteeing all actions.
Before executing the program, make sure of the communication conditions in the following
procedure.
• Communication speed (baud rate):
Match the conditions with this instrument using SWITCH command and SPEED command
of MS-DOS (*3).
For SWITCH command and SPEED command, refer to the reference manual of MS-DOS.
• Data length, stop bits and parity:
Set in this program. Match the conditions with this instrument.
*1 PC-9801 series are products of NEC Corporation.
*2 N88-Japanese BASIC is a registered trademark of NEC Corporation.
*3 MS-DOS is a registered trade mark of Microsoft Corporation.
36
Teledyne Analytical Instruments
(a) Example of data read-out
Operation:
Read-out CH1 measurement concentration value.
(Continuous word read-out from read-out only area)
Used function code :
04H
Read-out start register No. : 30001
Read-out word number :
3
1000 '------------------------------------------------------1010 ' READ CONTINUOUS WORDS SAMPLE PROGRAM
1020 '------------------------------------------------------1030 '
1040 ' Transmission speed = 9600 bps (selected with SPEED command
and SWITCH command of MS-DOS)
1050 '
1060 CLS
1070 DIM CC(255)
1080 '
1100 '-------------- Send data setting ----------------------1110 CC(1)=&H01 'Station No. = 1
1120 CC(2)=&H04 'Function code = 04H
1130 CC(3)=&H00 'Upper byte of relative address(0000H) of resister
No.30001
1140 CC(4)=&H00 'Lower byte of relative address(0000H) of resister
No.30001
1150 CC(5)=&H00 'Upper byte of read-out word data(0003H)
1160 CC(6)=&H03 'Lower byte of read-out word data(0003H)
1170 COUNT=6
1200 '
1210 '----------- CRC code calculation of send data ---------1220 GOSUB *CRC.CALC
1230 CC(7)=CRC.L 'Lower byte of CRC calculation result °Ê Upper byte
in message
1240 CC(8)=CRC.H 'Upper byte of CRC calculation result °Ê Lower byte
in message
1250 COUNT=COUNT+2
1300 '
1310 '------------- Send data ----------------------------1320 PRINT " Sending data > ";
1330 OPEN "COM1:N81NN" AS #1 ' No parity •••"N81NN""
1340
1350
1360 FOR I=1 TO COUNT
1370 PRINT #1,CHR$(CC(I)); 'Writing in transmission port
1380 PRINT RIGHT$("0"+HEX$(CC(I)),2);" "; 'Displaying on screen
1390 NEXT I
1400 '
1410 FOR I=O TO 12000 :NEXT I ' Interval time
1500 '
37
Teledyne Analytical Instruments
1510
1520
1530
1540
1550
1560
1570
1580
1590
1600
1610
1620
1630
1700
1710
1720
1730
1740
1750
1760
1770
1780
1790
1800
1810
1900
1910
1920
1930
1940
1950
1960
1970
1980
1990
2000
2010
2020
2030
2040
2050
2060
2070
2080
2090
2100
2110
2120
2130
2140
'------------- Data receive ---------------------------PRINT
LENGTH=LOC(1) 'Number of data in receiving buffer
IF LENGTH=0 THEN PRINT "No answer" :END
PRINT " Receiving data < ";
FOR I=1 TO LENGTH
X$=INPUT$(1,#1) 'Taking data from receiving buffer
CC(I)=ASC(X$) 'Digitizing and storing
PRINT RIGHT$("0"+HEX$(CC(I)),2);" "; 'Displaying on screen
NEXT I
CLOSE #1
COUNT=LENGTH-2
GOSUB *CRC.CALC
'
'------------- Transmission error check ----------------------PRINT
CRC.L$=RIGHT$("0"+HEX$(CRC.L),2)
CRC.H$=RIGHT$("0"+HEX$(CRC.H),2)
PRINT "CRC calculation = ";CRC.L$;" ";CRC.H$
IF CC(LENGTH-1)<>CRC.L THEN GOTO *ER.MESSAGE
IF CC(LENGTH)<>CRC.H THEN GOTO *ER.MESSAGE
GOTO *PRT.RESULT
*ER.MESSAGE
PRINT "Communication error"
END
'
'------------- Display of result --------------------------*PRT.RESULT
PRINT
VALUE=HEX$(CC(4))+RIGHT$("0"+HEX$(CC(5)),2) '2byte Å® 1word
DE$=HEX$(CC(6))+RIGHT$("0"+HEX$(CC(7)),2) '2byte Å® 1word
UN$=HEX$(CC(8))+RIGHT$("0"+HEX$(CC(9)),2) '2byte Å® 1word
Select Case Val("&H"+DE$)
Case 0
CONC=Val("&H"+Value$)/1
Case 1
CONC=Val("&H"+Value$)/10
Case 2
CONC=Val("&H"+Value$)/100
Case 3
CONC=Val("&H"+Value$)/1000
End Select
Select Case Val("&H"+UN$)
Case 0
UNIT="vol%"
Case 1
UNIT="ppm%"
38
Teledyne Analytical Instruments
2150 Case 2
2160 UNIT="mg/m3"
2170 Case 3
2180 UNIT="g/m3"
2190 End Select
2200
2210 Print "CH1 measurement concentration =";CONC;UNIT
2220
2230 END
3000 '
3010 '------------ CRC calculation -----------------------------3020 *CRC.CALC ' For contents, refer to CRC calculation flow chart
3030 CR=&HFFFF
3040 FOR I=1 TO COUNT
3050 CR=CR XOR CC(I)
3060 FOR J=1 TO 8
3070 CT=CR AND &H1
3080 IF CR<0 THEN CH=1 ELSE CH=0:GOTO *CRC.CALC.10
3090 CR=CR AND &H7FFF
3100 *CRC.CALC.10
3110 CR=INT(CR/2)
3120 IF CH=1 THEN CR=CR OR &H4000
3130 IF CT=1 THEN CR=CR XOR &HA001
3140 NEXT J
3150 NEXT I
3160 CRC.L=CR AND &HFF ' Lower byte of CRC calculation
3170 CRC.H=((CR AND &HFF00)/256 AND &HFF) ' Upper byte of CRC
calculation
3180 RETURN
39
Teledyne Analytical Instruments
(b) Data write-in example
Operation : Change CH1 measurement range via communication
(Single word write-in)
Used function code :
06H
Write-in register No. :
40106
Write-in data :
1 (changeover from range 1 to range 2)
1000 '------------------------------------------------------1010 ' WRITE 1 WORD SAMPLE PROGRAM
1020 '------------------------------------------------------1030 '
1040 ' Transmission speed = 9600 bps (selected with SPEED command
and SWITCH command of MS-DOS)
1050 '
1060 CLS
1070 DIM CC(255)
1080 '
1100 '-------------- Send data setting ----------------------1110 CC(1)=&H01 ' Station No. = 1
1120 CC(2)=&H06 ' Function code = 06H
1130 CC(3)=&H00 ' Upper byte of relative address(0069H) of resister
No.40106
1140 CC(4)=&H69 ' Lower byte of relative address(0069H) of resister
No.40106
1150 CC(5)=&H00 ' Upper byte of Write-in word data(0001H)
1160 CC(6)=&H01 ' Lower byte of Write-in word data(0001H)
1170 COUNT=6
1200 '
1210 '------------- CRC code calculation of send data -------------1220 GOSUB *CRC.CALC
1230 CC(7)=CRC.L ' Lower byte of CRC calculation result °Ê Upper
byte in message
1240 CC(8)=CRC.H ' Upper byte of CRC calculation result °Ê Lower
byte in message
1250 COUNT=COUNT+2
1300 '
1310 '------------- Send data ----------------------------1320 PRINT "Sending data > ";
1330 OPEN "COM1:N81NN" AS #1 ' No parity •••"N81NN "
1340
1350
1360 FOR I=1 TO COUNT
1370 PRINT #1,CHR$(CC(I)); ' Writing transmission port
1380 PRINT RIGHT$("0"+HEX$(CC(I)),2);" "; ' Displaying on screen
1390 NEXT I
1400 '
1410 FOR I=O TO 12000 :NEXT I ' Interval time
1500 '
40
Teledyne Analytical Instruments
1510 '------------- Data receive ---------------------------1520 PRINT
1530 LENGTH=LOC(1) 'Number of data in receiving buffer
1540 IF LENGTH=0 THEN PRINT "No answer" :END
1550 PRINT "Receiving data < ";
1560 FOR I=1 TO LENGTH
1570 X$=INPUT$(1,#1) 'Taking data from receiving buffer
1580 CC(I)=ASC(X$) 'Digitizing and storing
1590 PRINT RIGHT$("0"+HEX$(CC(I)),2);" "; 'Displaying on screen
1600 NEXT I
1610 CLOSE #1
1620 COUNT=LENGTH-2
1630 GOSUB *CRC.CALC
1700 '
1710 '------------- Transmission error check ----------------------1720 PRINT
1730 CRC.L$=RIGHT$("0"+HEX$(CRC.L),2)
1740 CRC.H$=RIGHT$("0"+HEX$(CRC.H),2)
1750 PRINT "CRC calculation = ";CRC.L$;" ";CRC.H$
1760 IF CC(LENGTH-1)<>CRC.L THEN GOTO *ER.MESSAGE
1770 IF CC(LENGTH)<>CRC.H THEN GOTO *ER.MESSAGE
1780 GOTO *PRT.RESULT
1790 *ER.MESSAGE
1800 PRINT "Communication error"
1810 END
1900 '
1910 '------------- Display of result --------------------------1920 *PRT.RESULT
1930 PRINT
1940 PRINT " Range change ended "
1950 END
3000 '
3010 '------------ CRC calculation -----------------------------3020 *CRC.CALC 'For contents, refer to CRC calculation flow
3030 CR=&HFFFF
3040 FOR I=1 TO COUNT
3050 CR=CR XOR CC(I)
3060 FOR J=1 TO 8
3070 CT=CR AND &H1
3080 IF CR<0 THEN CH=1 ELSE CH=0:GOTO *CRC.CALC.10
3090 CR=CR AND &H7FFF
3100 *CRC.CALC.10
3110 CR=INT(CR/2)
3120 IF CH=1 THEN CR=CR OR &H4000
3130 IF CT=1 THEN CR=CR XOR &HA001
3140 NEXT J
3150 NEXT I
3160 CRC.L=CR AND &HFF 'Lower byte of CRC calculation
3170 CRC.H=((CR AND &HFF00)/256 AND &HFF) 'Upper byte of CRC
calculation
3180 RETURN
41
Teledyne Analytical Instruments
9. TROUBLESHOOTING
If the communication is unavailable, check the following items.
•
Whether all devices related to communication are turned on.
•
Whether connections are correct.
•
Whether the number of connected instruments and connection distance are as
specified
•
Whether communication conditions coincide between the master station (host
computer) and slave stations (instrument)
•
Transmission speed : 9600bps
•
Data length : 8 bits
•
Stop bit : 1 bit
•
Parity : None
•
Whether send/receive signal timing conforms to Section 5.6 in this manual.
•
Whether the station No. designated as send destination by the master station coincides
with the station No. of the connected instrument.
•
Whether more than one instrument connected on the same transmission line shares
the same station No.
•
Whether the station No. of instruments is set at other than 0. If it’s 0, the
communication function does not work.
42
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement