Teledyne Analytical Instruments COMMUNICATION FUNCTIONS 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.
Teledyne Analytical Instruments SPECIFICATIONS Communication Specifications Item Specifications Electrical specification Based on EIA RS-232 Transmission system 2-wire, semi-duplicate Synchronizing system Start-stop synchronous system Connection format 1 : 1 Number connectable units 1 unit (or 31 if RS-485 interface is used...
Pin connection Receive data Transmit data Signal GND Others 9-pin D-Sub (male) 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).
Teledyne Analytical Instruments 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.
Teledyne Analytical Instruments MODBUS COMMUNICATION PROTOCOL 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.
Teledyne Analytical Instruments 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)
Page 9
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.
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.
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.
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.
Page 13
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.
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.
Page 15
Teledyne Analytical Instruments Space time of longer than 5ms is needed (longer than 10ms is recommended)
Teledyne Analytical Instruments 6. DETAILS OF MESSAGE 6.1 Read-out of word data [Function code: 03 Function Max word number read-out Relative data Resister No. Contents code in one message address 64 words 0000 40001 40110 User setting (1) Message composition...
Page 17
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: 0004...
Teledyne Analytical Instruments 6.2 Read-out of read only word data [Function code: 04 Function Max word number Relative data Resister No. Contents code read-out in one address message 64 words 0000 00BD 30001 30190 Measurement value and status 0425 0447...
Page 19
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: 000C Data number: 03...
Teledyne Analytical Instruments 6.3 Read-out of read only word data [Function code: 06 Function Max word number Relative data Resister No. Contents code write-in in one address message 1 word 0000 006D 40001 40110 User setting 07D0 07D1 42001 42002...
Teledyne Analytical Instruments 6.4 Read-out of read only word data [Function code:10 Function Max word number write- Relative data Resister No. Kind of data code in in one message address 64 word 0000 006D 40001 40110 User setting (1) Message composition...
Page 22
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.
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.
Page 24
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.
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 [03 , 06 , 10 User settings Relative Register Data Memory contents...
Page 26
Teledyne Analytical Instruments Word data [read-out/write-in]: Function code [03 , 06 , 10 User settings Relative Register Data Memory contents Read-on / Write-in data Remarks or Relevant address type corresponding model parameter CH1 auto calibration switch 0014 40021 Word 0, 1...
Page 27
Teledyne Analytical Instruments Word data [read-out/write-in]: Function code [03 , 06 , 10 User settings Relative Register Data Memory contents Read-on / Write-in Remarks or Relevant address type data corresponding model parameter CH1 alarm mode 0037 40056 Word 0, 1, 2...
Page 28
Teledyne Analytical Instruments Word data [read-out/write-in]: Function code [03 , 06 , 10 User settings Relative Register Data Memory contents Read-on / Write-in data Remarks or Relevant address type corresponding model parameter Hold switch 005C 40093 Word 0, 1 Output hold...
Page 29
Teledyne Analytical Instruments Word data [read-out only]: Function code [04 Measurement value and status Relative Register Data Memory contents Read-on / Write-in Remarks or Relevant address type data corresponding model parameter CH1 concentration Concentration: - 0000 30001 Word 9999 to 9999...
Page 30
Teledyne Analytical Instruments Word data [read-out only]: Function code [04 Measurement value and status Relative Register Data Memory contents Read-on / Write-in Remarks or Relevant address type data corresponding model parameter Peak count 0 to 100 times / hour 0024...
Page 31
Teledyne Analytical Instruments Word data [read-out only]: Function code [04 Measurement value and status Relative Register Data Memory contents Read-on / Write-in Remarks or Relevant address type data corresponding model parameter The previous error No. 0042 30067 Word -1 to 9 (Error No.-1)
Page 32
Teledyne Analytical Instruments Word data [read-out only]: Function code [04 Measurement value and status Relative Register Data Memory contents Read-on / Write-in Remarks or Relevant address type data corresponding model parameter CH1 auto zero calibration in 00A5 30166 Word 0,1 (0: No, 1: Yes)
Page 33
Word CH5 range-2 decimal point position 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...
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 1st component detector signal...
Page 35
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)
Teledyne Analytical Instruments 8. SAMPLE PROGRAM This chapter concerns data read-out/write-in sample program which operates on N88- Japanese 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.
Page 37
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 : Read-out start register No. : 30001 Read-out word number : 1000 '------------------------------------------------------- 1010 ' READ CONTINUOUS WORDS SAMPLE PROGRAM...
Page 38
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);"...
Page 39
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...
Page 40
Teledyne Analytical Instruments (b) Data write-in example Operation : Change CH1 measurement range via communication (Single word write-in) Used function code : Write-in register No. : 40106 Write-in data : 1 (changeover from range 1 to range 2) 1000 '-------------------------------------------------------...
Page 41
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);"...
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 •...