UnderAutomation
Any question?

[email protected]

Contact us
UnderAutomation
⌘Q

Ethernet Server overview

The Ethernet Server of YRC1000 controllers over TCP: what the SDK does with it, how it compares with the High Speed Ethernet Server, connection, errors and units.

  • What is the Ethernet Server
  • Ethernet Server or High Speed Ethernet Server
  • Topics
  • Connect
  • Prerequisites
  • Enable the Ethernet Server
  • What "connected" means
  • Standalone client
  • Errors
  • Units
  • Reference
  • What to read next

This page gives an overview of the Ethernet Server function of Yaskawa Motoman controllers (YRC1000, YRC1000micro), and of what the SDK does with it. The Ethernet Server is a second way to read and command the controller, over TCP, next to the High Speed Ethernet Server.

What is the Ethernet Server

The Ethernet Server is a function of the controller that answers commands of a PC over TCP. Its default port is 80, the port of the web server of the controller. The SDK opens one TCP connection for each command, sends it, reads the answer and closes the connection. There is no session to keep alive: a call made after a network cut works again as soon as the network is back.

The SDK gives you .NET objects. You do not build the messages. Nothing is installed on the controller and no job has to run.

static void Main()
{
var parameters = new ConnectParameters("192.168.0.1");
parameters.EServer.Enable = true;
var robot = new YaskawaRobot();
robot.Connect(parameters);
// State of the controller
HostControlStatusData status = robot.EServer.GetStatusInformation();
Console.WriteLine($"Play: {status.Play}, remote: {status.CommandRemote}, servo: {status.ServoOn}");
// Position of the robot, in mm and degrees
HostControlCartesianPositionData tcp = robot.EServer.GetRobotCartesianPosition();
Console.WriteLine($"X={tcp.X} Y={tcp.Y} Z={tcp.Z}");
// Executing job
HostControlJobData job = robot.EServer.GetExecutingJobInformation();
Console.WriteLine($"Job {job.Name}, line {job.Line}");
// Variables D000 to D003
int[] d = robot.EServer.ReadDoubleInteger(0, 4);
robot.Disconnect();
}
}
Click to see the full code

Ethernet Server or High Speed Ethernet Server

Both protocols read the state of the controller and command it. Most applications use the High Speed Ethernet Server. The Ethernet Server is useful in these cases:

NeedEthernet ServerHigh Speed Ethernet Server
TransportTCP, port 80UDP, ports 10040 and 10041
A firewall lets only TCP throughYesNo
Read a status (measured on a YRC1000micro)About 20 ms per callAbout 10 ms per call
Alarm textsError and 4 alarms, with code, sub code and textUp to 4 alarms with code, sub code, text and time
Position in a user frame or in the tool frameYes, HostControlCoordinateSystemBase frame. P variables in any frame
Wait for the end of a jobWaitForJobCompletion(seconds), one blocking callPoll GetStatusInformation().Running
Job list, master job, job deletionYesJob list and deletion with the file functions
Encoder temperatures, maximum torqueYesNo
Position variables (P, BP, EX), registers, system variablesNoYes
File transfersNo, use FTP or HTTPYes

The two protocols can be used together: enable both in ConnectParameters, then call robot.HighSpeedEServer or robot.EServer. Code that must work with both can use the common interfaces, see Choose a protocol.

Topics

PageWhat you can do
Status, alarms and servoRead the state, read and reset alarms, servo, hold, cycle, mode, pendant
Positions and torqueJoint pulses, Cartesian position in a frame, torque, encoder temperatures
JobsList, select, start and wait for a job, master job, delete a job
MotionJoint, linear and incremental moves, moves to a target in pulses
Variables and I/OB, I, D, R and S variables, read the I/O, write the network inputs

All these functions are methods of robot.EServer (robot.e_server in Python).

Connect

Prerequisites

  • The PC reaches the controller on TCP port 80. A firewall between them must let this port through.
  • The read methods work in any mode. The commands (servo, hold, jobs, moves, writes) need the remote mode, set as for the High Speed Ethernet Server: see Prepare the controller.

Enable the Ethernet Server

The Ethernet Server is disabled by default in ConnectParameters. Set EServer.Enable to true. The other protocols keep their own setting.

static void Main()
{
var parameters = new ConnectParameters("192.168.0.1");
// Only the Ethernet Server
parameters.HighSpeedEServer.Enable = false;
parameters.EServer.Enable = true;
// TCP port of the Ethernet Server (default: 80)
parameters.EServer.Port = 80;
// Time to wait for an answer, in milliseconds
parameters.EServer.TimeoutMilliseconds = 5000; // most commands
parameters.EServer.PowerOnTimeoutMilliseconds = 10000; // SetServo(true)
parameters.EServer.MotionTimeoutMilliseconds = 30000; // moves
var robot = new YaskawaRobot();
robot.Connect(parameters);
robot.Disconnect();
}
Click to see the full code
ParameterDefaultMeaning
EServer.EnablefalseOpen the Ethernet Server client
EServer.Port80TCP port of the Ethernet Server
EServer.TimeoutMilliseconds5000Time to wait for the answer of a command
EServer.PowerOnTimeoutMilliseconds10000Time to wait for the answer of SetServo(true)
EServer.MotionTimeoutMilliseconds30000Time to wait for the answer of a move

What "connected" means

Each command opens its own TCP connection. So Connect checks the license and the address, but does not exchange a message with the controller. The first method call is the first exchange. To check the link at startup, call a read method, for example GetStatusInformation(), right after Connect.

Standalone client

EServerClient opens an Ethernet Server client without YaskawaRobot. The methods are then directly on the client.

static void Main()
{
// An Ethernet Server client without YaskawaRobot
var client = new EServerClient();
client.Connect("192.168.0.1");
HostControlStatusData status = client.GetStatusInformation();
Console.WriteLine($"Running: {status.Running}");
client.Close();
}
}
Click to see the full code

Errors

When the controller refuses a command, the SDK throws a HostControlException. Message gives the reason in clear text, ErrorCode the code returned by the controller. A call made before Connect throws an InvalidOperationException.

var robot = new YaskawaRobot();
robot.Connect(parameters);
try
{
robot.EServer.StartJob("PICK");
}
catch (HostControlException ex)
{
// Message gives the reason, ErrorCode the code of the controller
Console.WriteLine($"Refused: {ex.Message} (code {ex.ErrorCode})");
}
robot.Disconnect();
}
Click to see the full code

Frequent reasons, and what to check:

ReasonCheck
Command remote not setThe remote mode, see Prepare the controller
Servo offCall SetServo(true) first
Alarm or errorRead and reset the alarm, see Alarms
Hold by the pendant, by a signal, by a commandRelease the hold
Incorrect modePlay mode to start a job, teach mode for some commands
Argument out of rangeThe number of a variable, a signal or a frame does not exist on this controller

Units

ValueUnit
Cartesian X, Y, Zmm
Cartesian Rx, Ry, Rzdegrees
Joint positions and moves in pulsesencoder pulses
Torquepercent of the rated torque
Encoder temperaturedegrees Celsius
Speed of a joint movepercent of the maximum speed
Speed of a linear movepercent, or mm/s, set by HostControlSpeedType

Reference

Class
EServerClientinherits EServerClientInternal
C#Python

Standalone client class for communicating with Yaskawa Motoman industrial robots using the Host Control protocol via Ethernet Server (TCP). This class provides methods for reading robot status, positions, variables, and controlling robot operations.

MemberTypeDescription
EServerClient()
Constructor
Creates a new instance of EServerClient for robot communication via TCP. Call Connect() to configure communication with a robot controller.
Connect(string)
Method
void
Configures connection to the robot controller via TCP using default parameters.
  • ip : IP address or hostname of the robot controller.
Connect(string, EServerConnectParameters)
Method
void
Configures connection to the robot controller via TCP.
  • ip : IP address or hostname of the robot controller.
  • parameters : Ethernet Server connection parameters including port and timeouts.
Class
EServerConnectParametersInternalinherits EServerConnectParameters
C#Python

Connection parameters for Host Control Ethernet Server (TCP) communication. Use this class to configure network settings for TCP connection to YRC1000 and compatible controllers.

MemberTypeDescription
EServerConnectParametersInternal()
Constructor
Enable
Property
bool
Gets or sets a value indicating whether to enable the Ethernet Server connection (default: false).
Class
EServerConnectParametersinherits HostControlConnectParametersBase
C#Python

Base class defining Ethernet Server (TCP) connection parameters for the Host Control communication. This class provides configuration for TCP-based communication with YRC1000 controllers.

MemberTypeDescription
EServerConnectParameters()
Constructor
Initializes a new instance of the Ethernet Server connection parameters.
Port
Property
int
Gets or sets the TCP port number for Ethernet Server communication. Must match the robot controller's Ethernet Server port configuration. Default: 80.
DEFAULT_PORT
Field
int
Default TCP port for Ethernet Server communication (80).
Class
HostControlExceptioninherits Exception
C#Python

Exception thrown when a Host Control command fails.

MemberTypeDescription
HostControlException(string)
Constructor
Creates a new HostControlException with the specified message.
  • message : The error message.
HostControlException(string, Exception)
Constructor
Creates a new HostControlException with the specified message and inner exception.
  • message : The error message.
  • innerException : The inner exception.
HostControlException(string, string)
Constructor
Creates a new HostControlException with the specified message and error code.
  • message : The error message.
  • errorCode : The error code from the robot controller.
HostControlException(string, string, string)
Constructor
Creates a new HostControlException with the specified message, command, and error code.
  • message : The error message.
  • command : The command that caused the exception.
  • errorCode : The error code from the robot controller.
Command
Property
read only
string
Gets the command that caused the exception.
ErrorCode
Property
read only
string
Gets the error code returned by the robot controller.

What to read next

  • Status, alarms and servo: the first commands to try.
  • Choose a protocol: HSES, Ethernet Server, HTTP and FTP side by side.

Easily integrate Universal Robots, Fanuc, Yaskawa, ABB or Staubli robots into your .NET, Python, LabVIEW or Matlab applications

UnderAutomation
Contact usLegal

© All rights reserved.