Robot Web Services
3HAC050973-001 Revision:M, Application Manual - Robot Web Services
Subscribe on Program Pointer

URL

/subscription

Method

POST

URL Params

See Common URL parameters

Data Params

  • resources=An identifier
  • *<identifier>*=The subscription resource URI (The URI here is: '/rw/rapid/tasks/<taskname>/pcp;programpointerchange')
  • *<identifier>-p*=The priority associated with the subscription resource.

Success Response

CREATED(201)

see HTTP Status codes

Sample Response

<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Event</title>
<base href="http://localhost/"/>
</head>
<body>
<div class="state">
<a href="subscription/4" rel="group"/>
<a href="ws://localhost/poll/4" rel="self"/>
<a href="subscription/4?action=show" rel="action"/>
</div>
</body>
</html>

A build log change event look like

<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Event</title>
<base href="http://localhost/"/>
</head>
<body>
<div class="state">
<a href="subscription/4" rel="group"/>
<a href="ws://localhost/poll/4" rel="self"/>
<a href="subscription/4?action=show" rel="action"/>
<ul>
<li class="rap-pp-ev" title="pp">
<a href="/rw/rapid/tasks/T_ROB1/pcp;programpointerchange" rel="self"/>
<span class="module-name">MainModule</span>
<span class="routine-name">routine1</span>
<span class="BegPosLine">3</span>
<span class="BegPosCol">3</span>
<span class="EndPosLine">3</span>
<span class="EndPosCol">122</span>
</li>
</ul>
</div>
</body>
</html>

Resources

  • rap-pcp-ev
  • module-nam Module name
  • routine-name routine name
  • BegPosLine Begining Line number of the current PCP
  • BegPosCol Begining Column number of the current PCP
  • EndPosLine Ending Line number of the current PCP
  • EndPosCol Ending Column number of the current PCP

Error Response

BAD_REQUEST(400), UNSUPPORTED_MEDIA(415)

HTTP Errors, see HTTP Status codes

Robot controller errors, see Robot controller return codes

Sample Call

Subscribe on RAPID program pointer

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

curl --digest -u "Default User":robotics -X POST -d "resources=1&1=/rw/rapid/tasks/T_ROB1/pcp;programpointerchange&1-p=0" "http://127.0.0.1/subscription"

curl --digest -u "Default User":robotics -X POST -d "resources=1&1=/rw/rapid/tasks/T_ROB1/pcp;programpointerchange&1-p=1" "http://127.0.0.1/subscription"

Notes

On subscription an empty initial event will be generated followed by the current value. Not supported in bootserver mode