background image

(Table 6.2-2) 

Abnormal code 

Contents 

  1 (01H) 

Illegal function (Non-existent function) 

  2 (02H) 

Illegal data address (Non-existent data address) 

  3 (03H) 

Illegal data value (Value out of the setting range) 

17 (11H) 

Illegal setting (Unsettable status) 

18 (12H) 

Illegal setting (During setting mode by key operation, etc) 

(4) Data 

Data depends on the function code. 
A request message from the master is composed of data item, number of data and setting data. 
A response message from the slave is composed of number of bytes, data and abnormal code 
in negative acknowledgement. Effective range of data is –32768 to 32767 (8000H to 7FFFH). 

(5) Error check of ASCII mode 

After calculating LRC (Longitudinal Redundancy Check) from the slave address to the end of data,   
the calculated 8-bit data is converted to two ASCII characters and are appended to the end of 
message. 

How LRC is calculated 

1

  Create a message in RTU mode. 

2

  Add all the values from the slave address to the end of data. This is assumed as X. 

3

  Make a complement for X (bit reverse). This is assumed as X. 

4

  Add a value of 1 to X. This is assumed as X. 

5

  Set X as an LRC to the end of the message. 

6

  Convert the whole message to ASCII characters. 

(6) Message example of ASCII mode 

1

 

Reading (Instrument number 1, SV) 

• A request message from the master 

 

 

 
 (Fig. 

6.2-2) 

The number of data means the data item to be read, and it is fixed as (30H 30H 30H 31H). 

• A response message from the slave in normal status (When SV=100 ) 

 

 

 

 (Fig.6.2-3) 

The number of response bytes means the number of bytes of the data which has been read, and 
it is fixed as (30H 32H). 

• A response message from the slave in abnormal status (When non-existent data item is sent) 

 

 

  

 (Fig. 

6.2-4) 

The function code MSB is set to 1 for the response message in abnormal status (83H). 
The abnormal code (02H: Non-existent data address) is returned as contents of error. 

2

 

Setting (Instrument number 1, SV=100 ) 

• A request message from the master 

 

 

  

 (Fig. 

6.2-5) 

• A response message from the slave in normal status 

 
 

 

 

 (Fig. 

6.2-6) 

 
 

Slave

address

Function

code

Data item

Error check

LRC

Delimiter

Header

(30H 31H)

Number of

data

(3AH)

1

2

2

4

4

2

2

(30H 33H)

(30H 30H 30H 31H)

(30H 30H 30H 31H)

(46H 41H)

(0DH 0AH)

Number of
characters

Slave

address

Function

code

Number of

response bytes

Error check

LRC

Delimiter

Header

Data

1

2

2

2

4

2

2

(3AH)

(30H 31H)

(30H 33H)

(30H 32H)

(30H 30H 36H 34H)

(39H 36H)

(0DH 0AH)

Number of
characters

(0DH 0AH)

Slave

address

Function

code

Abnormal

code

Error check

LRC

Delimiter

Header

1

2

2

2

2

2

Number of
characters

(3AH)

(30H 31H)

(38H 33H)

(30H 32H)

(37H 41H)

Slave

address

Function

code

Data item

Error check

LRC

Delimiter

Header

(30H 31H)

Data

(3AH)

1

2

2

4

4

2

2

Number of
characters

(30H 36H)

(30H 30H 30H 31H) (30H 30H 36H 34H)

(39H 34H)

(0DH 0AH)

Slave

address

Function

code

Data item

Error check

LRC

Delimiter

Header

Data

1

2

2

4

4

2

2

Number of
characters

(3AH)

(30H 31H)

(30H 36H)

(30H 30H 30H 31H)(30H 30H 36H 34H)

(39H 34H)

(0DH 0AH)

Содержание GT120 Series

Страница 1: ...ck 1 System configuration RS 485 multi drop connection communication Option Fig 1 1 Fig 1 2 2 Wiring connection When using line converter SC8 10 Connector D sub 25 pin Connection RS 232C RS 485 Communication speed 2400 4800 9600 19200bps Fig 2 1 Host computer GT120 No 0 No 1 No 30 GT8 CDD GT8 CDM Shield wire SD 2 RD 3 SG 7 FG 1 RS 4 CS 5 DR 6 ER 20 CD 8 Host computer D sub connector 25 pin 4 3 RS ...

Страница 2: ...For the instrument number setting and communication speed selection refer to the instruction manual for GT120 4 Communication procedure Communication starts with command transmission from the host computer hereafter Master and ends with the response of the GT120 hereafter Slave Response with data When the master sends the reading command the slave responds with the corresponding setting value or c...

Страница 3: ...ata in command is transmitted as ASCII characters Data format Start bit 1 bit Data bit 7 bits Parity Even Stop bit 1 bit Error detection Checksum 5 2 Command configuration All commands are composed of ASCII The data setting value decimal number is represented with hexadecimal number and ASCII code is used The negative numbers are represented with 2 s complement 1 Setting command Fig 5 2 1 2 Readin...

Страница 4: ...ter side as well to calculate the checksum of the response data from the slaves so that the communication errors can be checked The ASCII code hexadecimal which corresponds to the characters ranging from the address to that before the checksum is converted to binary notation and the total value is calculated The lower 2 digits of the total value are converted to 2 s complements and then to hexadec...

Страница 5: ...en No Odd Selectable Stop bit 1 bit 2 bits Selectable Error detection LRC Longitudinal Redundancy Check Data interval 1 second or less 1 Message configuration ASCII mode message is configured to start by colon 3AH and end by CR carriage return 0DH LF Line feed 0AH See Fig 6 2 1 Fig 6 2 1 2 Slave address Slave address is an individual instrument number on the slave side and is set within the range ...

Страница 6: ...ead and it is fixed as 30H 30H 30H 31H A response message from the slave in normal status When SV 100 Fig 6 2 3 The number of response bytes means the number of bytes of the data which has been read and it is fixed as 30H 32H A response message from the slave in abnormal status When non existent data item is sent Fig 6 2 4 The function code MSB is set to 1 for the response message in abnormal stat...

Страница 7: ... 06H Setting to slaves Function code is used to discern whether the response is normal acknowledgement or if any error negative acknowledgement is occurred when the slave returns the response message to the master When acknowledgement is returned the slave simply returns the original function code When negative acknowledgement is returned the MSB of the original function code is set as 1 for the r...

Страница 8: ... as 02H Response message from the slave in abnormal status When data item is mistaken Fig 6 3 4 The function code MSB is set to 1 for the response message in abnormal status 83H The abnormal code 02H Non existent data address is returned as contents of error 2 Setting Instrument number 1 SV 100 Request message from the master Fig 6 3 5 Response message from the slave in normal status Fig 6 3 6 Res...

Страница 9: ...ction 1 0000H Unlock 0002H Lock 2 0001H Lock 1 0003H Lock 3 20H 50H 03H 06H 0013H Not used 20H 50H 03H 06H 0014H Not used 20H 50H 03H 06H 0015H Sensor correction value setting Setting value 20H 50H 03H 06H 0016H Not used 20H 50H 03H 06H 0017H Not used 20H 50H 03H 06H 0018H Scaling high limit setting Setting value 20H 50H 03H 06H 0019H Scaling low limit setting Setting value 20H 50H 03H 06H 001AH D...

Страница 10: ...000BH Pt100 199 9 to 850 0 000CH JPt100 199 9 to 500 0 000DH Pt100 200 to 850 000EH JPt100 200 to 500 000FH K 320 to 2500 0010H K 199 9 to 750 0 0011H J 320 to 1800 0012H R 0 to 3200 0013H S 0 to 3200 0014H B 0 to 3300 0015H E 320 to 1500 0016H T 199 9 to 750 0 0017H N 320 to 2300 0018H PL 0 to 2500 0019H C W Re5 26 0 to 4200 001AH Pt100 199 9 to 999 9 001BH JPt100 199 9 to 900 0 001CH Pt100 300 t...

Страница 11: ...git Converter function 0 Controller 1 Converter 214 digit Not used Always 0 215 digit Key operation change 0 No 1 Yes 20H 03H 0086H Not used 20H 03H 0087H Not used 20H 03H 00A0H Not used 20H 03H 00A1H Instrument information reading 0000 0000 0000 0000 215 to 20 20 digit Not used Always 0 21 digit Not used Always 0 22 digit Alarm function 0 Not applied 1 Applied 23 digit Not used Always 0 24 digit ...

Страница 12: ...y check Checksum LRC CRC Data format Start bit 1 Data bit 7 8 Parity Even Odd No parity Stop bit 1 9 Troubleshooting If any malfunctions occur refer to the following items after checking the power supply to the master and the slave Problem If it is unable to communicate Check the following The connection or wiring of communication is not secure Burnout or imperfect contact on the communication cab...

Отзывы: