HOST.pdf - 第20页

BM 122/ 123 /1 33/ 221/2 31 HOST COMPUTER SYSTEM 3. 2 Comm and Descri ption E35HEC- 4A-171- A0 3.2- 1 3.2. Command Descrip tion E35HEC- 4A-171- A0 The c ommands are div ided int o 4 types. T hese are respectiv ely divide…

100%1 / 64
BM122/123/133/221/231
HOST COMPUTER SYSTEM
3.1 PanaProtocol Description
E35HEC-4A-151-B0
3.1-2
3.1.2 Message Format
Port 1: Used for communication of C commands (other than R commands).
Port 2: Used for communication of R commands.
Data structure 1 (without data)
Command
(
Fixed length)
Char [256]
*1 Commands less than 256 characters will be padded with blank
spaces.
Data size
(
Fixed length)
Long
*2 Size of transmitted data (entity) in bytes
(Big endian TCP/IP format)
0 Char
0 Char
0 Char
*4 Terminator
Data structure 2 (with data)
Command
(
Fixed length)
Char [256]
*1 Commands less than 256 characters will be padded with blank
spaces.
Data size
(
Fixed length)
Long
*2 Size of transmitted data (entity) in bytes
(Big endian TCP/I format)
Data
(
Variable-length)
Char [size]
*3 Defined separately.
Not to be set when the data size is 0.
0 Char
0 Char
0 Char
*4 Terminator
Packets of these data structures are used to exchange commands and data during communication.
=HINT=
Big endian is a method used in TCP/IP or SPARC CPU, which sends the most significant digit first
when transferring 4-byte long variables on a network.
On Windows, functions htonl() and ntohl() are used for conversion with X86 format.
Regarding the formats of command, data size and data fields, refer to Command Description.
Port 1
Port 2
Machine
Port 1
Port 2
Host
BM122/123/133/221/231
HOST COMPUTER SYSTEM
3.2 Command Description
E35HEC-4A-171-A0
3.2-1
3.2. Command Description
E35HEC-4A-171-A0
The commands are divided into 4 types. These are respectively divided into smaller types, and the actual
use is explained below.
3.2.1 C commands (C0, C1, C2, C3 and C5)
There are 5 types of remote control commands to the machine, C0, C1, C2, C3 and C5.
These commands are all effective only from the host computer controlling the machine.
C commands cannot be output from the machine to the host computer.
3.2.2 A commands (A0, A2, A3 and A4)
A (Acknowledge) commands are used when the host computer converses with the machine to acknowledge
that commands have been mutually received and that there are no errors.
These commands can be used both by the host computer and the machine.
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.
Data transmission end command: A2
This is the command showing that the conversation between the host computer and the machine has been
completed without any trouble.
By this A2 command, the machine discontinues the conversation mode.
No requested data command: A3
Though C1 command is sent to the machine requesting data to be sent, if the name of the program is not
found, this command is used.
Received data invalid command: A4
This command is generated if any abnormality has occurred in sequence of command, or if the machine has
received commands when not in the condition to receive commands.
In this case, the machine invalidates the received data.
A4 command has the following 2 items.
A4E00 (Operation error)
The machine has received C command when it cannot receive commands.
Ex.:
If C5 command is sent when remote control has been disabled on the machine (set in the menu).
If command is sent while the machine is in the processing of program selection, program editing or
production information update.
Besides, if there are abnormalities in command code, or if a command which is invalid because of
unavailable option has been received, this command is sent.
A4E01 (Protocol error)
Another command has been received while sending data.
3.2.3 D command (D0)
Used when sending data in the program transfer mode.
BM122/123/133/221/231
HOST COMPUTER SYSTEM
3.2 Command Description
E35HEC-4A-171-A0
3.2-2
3.2.4 R commands (R0, R1, R2 and R3)
R (real-time) commands are to inform the host computer of the changes of conditions during the production
work of the machine whenever they occur. They are used for remote control or for collecting production
management information.
However, if the host computer is used only for transferring product program data, receiving R commands
may cause inconvenience. Therefore, it is possible to disable R commands.
Use the select switch to determine whether to enable or to disable the R commands.
== Refer to ‘PanaProtocol LAN SPECIFICATIONS / R Commands / Setting the R Command Output
Condition’ for details.
About 40 buffers are provided for R commands, if R commands yet to be sent are accumulated more than
these buffers, they will be removed in the order they were added.