Pendant: show a message to the operator
Show a text message on the teach pendant or the screen of a robot controller with robot.Pendant. Brand support table, C# and Python examples.
robot.Pendant shows a short text message to the operator, on the teach pendant or on the screen of a robot controller. The support depends on the brand: several brands have no route for this method today, see the table below. On these brands IsAvailable returns false and the call throws FeatureNotSupportedException.
Prerequisites
- A connected
RobotController. See Connect to your robot. - The license of the brand of the controller, or the 30 day trial. See Licensing.
- A message of one line. The maximum length depends on the brand and on the route.
Brand support
Each cell gives the protocol that the method uses on this brand, in the default order. The page Routing explains how the library chooses it. The table is generated from the route data of the library. (manual) marks a route that you enable yourself. "n of m" is the number of methods of the service that have a route on this brand.
| Method | Fanuc | Yaskawa | Universal Robots | ABB | Stäubli |
|---|---|---|---|---|---|
| Pendant.ShowMessage | Not available | High Speed Ethernet Server, Ethernet Server | Dashboard Server, REST API | Not available | Not available |
| Pendant | 0 of 1 | 1 of 1 | 1 of 1 | 0 of 1 | 0 of 1 |
A brand that has no route for the method throws FeatureNotSupportedException (see Errors). Ask robot.Pendant.IsAvailable(PendantFeature.ShowMessage) before the call.
Example
Show a message to the operator
The controller decides how the message looks (a line of the display, a popup) and how long it stays.
RobotController robot = new RobotController();robot.Connect(RobotConnectionParameters.Create("fanuc", "192.168.0.1"));if (robot.Pendant.IsAvailable(PendantFeature.ShowMessage)){robot.Pendant.ShowMessage("Cell 3: maintenance at 18:00");}robot.Disconnect();}
Reference
In Python, the names are in snake_case: robot.pendant.show_message("...") and robot.pendant.is_available(...). The enum members keep their names.
Methods of IPendantService
Pendant service of a robot controller: messages to the operator on the teach pendant or the screen of the controller. The library implements this interface. A minor version of the library can add members to it: a class of the application that implements it, for example a test double, then needs the new methods. Errors of the methods other than IsAvailable: FeatureNotSupportedException when the brand has no route for the method, RouteUnavailableException when the method has routes but none of them can be used, ControllerRefusedException when the controller received the command and refused it, RobotControllerException when the route failed (the inner exception is the exception of the brand SDK), and ArgumentException or a derived exception for an invalid argument. IsAvailable only throws ArgumentOutOfRangeException, for a value that is not in the enum. Results: a text and an array are empty when there is no value, never null. The only null values are the Native properties when there is no object of the brand SDK, and Position when the variable is not a position.
| Member | Type | Description |
|---|---|---|
IsAvailable(PendantFeature) Method | bool | Returns true when the method can be called on the connected controller. The answer depends on the brand, on the routing settings and on the protocols that answered at the connection, not on the state of the controller.
|
ShowMessage(string) Method | void | Shows a short text message to the operator, on the teach pendant or the screen of the controller. The controller decides how the message looks (a line of the display, a popup) and how long it stays. The maximum length depends on the brand and the route: a text that is too long throws ArgumentException. A line break throws ArgumentException.
|
Errors
The page Errors explains each exception and how to avoid it.
FeatureNotSupportedException: the brand has no route for the method.RouteUnavailableException: the method has routes, but none of them can be used, for example because the protocol did not answer at the connection.ControllerRefusedException: the controller received the command and refused it.RobotControllerException: the route failed. Its inner exception is the exception of the brand SDK.ArgumentException: the text is too long for the brand and the route, or it contains a line break.
IsAvailable only throws ArgumentOutOfRangeException, for a value that is not in the enum.