Panel

abb_rws_client_python_rw6.highlevel.panel

High-level controller motor state for ABB RWS RobotWare 6.

Author: Clement RACINET

Composed operations built exclusively from atomic rws/ functions. No HTTP calls are made directly in this module.

All functions are async and require an open RWSClient instance.

set_motors_off(client) async

Switch the controller to motors-off state.

Wraps set_controller_state with ctrl_state="motoroff".

Route (delegated): POST /rw/panel/ctrlstate (action=setctrlstate)

ABB constraints
  • No mastership required.
Parameters:
  • client (RWSClient) –

    Open RWSClient instance.

Returns:
  • None –

    None. Expects HTTP 204.

Raises:
Example
async with RWSClient(host="192.168.125.1") as client:
    await set_motors_off(client)
Source code in abb_rws_client_python_rw6/highlevel/panel.py
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
async def set_motors_off(client: RWSClient) -> None:
    """Switch the controller to motors-off state.

    Wraps ``set_controller_state`` with ``ctrl_state="motoroff"``.

    Route (delegated): ``POST /rw/panel/ctrlstate`` (action=setctrlstate)

    ABB constraints:
        - No mastership required.

    Args:
        client: Open ``RWSClient`` instance.

    Returns:
        None. Expects HTTP 204.

    Raises:
        RWSAuthenticationError: On HTTP 401.
        RWSNotFoundError: On HTTP 404.
        RWSHTTPError: On any other HTTP >= 400.

    Example:
        ```python
        async with RWSClient(host="192.168.125.1") as client:
            await set_motors_off(client)
        ```
    """
    await set_controller_state(
        client,
        action="setctrlstate",
        ctrl_state="motoroff",
    )
    logger.debug("Motors OFF")

set_motors_on(client) async

Switch the controller to motors-on state.

Wraps set_controller_state with ctrl_state="motoron".

Route (delegated): POST /rw/panel/ctrlstate (action=setctrlstate)

ABB constraints
  • Controller must be in AUTO mode.
  • No mastership required.
Parameters:
  • client (RWSClient) –

    Open RWSClient instance.

Returns:
  • None –

    None. Expects HTTP 204.

Raises:
Example
async with RWSClient(host="192.168.125.1") as client:
    await set_motors_on(client)
Source code in abb_rws_client_python_rw6/highlevel/panel.py
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
async def set_motors_on(client: RWSClient) -> None:
    """Switch the controller to motors-on state.

    Wraps ``set_controller_state`` with ``ctrl_state="motoron"``.

    Route (delegated): ``POST /rw/panel/ctrlstate`` (action=setctrlstate)

    ABB constraints:
        - Controller must be in AUTO mode.
        - No mastership required.

    Args:
        client: Open ``RWSClient`` instance.

    Returns:
        None. Expects HTTP 204.

    Raises:
        RWSAuthenticationError: On HTTP 401.
        RWSNotFoundError: On HTTP 404.
        RWSHTTPError: On any other HTTP >= 400.

    Example:
        ```python
        async with RWSClient(host="192.168.125.1") as client:
            await set_motors_on(client)
        ```
    """
    await set_controller_state(
        client,
        action="setctrlstate",
        ctrl_state="motoron",
    )
    logger.debug("Motors ON")