TOHO ELECTRONICS TTM000 User Manual

TOHO ELECTRONICS INC.
Operation Manual, Communications
(TOHO protocol and MODBUS)
Model : TTM-000 Series Designation : Digital Controller
1
Contents
1. Before using the product ...................................................................................................... 4
1.1 On this operation manual
1.2 Conditions for communications
1.3 What can be done with communications
1.4 Positioning communications (priority ranking)
1.5 Setting before communications
2. Settings regarding TOHO communications ......................................................................... 5
2.1 Overview
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
2.6 Setting a communications speed
2.7 Setting an address
2.8 Setting a response delay
2.9 Switching communications mode
3. TOHO communications control ........................................................................................... 8
3.1 Communications procedure
3.2 Message types
3.3 Composition of a request message (transmitted from a high-level computer to this product)
3.4 Composition of a response message (transmitted from this product to a high-level computer)
3.5 Description of codes
3.6 Communications precautions
4. Examples of TOHO communications ................................................................................ 15
4.1 Examples of communications to be read
4.2 Examples of communications to be written
5. Settings regarding MODBUS communications ................................................................. 17
5.1 Overview
5.2 Setting a data length
5.3 Setting a stop bit length
5.4 Setting a parity
5.5 Setting a BCC check
5.6 Setting a communications speed
5.7 Setting an address
5.8 Setting a response delay
5.9 Switching communications mode
2
6. MODBUS communications control ................................................................................... 20
6.1 Communications procedure
6.2 Message types
6.3 Composition of an RTU request message (transmitted from a high-level computer to this product)
6.4 Composition of an RTU response message (transmitted from this product to a high-level computer)
6.5 Description of RTU codes
6.6 Precautions on RTU communications
6.7 Example of CRC-16 calculations
6.8 Composition of an ASCII request message (transmitted from a high-level computer to this product)
6.9 Composition of ASCII response messages (transmitted from this product to a high-level computer)
6.10 Description of ASCII codes
6.11 Precautions on ASCII communications
6.12 Example of LRC calculations
7. Specifications ..................................................................................................................... 35
7.1 Communications standard category
7.2 Communications specifications
8. Connections........................................................................................................................ 36
9. Table of identifiers (codes) ................................................................................................ 38
10. Table of ASCII codes ......................................................................................................... 41
3
1. Before using the product
1.1 On this operation manual
This is an operation manual regarding communications with a TTM-000 Series (hereinafter referred to as "this product").
1.2 Conditions for communications
The communications function of this product is optionally specified. For that reason, you should specify a communications option (RS-485) in purchasing this product.
1.3 What can be done with communications
With this product, users can write and read items specified in "9. Table of identifiers (codes)," 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 "Communications precautions." in chapter 3.6, 6.6 and 6.11.)
Settings regarding options not added and other unnecessary settings cannot be read or written.
1.4 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.5 Setting before communications
Before performing communications, this product must be set. See "2. Settings regarding TOHO communications" and "5. Settings regarding MODBUS communications."
4
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
MODE key at least 2 seconds
▲ ▼key
MODE Key
MODE Key
MODE Key
(For 4 seconds)
Operation mode screen
(Setting mode selection screen)
Select a communications setting mode
Set a communications protocol
: TOHO communications protocol
Select a communications parameters
Select a communications speed
MODE Key
Select a communications
MODE Key
MODE Key
MODE Key
Back to communications mode selection
address
Select a communications response delay
Select communications mode switchover
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.
5
2.2 Setting a data length
Stop bit 1
Stop bit 2
No parity
O
dd parity
Even parity
Data length, 7 bits
Data length, 8 bits
BCC check disabled
BCC check enabled
1200 BPS
2400 BPS
4800 BPS
9600 BPS
19200 BPS
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 .
****
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 .
****
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.)
6
2.8 Setting a response delay
Read and write
Read
-only
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 250msec
* 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.
****
7
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.
3.2 Message types
Messages are roughly divided into the following types:
Request message (transmitted
from a high-level computer)
Read request message
Write request message
Response message (transmitted
from this product)
Receipt acknowledgement and data
response
Write complete response
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
All codes (except for BCC) from STX and data to ETX are expressed in ASCII codes. In assembling a program for a high-level computer, see "9. Table of identifiers (codes)" and "10.
Table of ASCII codes" at the end of the book.
8
3.3 Composition of a request message
(transmitted from a high-level computer to this product)
For codes to , see "3.5 Description of codes." 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.3.1 Composition of a read request message
Start codeAddressContents of the
request: read/write
Identifier
3.3.2 Composition of a write request message
Start codeAddressContents of the
request: read/write
Identifier
End codeBCC data
Numerical data
End codeBCC data
3.3.3 Composition of a store request message
Start codeAddressContents of the
request: read/write
9
End codeBCC data
Identifier
3.4 Composition of a response message
(transmitted from this product to a high-level computer)
For codes to , see "3.5 Description of codes." 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
Start codeAddress
Acknowledge code
Identifier
Numerical data
End codeBCC data
3.4.2 Response message in response to a write/store request message
Start codeAddress
End codeBCC data
Acknowledge code
3.4.3 Response message in the case of an error
Start codeAddress
acknowledge code
Negative
10
End codeBCC data
Error code
3.5 Description of codes
The codes from STX, address to ERR type as indicated below are expressed in
ASCII codes. For the ASCII codes, see "10. Table of ASCII codes." 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.
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 "9. Table of identifiers (codes)."
Numerical data
These are data to be read or written, and are all expressed in five digits regardless of the
type. Negative data: The "-" (minus) sign is in a single digit at the largest digit. Position of the decimal point: 5-digit data does not include a decimal point.
Example: The table below indicates the significances of 5-digit numerical data -9999.
The data of which the
decimal point position
can be changed
(PV/SV)
Setting Meaning of Value
When decimal point position [_dP *] is 0
When decimal point position [_dp *] is 0.0
When decimal point position [_dp *] is 0.00
When decimal point position [_dp *] is 0.000
-9999
-999.9
-99.99
-9.999
11
ETX
Error No.
Error contents in the "request message" received by this product
0
Instrument error (memory error or A/D conversion error)
1 The numerical data deviated from the "range of settings desi
gnated 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 "0" and "
-
" was sp
ecified 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.
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."
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.
12
3.6 Communications precautions
3.6.1 Communications timing
Set a sufficient response delay to make sure that this product is switched over from transmission to reception with regard to a high-level computer in using an RS-485.
See the figure in "3.1 Communications procedure" and "2.8 Setting a response delay."
3.6.2 Interval between requests
In transmitting a series of "request messages" from a high-level computer, allow for an interval of 1msec or more from the reception of a "response message" from this product to a next transmission.
3.6.3 Response conditions
This product will not return a "response message" unless it receives a "request message" containing an STX and ETX (BCC).
If, therefore, the "request message" is error-ridden, this product will not return a "response message" (error reply) containing a NAK and ERR unless the conditions mentioned above are met.
Therefore, the high-level computer transmits the necessary "request message" again if a "request message" is sent to this product but the latter does not return a "response message" at the end of an appropriate period.
The moment this product receives an STX, it clears all codes received before that.
3.6.4 Errors in address specification
This product will not respond to any "request message" that specifies an address other than that specified for itself. If, therefore, the address portion of a "request message" is error-ridden, none of the mobile units will return a "response message."
Therefore, the high-level computer transmits the necessary "request message" again if a "request message" is sent to this product but the latter does not return a "response message" at the end of an appropriate period.
The moment this product receives an STX, it clears all codes received before that.
3.6.5 Number of digits in data and the decimal position
See "3.5 Description of codes, Numerical data."
3.6.6 Operation after receiving a store request message
This product starts to store data after correctly receiving a store request message from a high-level computer.
This product only stores data different from the contents of the EEPROM (data that is changed). The time (TW) required for storing data is within 6 seconds.
This product transmits a storage-complete reply (ACK) when the data is stored. This product will not guarantee that the data is stored if this product is turned off during a storage
operation. Do not turn off this product for 6 seconds after transmitting a store request message.
3.6.7 Operation after turning on the power
This product will not perform communications (no response) for about 4 seconds after it is turned on. Allow for a delay until communications is started after this product is turned on.
13
Loading...
+ 29 hidden pages