High Speed Ethernet Server (HSES) is a useful protocol for developing programs (in languages other than C++) that interface with Yaskawa Motoman robots. If you are developing a program in C++, YMConnect is a better choice that implements functionality from HSE without the need to program a network stack.
In order to use HSES, you will need to have a basic understanding of networking and socket programming.
HSES has the capability to select and start a job on the controller. This articles covers the basic packet structure for requesting status information from the controller.
Status Information Request Packet Header Structure
The packet header is covered in depth in the High Speed Ethernet Server Packet Header article. Below is an example of a request packet header for selecting and starting a job.
+----------------------+---------+-------------------------------------------------------------------+-------------------------------------------+
| Field | Size | Description | Hardcoded value (if applicable) |
+----------------------+---------+-------------------------------------------------------------------+-------------------------------------------+
| Identifier | 4 Bytes | The identifier is always ASCII "YERC." | 0x59 0x45 0x52 0x43 |
| Header Length | 2 Bytes | The length of the header in bytes. | 0x0020 |
| Data Length | 2 Bytes | The length of the data payload. | N/A |
| Reserve 1 | 1 Byte | Fixed to “3.” | 0x03 |
| Processing division | 1 Byte | Specifies that this packet is a robot control command. | 0x01 |
| ACK | 1 Byte | Specifies if this is an initial request or a reply. | 0x00 for initial request, 0x01 for reply |
| Request ID | 1 Byte | Sequential identifying id of the packet.* | N/A |
| Block Number | 4 Bytes | Specifies the number of the packet in a block of communication. | 0x00 |
| Reserve 2 | 8 Bytes | Fixed to “99999999.” | 0x39 0x39 0x39 0x39 0x39 0x39 0x39 0x39 |
+----------------------+---------+-------------------------------------------------------------------+-------------------------------------------+
* Increment this ID every time the client side outputs a new command. In reply to this, server side answers the received value. Max value is 0xFF. If the value exceeds 0xFF, reset the value to 0x00.
Status Information Request Packet Subheader
The packet subheader is covered in depth in the High Speed Ethernet Server Packet Header article. See below for a description of the subheader for a status information request packet.
+----------------+---------+--------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+
| Field | Size | Description | Allowed Values |
+----------------+---------+--------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+
| Command Number | 2 Bytes | Specifies that this is a request for status information. | 0x72 |
| Instance | 2 Bytes | Fixed to 0x01 | 0x01 |
| Attribute | 1 Byte | Specify what set of data is requested. | 1: First set of data. 2: Second set of data. See data detail tables. |
| Service | 1 Byte | Request both sets of data or just the set specified in attribute. | 0x01 for read all(set Attribute to zero if this is the case.) , 0x0E to read the specified attribute. |
| Padding | 2 Bytes | Fixed to 0x0000 | 0x00 0x00 |
+----------------+---------+--------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+
Response Data
The response data comes in the form of two 4-byte integers. The first integer includes the modes of the controller and the second includes the hold, fault and servo status. Each integer is a bitfield. The bits are defined as follows:
Data Set 1
+-------+-----------------------------------------------------+
| Field | Description |
+-------+-----------------------------------------------------+
| bit 0 | 1 if the controller is in step mode, 0 if not |
| bit 1 | 1 if the controller is in 1 cycle mode, 0 if not |
| bit 2 | 1 if the controller is in auto mode, 0 if not |
| bit 3 | 1 if the controller is in running mode, 0 if not |
| bit 4 | 1 if the controller is in safeguard mode, 0 if not |
| bit 5 | 1 if the controller is in teach mode, 0 if not |
| bit 6 | 1 if the controller is in play mode, 0 if not |
| bit 7 | 1 if the controller is in remote mode, 0 if not |
+-------+-----------------------------------------------------+
Data Set 2
+-------+-----------------------------------------------------------------------------+
| Field | Description |
+-------+-----------------------------------------------------------------------------+
| bit 0 | reserved |
| bit 1 | 1 if the controller is in hold status by the programming pendant, 0 if not |
| bit 2 | 1 if the controller is in hold status externally, 0 if not |
| bit 3 | 1 if the controller is in hold status by command, 0 if not |
| bit 4 | 1 if the controller is alarming, 0 if not |
| bit 5 | 1 if a controller error is occurring, 0 if not |
| bit 6 | 1 if the servo is on, 0 if not |
| bit 7 | reserved |
+-------+-----------------------------------------------------------------------------+
Comments
0 comments
Please sign in to leave a comment.