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 read the current position data of a system. This includes robots, bases and stations. Please note that only the base coordinate can be used as cartesian value. (robot, user and tool coordinates can not be used.)
Position Data Request Packet Structure
The packet header is covered in depth in the High Speed Ethernet Packet Header article. Here is an example of a request packet header for reading position data.
+----------------------+---------+-------------------------------------------------------------------+-------------------------------------------+
| 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 for robot control |
| 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.
Position Data Request Packet Subheader
The packet subheader is covered in depth in the High Speed Ethernet Packet Subheader article. See below for a description of the subheader for a position data request packet.
+----------------+---------+--------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+
| Field | Size | Description | Allowed Values |
+----------------+---------+--------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+
| Command Number | 2 Bytes | Specifies that this is a request for position data. | 0x75 |
| Instance | 2 Bytes | Selection of Control group id | 1-8: R1-R8, 11-18: B1-B8, 21-44: S1-S24, 101-108: R1-R8(cartesian) |
| Attribute | 1 Byte | Data fields | See attribute table |
| Service | 1 Byte | Request all data fields or just the field specified in attribute. | 0x01 for read all(set Attribute to zero if this is the case.) , 0x0E to read the specified attribute. |
+----------------+---------+--------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+
Attribute Table
+--------------------------+------------------------------------------------+--------------------------------------------------+
| Field | Description | Value |
+--------------------------+------------------------------------------------+--------------------------------------------------+
| Data type | Coordinate system to request | 00x0: Pulse value, 0x10 : Base coordinated value |
| Figure | See figure table | 0x02 |
| Tool number | Assigned tool number to variable | 0x03 |
| User coordinate number | Assigned User coordinate number if applicable | 0x04 |
| Extended | figure See figure table. | 0x05 |
| First coordinate data | S for pulse value, X for cartesian value | 0x06 |
| Second coordinate data | L for pulse value, Y for cartesian value | 0x07 |
| Third coordinated data | U for pulse value, Z for cartesian value | 0x08 |
| Fourth coordinate data | R for pulse value, RX for cartesian value | 0x09 |
| Fifth coordinate data | B for pulse value, RY for cartesian value | 0x0A |
| Sixth coordinate data | T for pulse value, RZ for cartesian value | 0x0B |
| Seventh coordinate data | If applicable | 0x0C |
| Eighth coordinate data | If applicable | 0x0D |
+--------------------------+------------------------------------------------+--------------------------------------------------+
Response Packet Data
Each field is a 4 byte integer value. The fields are as follows:
+--------------------------+----------------------------------------------------------------------------------------------------------------------------------+
| Field | Description |
+--------------------------+----------------------------------------------------------------------------------------------------------------------------------+
| Data type | 0: Pulse value, 16: Base coordinated value, 17: Robot coordinated value, 18: User coordinated value, 19: Tool coordinated value |
| Figure | See figure table |
| Tool number | Assigned tool number to variable |
| User coordinate number | Assigned User coordinate number if applicable |
| Extended figure | See figure table. |
| First coordinate data | S for pulse value, X for cartesian value |
| Second coordinate data | L for pulse value, Y for cartesian value |
| Third coordinated data | U for pulse value, Z for cartesian value |
| Fourth coordinate data | R for pulse value, RX for cartesian value |
| Fifth coordinate data | B for pulse value, RY for cartesian value |
| Sixth coordinate data | T for pulse value, RZ for cartesian value |
| Seventh coordinate data | If applicable |
| Eighth coordinate data | If applicable |
+--------------------------+----------------------------------------------------------------------------------------------------------------------------------+
Figure Table
+----------------+-------------------------------------------------------------------------------------------------------+
| bit | Description |
+----------------+-------------------------------------------------------------------------------------------------------+
| bit0 | 0: Front 1: Back |
| bit1 | 0: Upper arm 1: Lower arm |
| bit2 | 0: Flip 1:No flip |
| bit3 | 0: өR < 180, 1: өR ≥180 |
| bit4 | 0: өT<180, 1: өT ≥180 |
| bit5 | 0: өS<180, 1: өS ≥180 |
| bit6 | 0: Redundant front 1: Redundant back |
| bit7 | 0: Previous step regarded reverse conversion specified 1: Type regarded reverse conversion specified |
| extended bit0 | 0:өL<180, 1: өL ≥180 |
| extended bit1 | 0:өU<180, 1: өU ≥180 |
| extended bit2 | 0:өB<180, 1: өB ≥180 |
| extended bit3 | 0:өE<180, 1: өE ≥180 |
| extended bit4 | 0:өW<180, 1: өW ≥180 |
| extended bit5 | Reserve |
| extended bit6 | Reserve |
| extended bit7 | Reserve |
+----------------+-------------------------------------------------------------------------------------------------------+
Comments
0 comments
Please sign in to leave a comment.