Robot Web Services
3HAC050973-001 Revision:M, Application Manual - Robot Web Services
Subscribe on UI instruction

Subscription server see Subscription Service

URL

/subscription

Method

POST

URL Params

See Common URL parameters

Data Params

resources=1&1=/rw/rapid/uiinstr;uievent&1-p=0

Success Response

CREATED(201), see HTTP Status codes

Sample Response

Any empty event is sent as an initial UI event

<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Event</title>
</head>
<body>
<a href="ws://127.0.0.1:9696/poll/1" rel="events"/>
<a href="http://127.0.0.1:9696/subscription/1?action=show" rel="action"/>
<div class="state">
<ul/>
</div>
</body>
</html>

A UI event may look like:

<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Event</title>
</head>
<body>
<div class="state">
<ul>
<li class="rap-ui-ev" title="uiinstruction">
<span class="instr">IMessageBox</span>
<span class="event">SEND</span>
<span class="stack">RAPID/T_ROB1/$67775</span>
<span class="execlv">NORMAL</span>
<span class="msg">""</span>
</li>
</ul>
</div>
</body>
</html>

Resources

  • rap-ui-ev UI instruction event
    • instr - Instruction is one of {IAlphaEntry | IListView | IMessageBox | IMsgBox | INumEntry | INumTune | IShow | TPErase | TPReadFK | TPReadNum | TPShow | TPWrite}
    • event - Event is one of {SEND | POST | ABORT}
    • stack - The stack url, a link to the UI instruction parameters.
    • execlv - Rapid task execution level.
    • msg - Line of text

Error Response

BAD_REQUEST(400), see HTTP Status codes

See Robot controller return codes

Sample Call

Subscribe on UI Events

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/rapid/uiinstr;uievent&1-p=0" -X POST "http://localhost/subscription"

curl --digest -u "Default User":robotics -d "resources=1&1=/rw/rapid/uiinstr;uievent&1-p=1" -X POST "http://localhost/subscription"

Notes

Not supported in bootserver mode