Robot Web Services
3HAC050973-001 Revision:M, Application Manual - Robot Web Services
Get Mechunit

It returns mechanical unit properties info

URL

/rw/motionsystem/mechunits/{mechunit}

Method

GET

URL Params

  • continue-on-err={1|0}
  • resource={static | dynamic | tool | wobj | payload | total-payload | status | mode | jog-mode | type | task | coord-system | axes | axes-total | is-integrated | has-integrated}

resource parameter value can be given in any combination as mentioned below:

resource=static

resource=static;tool;wobj

resource=static;tool;dynamic

See Common URL parameters

Data Params

None

Success Response

HTTP_OK(200)

see HTTP Status codes

Example Response

Sample call1 response:
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
       <title>motionsystem</title>
       <base href="http://localhost/rw/motionsystem/mechunits/"/>
   </head>
   <body>
       <div class="state">
           <a href="ROB_1" rel="self"/>
           <a href="ROB_1?action=show" rel="action"/>
           <ul>
               <li class="ms-mechunit" title="ROB_1">
                   <span class="tool-name">tool0</span>
                   <span class="wobj-name">wobj0</span>
                   <span class="payload-name">load0</span>
                   <span class="total-payload-name">load0</span>
                   <span class="mode">Activated</span>
                   <span class="jog-mode">Cartesian</span>
                   <a href="http://{{host}}/rw/retcode?code={{task_retcode}}" rel="error" class="task-name"/>
                   <span class="axes">6</span>
                   <span class="axes-total">6</span>
                   <span class="type">TCPROBOT</span>
                   <span class="coord-system">Base</span>
                   <span class="status">Synchronized</span>
                   <span class="is-integrated-unit">NoIntegratedUnit</span>
                   <span class="has-integrated-unit">NoIntegratedUnit</span>
               </li>
               <li class="ms-mechunit-pjoints-li" title="pjoints">
                   <a href="ROB_1/pjoints" rel="self"/>
               </li>
               <li class="ms-mechunit-robtarget-li" title="robtarget">
                   <a href="ROB_1/robtarget" rel="self"/>
               </li>
               <li class="ms-mechunit-jointtarget-li" title="jointtarget">
                   <a href="ROB_1/jointtarget" rel="self"/>
               </li>
               <li class="ms-mechunit-cartesian-li" title="cartesian">
                   <a href="ROB_1/cartesian" rel="self"/>
               </li>
               <li class="ms-mechunit-axes-li" title="axes">
                   <a href="ROB_1/axes" rel="self"/>
               </li>
               <li class="ms-mechunit-complianceleadthrough" title="complianceleadthrough">
                   <a href="ROB_1?resource=lead-through" rel="self"/>
               </li>
               <li class="ms-mechunit-baseframe-li" title="baseframe">
                   <a href="ROB_1/baseframe" rel="self"/>
               </li>
               <li class="ms-mechunit-smbdata-li" title="smbdata">
                   <a href="ROB_1/smbdata" rel="self"/>
               </li>
               <li class="ms-mechunit-motorcalib-li" title="motorcalib">
                   <a href="ROB_1/motorcalib" rel="self"/>
               </li>
               <li class="ms-mechunit-jointtarget-li" title="jointtarget">
                <a href="ROB_1/jointtarget" rel="self"/>
               </li>
               <li class="ms-mechunit-robtargets-li" title="robtargets">
               <a href="ROB_1/robtarget" rel="self"/>
               </li>
           </ul>
       </div>
   </body>
</html>

Sample call2 response:
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
       <title>motionsystem</title>
       <base href="http://localhost/rw/motionsystem/mechunits/"/>
   </head>
   <body>
       <div class="state">
           <a href="ROB_1?resource=tool" rel="self"/>
           <ul>
               <li class="ms-mechunit" title="ROB_1">
                   <span class="tool-name">tool0</span>
               </li>
           </ul>
       </div>
   </body>
</html>

Sample call3 response:
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
       <title>motionsystem</title>
       <base href="http://localhost/rw/motionsystem/mechunits/"/>
   </head>
   <body>
       <div class="state">
           <a href="ROB_1?resource=tool;static" rel="self"/>
           <ul>
               <li class="ms-mechunit" title="ROB_1">
                   <span class="tool-name">tool0</span>
                   <span class="type">TCPROBOT</span>
                   <span class="task-name">T_ROB1</span>
                   <span class="axes">6</span>
                   <span class="axes-total">6</span>
                   <span class="is-integrated-unit">NoIntegratedUnit</span>
                   <span class="has-integrated-unit">NoIntegratedUnit</span>
               </li>
           </ul>
       </div>
   </body>
</html>

Resources

  • resource=static It gives mechanical unit static(task, type, axes, axes-total, is-integrated, has-integrated) properties info
  • resource=dynamic It gives mechanical unit dynamic(tool, wobj, payload, total-payload, status, mode, jog-mode, coord-system) properties info
  • resource=static;tool;wobj It gives mechanical unit static, tool and wobj properties info
  • resource=dynamic;axes;task It gives mechanical unit dynamic, axes and task properties info
  • resource=static;dynamic It gives mechanical unit static and dynamic properties info
  • continue-on-err=1 It continues the execution even if any error occurs and default value is 0

Returns the details of the mechanical unit under consideration

  • title = name of the mechanical unit.
    • tool-name = name of the tool.
    • wobj-name = work object name.
    • type = type of the mechanical unit. {None | TCPRobot | Robot | Single | Undefined}
    • payload-name = name of the payload.
    • total-payload-name = name for the total payload.
  • mode = mode of the mechanical unit {activated | deactivated}.
    • jog-mode = mode of jogging.
    • axes = number of axes.
  • axes-total = The total number of axes for the mech unit and possible inegrated units.
  • coord-system = type of co-ordinate system {World, Base, Tool, Wobj}
  • status = mechanical unit state.
  • is-integrated-unit = Name of the mechanical unit which has this mechanical unit as a integrated unit.
  • has-integrated-unit = Name of the mechanical unit which is integrated with this mechanical unit.
  • pjoints, robtarget, jointtarget, cartesian, axes are the different resources under mechunit/{mechunit-name} resource. For more information, refer the documentation for the same.

Error Response

Not Found(404),BAD_REQUEST(400)

Robot controller errors, see Robot controller return codes

Sample Call

Sample call1: curl --digest -u "Default User":robotics "http://localhost/rw/motionsystem/mechunits/ROB_1?continue-on-err=1"

Sample call2: curl --digest -u "Default User":robotics "http://localhost/rw/motionsystem/mechunits/ROB_1?resource=tool"

Sample call3: curl --digest -u "Default User":robotics "http://localhost/rw/motionsystem/mechunits/ROB_1?resource=tool;static&continue-on-err=1"

Note

Retcode is provided if API fails