Host Computer System.pdf - 第14页

AVK3 HOST COMPUTER SYSTEM 1.2 PanaPr otocol and Comm and Specifi cations D77HEC-51- 020-A0 1.2- 1 1.2. PanaProtocol and Comman d Specifi cations D77HEC - 51-020-A 0 1.2. 1 M essa ge Format The m achine and the host c o m…

100%1 / 174
AVK3
HOST COMPUTER SYSTEM
1.1 RS-232C
D77HEC-51-010-A1
1.1-4
Since the DR (Data set ready) signal means the other interface terminal side is ready, it checks only if
“ON” at the startup process of character sending. If DR signal is “OFF”, character sending waits until it
is turned “ON”.
2) Character receiving timing
For receiving characters there are not restrictions or conditions in communications, so all characters
output by the Host computer can be read. However, the characters received when processing the
received command are neglected.
1.1.6 Changing Data Transmission Mode
Because the control of RS-232C interface varies with the type of host computer, the machine is equipped
with mode changeover switches.
1) Optional break character function
In some cases, inputting of break character may cause inconvenience. In this case, turn the
changeover SW ON and the outputting of the break character from the AVK3 becomes ineffective.
2) Optional check sum function
The data transmission format includes check sum data. Even if the results of this check sum data
accumulation are in error, it is okay with this changeover switch. Check sum data is necessary to
comply with format, so do not forget to add dummy figures.
3) R commands
If a host computer is used for only NC data transmission, there may be trouble whenever real time
information is input to the host computer. If the changeover switch is ON, all R commands from AVK3
will be blocked.
4) Momentary selection of M and T commands at the time of NC data output
When the NC data in AVK3 is output to the host computer by C1 command, normally, even if M and T
commands are the same, the respective blocks are output similarity as in T1M1. This results in
increased time for data transmission. Therefore, when M and T commands are the same, the
command part can be out and it is this changeover switch that shortens the data.
5) Optional time-out processing
Turn ON changeover switch when you do not want time out processing.
6) End code selection
Turn the changeover switch to CR when using CR code for ETX as the message end code.
AVK3
HOST COMPUTER SYSTEM
1.2 PanaProtocol and Command Specifications
D77HEC-51-020-A0
1.2-1
1.2. PanaProtocol and Command Specifications
D77HEC-51-020-A0
1.2.1 Message Format
The machine and the host computer are connected by RS-232C interface as hardware. And, as software, in
byte unit, ASCII code (with parity) is used. The message format is as follows, and STX code to ETX code is
processed as one message. It includes number of characters, command, data and check sum data.
STX (START OF TEXT)
The character STX which appears first until the ETX which appears next are processed as one
message. The STX which appears in the message again is processed only as one unit of data. The
ASCII code with parity is H'82.
Number of characters
The number of characters in the command and data fields is counted in binary, and the result of 8 bits
are divided into 4 bits each of upper and lower digits. They are respectively expressed in hexadecimals
(X0” - F”) and processed by ASCII code.
Since hexadecimals are 2 digits, the largest number is FF (256). To read this much data, 256 codes for
256 buffers are required for the interface in the AVK3.
In actual practice, however, 36 codes can meet requirements for all commands according to the
command contents described later. As a result, the maximum number of codes to be received in one
message by the machine is 96 characters including margin. However, even when characters other
than those specified by commands are included in data, they are stored in the buffer when the machine
receives the data. So be careful not to overflow the capacity when the label is added by the user.
In this case, attention must also be paid since characters other than those specified should also be
counted.
C 1 D 0 5 EN 1 1Z 2
EXT: 1 digit
Check sum: 1 digit
Data field: Max. 88 digits
Command field: 2 digits
No. of characters: 2 digits
(
Command + data)
STX: 1 digit
Break code
(Optional)
AVK3
HOST COMPUTER SYSTEM
1.2 PanaProtocol and Command Specifications
D77HEC-51-020-A0
1.2-2
Command field
The message between AVK3 and the host computer is conducted by the specified command.
The command is largely categorized as follows and is processed by ASCII code.
The large category is actually limited to the following 4 types and used as follows:
Large
category
command
Message Contents How it is used
A Acknowledge
Used when AVK3 and host computer
mutually confirm that the message
has been received.
(Host CPU AVK3)
Used as communication procedure,
for use in “acknowledgment”,
“negative acknowledgment” and
“request to resend” to the message
received.
C
Control
command
Used when the host computer
requests action to AVK3.
(Host CPU AVK3)
Start of sending and receiving NC
program.
Specifies I/O monitoring.
Start/stop/reset command for
machine.
D Data
Means the data transmitted between
AVK3 and host computer.
(Host CPU AVK3)
Transmits NC program.
Transmits the results of I/O
monitoring.
R
Real time
information
Used for AVK3 to inform host
computer of changes in information
whenever they occur.
(Host CPU AVK3)
“Operation mode information”,
“Error information” and “Recovery
information” are transmitted from
AVK3 on real time to Host
computer. The host computer
compiles and analyzes this
information and uses it for
production management of AVK3.
Data field
As explained above, the actual number range of data usable is 88 or less. In the data field, the
characters other than those specified by command are neglected. Also, all are processed by ASCII
code.
Check sum
The ASCII code, “number of characters”, “Command field” and “Data field” are subtracted by 8 bits not
counting zero, and the results are divided into 4 bits each of upper and lower digits. They are
respectively expressed in hexadecimals (X‘0’ - F”) and processed by ASCII code.
Therefore, at the time of confirmation of check sum, add command and data in ASCII code (7 bits, no
parity) to check sum data. If the total of 8-bit sum becomes zero, the check sum is OK.
To figure out the character position of check sum, do not figure the 2-digit character before ETX. But,
with the number of characters as the base, count the number of the data fields, and a 2-digit character
after the contents of the count should coincide with the number of characters. Therefore, if there is an
error in the number of characters, an error occurs in the check sum, too.
C 1
Small category (character used: 0-F)
Large category (character used: A-Z)