Robot Web Services
3HAC050973-001 Revision:M, Application Manual - Robot Web Services
Get RAPID task state

Returns the rapid task resource

Sample response : In case of any error from API's, Retcode is provided under tag.

<?xml version="1.0" encoding="UTF-8"?>
<html
  xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>rapid</title>
    <base href="http://localhost:7778/rw/rapid/"/>
  </head>
  <body>
    <div class="state">
      <a href="tasks/T_ROB1" rel="self"></a>
      <a href="tasks/T_ROB1?action=show" rel="action"></a>
      <ul>
        <li class="rap-task" title="T_ROB1">
         <a href="tasks/T_ROB1/program" rel="program"></a>
          <a href="modules?task=T_ROB1" rel="modules"></a>
          <span class="name">T_ROB1</span>
          <span class="type">norm</span>
          <span class="taskstate">linked</span>
          <span class="excstate">ready</span>
          <span class="active">On</span>
          <span class="motiontask">TRUE</span>
          <span class="tasktype">Normal</span>
          <span class="trust">None</span>
          <span class="taskID">1</span>
          <span class="execmode">unknown</span>
          <span class="exectype">None</span>
          <span class="prodentrypt">main</span>
          <span class="bind_ref">True</span>
          <span class="task_in_forgnd">True</span>
          <a href="http://localhost:7777/rw/retcode?code=-1073442809" rel="error" class="execlevel"/>
        </li>
      </ul>
    </div>
  </body>
</html>

URL

/rw/rapid/tasks/{task}

Method

GET

URL Params

continue-on-err={1|0} Optional Default value is 0. In case input is 1, the API continues execution even if any error occurs in between.

Data Params

None*

Success Response

HTTP_OK(200), see HTTP Status codes

Example Response

    <?xml version="1.0" encoding="UTF-8"?>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>rapid</title>
    <base href="http://127.0.0.1:9898/rw/rapid/"/>
    </head>
    <body>
    <div class="state">
     <a href="tasks/T_ROB1" rel="self"/>
     <a href="tasks/T_ROB1?action=show" rel="action"/>
    <ul>
    <li class="rap-task" title="">
    <a href= "tasks/T_ROB1/program" rel="program"/>
    <a href= "modules?task=T_ROB1" rel="modules"/>
    <span class="name">T_ROB1</span>
    <span class="type">norm</span>
    <span class="taskstate">initiated</span>
    <span class="excstate">stopped</span>
    <span class="active">On</span>
    <span class="motiontask">TRUE</span>
    <span class="tasktype">Normal</span>
    <span class="trust">None</span>
    <span class="taskID">1</span>
    <span class="execlevel">Normal</span>
    <span class="execmode">Continous</span>
    <span class="exectype">Normal</span>
    <span class="prodentrypt">main</span>
    <span class="bind_ref">True</span>
    <span class="task_in_forgnd">True</span>
    </li>
    </ul>
    </div>
    </body>
    </html>

Resources

  • rap-task Rapid task resource
    • program Link to the program loaded into the task
    • modules Link to modules loaded into the task
    • name : Task Name
    • type : Type of Task
    • taskstate : Task state can be empty, initiated,linked or loaded.
    • excstate : Task execution state can be ready,stopped,started or uninitialized.
    • active : Task is active or not
    • motiontask : Motion Task is active or not
    • tasktype : Task Type [Normal, Static, SemiStatic]
    • trust : Task trust level [SysFail, SysHalt, SysStop, None]
    • taskID : Task ID
    • execlevel : Task Execution Level [None, Normal, Trap, User, Unknown]
    • execmode : Task Execution Mode
    • exectype : program execution Type [None, Normal, Inter (INTERRPUT), ExInter (EXTERNAL_INTERRUPT), UsRout (USER_ROUTINE), EvRout (EVENT_ROUTINE), Unknown (NA)]
    • prodentrypt :RAPID program entry point either Main or Proc
    • bind_ref : Task has configurated/Binded with Number [True, False]
    • task_in_forgnd : Is this task running as foreground task? [True, False]

Error Response

NOT_FOUND(404), FORBIDDEN(403)see HTTP Status codes

Robot controller errors, see Robot controller return codes

Sample Call

curl --digest -u "Default User":robotics" http://localhost/rw/rapid/tasks/T_ROB1

Notes

  • Retcode is provided if API fails.
  • Not supported in bootserver mode