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 and the format of the data payload for selecting and starting a job.
Job Start and Select Request Packet Header Structure
The packet header is covered in depth in the HSE Packet Header article. Here 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.
Job Select Request Packet Subheader and Data Payload
+----------------+----------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Field | Size | Description | Allowed Values |
+----------------+----------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| Command Number | 2 Bytes | Specifies that this is a request to select a job. | 0x87 |
| Instance | 2 Bytes | Task number | 1: Set executing job. 10-25: Set master job of task instance - 10. Example, a selection of 13 sets the master job for task 3. |
| Attribute | 1 Byte | Fixed to 0x00 | 0x00 |
| Service | 1 Byte | Fixed to 0x02 | 0x02 |
| Padding | 2 Bytes | Fixed to 0x0000 | 0x00 0x00 |
| Job Name | 32 Bytes | The name of the job to be selected. | 32 characters. |
| Line Number | 4 Bytes | The line number to start the job at. | 0x00000000 |
+----------------+----------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
Job Start Request Packet Subheader
+----------------+---------+--------------------------------------------------+----------------+
| Field | Size | Description | Allowed Values |
+----------------+---------+--------------------------------------------------+----------------+
| Command Number | 2 Bytes | Specifies that this is a request to start a job. | 0x86 |
| Instance | 2 Bytes | Fixed to 0x01 | 0x01 |
| Attribute | 1 Byte | Fixed to 0x01 | 0x01 |
| Service | 1 Byte | Fixed to 0x10 | 0x10 |
+----------------+---------+--------------------------------------------------+----------------+
Comments
0 comments
Please sign in to leave a comment.