Robot Web Services
3HAC050973-001 Revision:M, Application Manual - Robot Web Services
Subscribe Controller state

Subscribe on controller state changes

URL

/subscription

Method

POST

URL Params

None

Data Params

  • resources = An identifier Required
  • <identifier> = The subscription resource URI (The URI here is: '/rw/panel/ctrlstate') Required
  • <identifier>-p = The priority associated with the subscription resource Required

Success Response

CREATED(201)

see HTTP Status codes

Example Response

<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Subscription Event</title>
</head>
<body>
<div class="state">
<a href="http://localhost/subscription/1" name="poll"></a>
<a href="http://localhost/subscription/1?action=show" rel="action"></a>
<a href="http://localhost/subscription/1" rel="group"></a>
<ul>
<li class="pnl-ctrlstate-ev" title="ctrlstate">
<a href="/rw/panel/ctrlstate" rel="self"></a>
<span class="ctrlstate">motoroff</span>
</li>
</ul>
</div>
</body>
</html>

Resources

  • pnl-ctrlstate-ev
    • ctrlstate Controller state {init | motoron | motoroff | guardstop | emergencystop | emergencystopreset | sysfail}

Error Response

BAD_REQUEST(400)

HTTP Errors, see HTTP Status codes

See Robot controller return codes

Sample Call

Subscribe on controller state changes

only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource

curl --digest -u "Default User":robotics -d "resources=1&1=/rw/panel/ctrlstate&1-p=0" -X POST "http://localhost/subscription"

curl --digest -u "Default User":robotics -d "resources=1&1=/rw/panel/ctrlstate&1-p=1" -X POST "http://localhost/subscription"

Notes

  • init: The robot is starting up. It will shift to state motors off when it has started.
  • motoroff: The robot is in a standby state where there is no power to the robot's motors. The state has to be shifted to motors on before the robot can move.
  • motoron: The robot is ready to move, either by jogging or by running programs.
  • guardstop: The robot is stopped because the safety runchain is opened. For instance, a door to the robot's cell might be open.
  • emergencystop: The robot is stopped because emergency stop was activated.
  • emergencystopreset: The robot is ready to leave emergency stop state. The emergency stop is no longer activated, but the state transition isn't yet confirmed.
  • sysfail: The robot is in a system failure state. Restart required.
  • Not supported in bootserver mode