Host Computer System.pdf - 第19页
AVK3 HOST COMPUTER SYSTEM 1.3 Comm and Descripti on D77HEC-51- 030-A 0 1.3- 2 Fr o m above cont ents, A command becom es the f oll owing confi guration. ∗ Appli cable code 0: F raming er ror 3: Che ck sum e rror 1: Ov …

AVK3
HOST COMPUTER SYSTEM
1.3 Command Description
D77HEC-51-030-A 0
1.3-1
1.3. Command Description
D77HEC-51-030-A 0
Commands can be largely divided into the following 4 categories.
C command Control command
D command Data command
R command Real time command
A command Acknowledge command
1.3.1 C Commands (C0, C1, C2, C3, C4, C5)
There are 6 types of remote control commands to AVK3, C0, C1, C2, C3, C4 and C5. These commands are
all effective only from the host computer controlling AVK3. C commands cannot be output from AVK3 to the
host computer.
1.3.2 A Commands (A0, A1, A2, A3, A4)
A (Acknowledge) command is a command when the host computer converses with AVK3 to acknowledge
that commands have been mutually received and that there are no errors. This command can be used both
by the host computer and AVK3.
Command to request the next data (A0)
This command shows that the receiver has properly received the data transmitted by the sender, and is
usually used as a command requesting the next data during NC program data transmission.
Data resend request command (A1)
If the data received is not normal, an A1 command is returned to the sender. When the sender receives the
A1 command, it becomes data resending mode. Data resending is to send again the data which was in error.
There are the following 6 types in data receiving error.
Framing error
Stop bit is not detected after data character.
Overrun error
The received data is sent within Z80 data buffer and the next data is received before the CPU can
be read by Z80B.
Parity error
There is parity error (even parity check) in the data received.
Check sum error
The figure of the check sum code of the data column received is wrong.
Overflow error
Receiving buffer overflow has occurred.
Format error
No STX or No ETX in the data received.
STX
A 0
No. of
characters
0 2
ETX
Check sum
2D

AVK3
HOST COMPUTER SYSTEM
1.3 Command Description
D77HEC-51-030-A 0
1.3-2
From above contents, A command becomes the following configuration.
∗ Applicable code
0: Framing error 3: Check sum error
1: Overrun error 4: Overflow error
2: Parity error 5: Format error
Even if AVK3 receives error codes E00 - E05, it has no means of expressing it, and does not process them.
Therefore, when the host computer sends the A1 command to AVK3, only A1 is sufficient, and there is no
need to add E00 - E05. (It does not matter if they are added.)
However, from AVK3 to host computer, E00 - E05 data is always added and sent. The host computer is then
able to determine the type of error using that data.
The data resending sequence is as shown in Ex.) and this sequence is exactly the same of whatever data is
being sent.
When AVK3 operation thereafter is continued. If resending is not successful, try to prevent the host
computer from sending the A1 command twice.
As a result, AVK3 discontinues the receiving mode by time out processing, and prepares for the next
conversation.
At the time of resending data, the reason the A1 command is not resent is that it is meaningless to resend it
again.
When A1 command is returned at this time, AVK3 becomes re-resending mode.
If an A1 command is returned from AVK3, the host computer should control the number of A1 commands,
and after resending data only once, discontinue resending.
STX
A 1
ETX
Check sum
E 0 *
No. of
characters
0 5

AVK3
HOST COMPUTER SYSTEM
1.3 Command Description
D77HEC-51-030-A 0
1.3-3
Ex.) Data resending sequence
As shown in Data Resending Sequence, if A1 command is returned from AVK3, the host computer
side controls the number of A1 commands, and after resending data only once, discontinues
resending.
As a result, in AVK3, message sending mode is discontinued by time out processing.
Data transmission end command (A2)
This is the command showing that the conversation between the host computer and AVK3 has been
completed without any trouble. By this A2 command, AVK3 discontinues the conversation mode.
No requested data command (A3)
Though C1 command is sent to AVK3 requesting NC data to be sent, if the name of the program
cannot be found, this command is used.
In the place of D command in the above figure, just by judging that there is no data for 1 block, do not
use A3 command to say there is no data.
Host computer
Start
C1 Program name
Compares program
name and if not
matched with AVK3’s.
If OK
Continues
A3
A2
AVK3
End
A0
D0 1 block of data
C1 command resent
Although A1 command
may be resent, the
received data is
not re-resent.
Host computer
Start
C1 Program name
Parity error occurs.
A1E02 is returned.
If OK, operation
Continues.
If error again in
receiveng, sends A1
command again.
AVK3
The first block NC data is sent.
A1
E02
C1 Program name
A1
E02
Direction of A1 command
Continuous
movement
Host computer
controls number of
A1 commands.
AVK3
unconditionally
resends by A1.
A1
A1