TOHO ELECTRONICS TTX-700 User Manual

TOHO ELECTRONICS INC.
Operation Manual, Communications
(TOHO protocol and MODBUS)
Model: TTX-700 Designation: Module Controller
Contents
1. Before using the product......................................................................................................................... 4
1.1 On this operation manual .............................................................................................................4
1.2 What can be done with communications......................................................................................4
1.3 Positioning communications (priority ranking)............................................................................ 4
1.4 Setting before communications.................................................................................................... 4
2. Settings regarding TOHO communications ............................................................................................5
2.1 Overview...................................................................................................................................... 5
2.2 Setting a data length..................................................................................................................... 6
2.3 Setting a stop bit length................................................................................................................ 6
2.4 Setting a parity .............................................................................................................................6
2.5 Setting whether to conduct a BCC check..................................................................................... 6
2.6 Setting a communications speed ..................................................................................................6
2.7 Setting an address......................................................................................................................... 7
2.8 Setting a response delay............................................................................................................... 7
2.9 Switching communications mode ................................................................................................ 7
3. TOHO communications control.............................................................................................................. 8
3.1 Communications procedure.......................................................................................................... 8
3.2 Message types .............................................................................................................................. 8
3.3 Composition of a request message
(transmitted from a high-level computer to this product)............................................................. 9
3.4 Composition of a response message
(transmitted from this product to a high-level computer)........................................................... 10
3.5 Description of codes....................................................................................................................11
3.6 Communications precautions .....................................................................................................13
4. Examples of TOHO communications ...................................................................................................15
4.1 Examples of communications to be read.................................................................................... 15
4.2 Examples of communications to be written............................................................................... 15
5. Settings regarding MODBUS communications.................................................................................... 17
5.1 Overview.................................................................................................................................... 17
5.2 Setting a data length................................................................................................................... 18
5.3 Setting a stop bit length.............................................................................................................. 18
5.4 Setting a parity ........................................................................................................................... 18
5.5 Setting a communications speed ................................................................................................18
5.6 Setting an address....................................................................................................................... 19
5.7 Setting a response delay............................................................................................................. 19
5.8 Switching communications mode .............................................................................................. 19
6 MODBUS communications control...................................................................................................... 20
6.1 Communications procedure........................................................................................................ 20
6.2 Message types ............................................................................................................................ 20
6.3 Composition of an RTU request message
(transmitted from a high-level computer to this product)........................................................... 21
6.4 Composition of an RTU response message
(transmitted from this product to a high-level computer)........................................................... 22
6.5 Description of RTU codes.......................................................................................................... 23
6.6 Precautions on RTU communications ........................................................................................25
6.7 Example of CRC-16 calculations ...............................................................................................26
6.8 Composition of an ASCII request message
(transmitted from a high-level computer to this product)........................................................... 27
6.9 Composition of ASCII response messages
(transmitted from this product to a high-level computer)...........................................................28
6.10 Description of ASCII codes........................................................................................................ 30
6.11 Precautions on ASCII communications...................................................................................... 32
6.12 Example of LRC calculations..................................................................................................... 33
7. Specifications........................................................................................................................................ 34
7.1 Communications standard category: Compliant with EIA standard RS-485 .............................34
7.2 Communications specifications.................................................................................................. 34
8. Connections........................................................................................................................................... 35
8.1 Connections for the RS-485....................................................................................................... 35
9. Table of ASCII codes............................................................................................................................ 36
10. Table of identifiers (codes).................................................................................................................... 37
1. Before using the product
1.1 On this operation manual
This is an operation manual regarding communications with a TTX-700 (hereinafter referred to as "this product").
1.2 What can be done with communications
With this product, users can write and read items specified in "10. Table of identifiers," such as "reconfiguring, starting, or stopping items that are operable with the front keys" and "reading information displayable on the display."
However, reading and writing with ordinary commands are performed with regarding to the RAM in this product. Written data can be turned back into the values before the writing (the values stored on the EEPROM) by turning power off and on again. To store the written data on the EEPROM of this product, execute a store request message. (See "3.6. Communications precautions.")
Settings regarding options not added and other unnecessary settings cannot be read or written.
1.3 Positioning communications (priority ranking)
Data and parameters in this product can be changed with keys while in operation in the communications mode.
While this product is in operation in the RO (read-only) mode, no data or parameter setting can be changed by communications. (Provided that communications modes can be changed.)
1.4 Setting before communications
Before performing communications, this product must be set. This product is compatible with the TOHO communications protocol and the MODBUS
communications (RTU, ASCII). Select a protocol with the protocol setting ( ) on communications 1/2 setting ( ). For the
TOHO communications protocol, see "2. Settings regarding TOHO communications." For the MODBUS communications protocol, see "5. Settings regarding MODBUS communications."
2. Settings regarding TOHO communications
2.1 Overview
Before communications is performed, initial settings must be made on this product. Enter such settings with the keys on the front panel. To switch to a series of setting screens, take the steps described below. For details, see the operation manual furnished with this product.
Power ON
Initial setting
Operation mode screen
MODE key at least 2 seconds
(Setting mode selection screen)
▲ ▼key
MODE key
MODE key
MODE key
MODE key
MODE key
MODE key
Select a communications setting mode
Set a communications protocol
Set a communications parameter
Set a communications speed
Set a communications address
Set a communications response delay
Set communications mode switchover
MODE key
When the settings are over, press the MODE key at least 2 seconds to go back to the operation mode. The parameters indicated above are initial values.
2.2 Setting a data length
2.3 Setting a stop bit length
2.4 Setting a parity
2.5 Setting whether to conduct a BCC check
While in the "Set a communications parameter" screen on the preceding page, operate the and keys to make the settings.
The initial value is [ ].
Stop bit 1 Stop bit 2
No parity Odd parity Even parity
Data length, 7 bits Data length, 8 bits
BCC check disabled BCC check enabled
2.6 Setting a communications speed
While in the "Set a communications speed" screen on the preceding page, operate the and keys to make the settings.
The initial value is [ ].
1200bps 2400bps 4800bps 9600bps 19200bps
2.7 Setting an address
While in the "Set a communications address" screen on the preceding page, operate the and keys to make the settings.
The initial value is •.
Setting range: 1 to 99 stations (It cannot be set to a 0.)
2.8 Setting a response delay
Set a time from the time when the high-level computer finished sending a "request message" until the time when it delivers the line and enters an input state.
While in the "Set a response delay" on the preceding page, operate the and keys to make the settings.
The initial value is 0.
Setting range: 0 to 250ms
* If the response delay is set to a short setting, the communications may not be conducted normally. * In a real operation, the processing time for this product will be added, in addition to the response
delay.
2.9 Switching communications mode
While in the "Set communications mode switchover" screen on the preceding page, operate the and keys to make the settings.
Read only Read and write
3. TOHO communications control
3.1 Communications procedure
This product returns a "response message" in response to a "request message" from a high-level computer. It therefore does not initiate a transmission.
Transmitted by a high-
level computer
High-level computer
This product
See "2.8. Set a response delay." See "3.6.1. Communications timing."
Request message
Response delay:
0-250ms
Transmitted by this
product
Request message
3.2 Message types
n Messages are roughly divided into the following types:
Request message (transmitted
from a high-level computer)
Read request message
Transmitted by a high-
level computer
Request message
1ms or more
See 3.6.2. "Interval between requests."
Response message (transmitted
from this product)
Receipt acknowledgement and data
response
Transmitted by this
product
Request message
Write complete response
Write request message
Reception error and error description
response
Store request message
: Response when a normal "request message" is received : When a received "request message" contains an error
Store complete response
n All codes (except for BCC) from STX data to ETX are expressed in ASCII codes. n In assembling a program for a high-level computer, see "10. Table of identifiers (codes)" and "9.
Table of ASCII codes" at the end of the book.
3.3 Composition of a request message (transmitted from a high-level computer to this product)
n For codes to , see "3.5. Description of codes." n For specific examples of request messages, see "4.1. Examples of reading communications" and
"4.2. Examples of writing communications."
3.3.1 Composition of a read request message
STX
Start code
AddressContents of the
request: read/write
Identifier
ETX
End code
BCC data
BCC
3.3.2 Composition of a write request message
STX
Start code
AddressContents of the
request: read/write
3.3.3 Composition of a store request message
Identifier
STX
Start code
request: read/write
AddressContents of the
Identifier
ETX
Numerical data
ETX
End code
BCC
End code
BCC data
BCC
BCC data
3.4 Composition of a response message (transmitted from this product to a high-level computer)
n For codes through , see "3.5. Description of codes." n For specific examples of request messages, see "4.1. Examples of communications to be read"
and "4.2. Examples of communications to be written."
3.4.1 Response message in response to a read request message
STX
Start code
ACK
Address
Acknowledge code
Identifier
Numerical data
End code
BCC
ETX
BCC data
3.4.2 Response message in response to a write/store request message
STX
Start code
3.4.3 Response message in the case of an error
STX
Start code
AddressEnd code
ACK
BCC
AddressEnd code
acknowledge code
ETX
BCC data
Acknowledge code
NAK
BCC
ETX
BCC data
Negative
Error code
10
3.5 Description of codes
n The codes from STX, address to ERR as indicated below are expressed in ASCII
codes.
n For the ASCII codes, see "9. Table of ASCII codes." n For conversion to ASCII codes, see "4. Examples of TOHO communications."
STX This code is needed for the receiver to detect the top of the message. It is affixed to the top
of a character string to be sent.
Address This is the address of the party (this product) with whom a high-level computer
communicates. The address in the response message from this product indicates the sender of the response message. Note that, when CH2 is used, two addresses are occupied. (Setting ADR to 1 causes this product to occupy addresses 1 and 2.)
Contents requested Enter a code R or W.
R: to read data from this product W: to write or store data in this product
Identifier An identifier is a classification code (identifier) for data to be read or written and expressed
in a three-digit alphanumerical ASCII code. See "10. Table of identifiers (codes)."
Numerical data At the time of writing or reading, 5-digit numerical data can be written.
Example: The table below indicates the significances of 5-digit numerical data 00010.
Example Significance of the value
Proportional band (P) →1.0% Data (PV), etc, whose decimal point can be shifted When the decimal point setting (DP) is 0 10 When the decimal point setting (DP) is 0.1 1.0
If DP = 0.1, the numerical data "12000" means 1200.0. In the case of text data, it is "□□INP." (The is a space.)
ETX This code is needed for the receiver to detect the end of a message. It is affixed to the end of
a character string to be sent (except for BCC).
BCC This is a check code for error detection and is the exclusive OR (EX-OR) of all characters
from STX to ETX.
If the BCC check is set to "Disabled" in the communications settings in this product, this
code (BCC) will not be incorporated in the response message. See "2. Settings regarding TOHO communications."
11
ACK
It is an acknowledge code. If a message received by this product is error-free, this code will
be incorporated in the "response message" from this product and returned.
NAK It is a negative acknowledge code. If a "request message" received by this product is
error-ridden, this code will be incorporated in the "response message" from this product and returned.
If the "request message" received is error-ridden, the error contents ( ERR type) will be
incorporated in the "response message" from this product, following NAK.
ERR type If a "request message" received from this product is error-ridden, the error contents (either
of the numbers in the table below) will be incorporated in the "response message" from this product, following " NAK."
The error number 0 is an instrument error (memory error or A/D conversion error). It will
be incorporated in the "response message" regardless of whether there is an error in the "request message."
The error number 9 is an AT error. It will therefore be incorporated in the "response
message" regardless of whether there is an error in the "request message." Remove the cause of the error immediately and start the AT again.
If there are two or more errors occurring at the same time, the largest error number will be
incorporated.
The table below indicates the error contents and classifications.
Error No.
0 Instrument error (memory error or A/D conversion error) 1 The numerical data deviated from the "range of settings designated specifically with setting
items." 2 The change of requested items is disabled or there are no items to be read. 3 An ASCII code other than the numerical data was specified in the field of numerical data.
An ASCII code other than numbers and "-" was specified in the field of codes. 4 Format error 5 BCC error 6 Overrun error 7 Framing error 8 Parity error 9 A PV error occurred during AT. Or AT will not end 3 hours later.
Error contents in the "request message" received by this product
12
Loading...
+ 28 hidden pages