Modules
abb_rws_client_python_rw6.highlevel.modules
High-level RAPID module load/unload 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.
load_module_safe(client, *, task, module_path, module_name, domain='rapid')
async
Unload (if present) then load a RAPID module, with mastership.
Composes:
reset_rapid_program_pointer_to_main(action="resetpp")— resets the program pointer so the controller accepts module load/unload operations (ABB requires PP reset before any structural change).post_mastership_domain_request(domain, action="request")post_unload_module_from_rapid_task(task, action="unloadmod", module=module_name)— errors are logged but not re-raised (module may not be loaded yet).load_rapid_module_into_rapid_task(task, action="loadmod", modulepath=module_path)post_mastership_domain_release(domain, action="release")
Mastership is always released in a finally block.
Route (delegated):
- POST /rw/rapid/execution (action=resetpp)
- POST /rw/mastership/{domain} (action=request)
- POST /rw/rapid/tasks/{task} (action=unloadmod)
- POST /rw/rapid/tasks/{task} (action=loadmod)
- POST /rw/mastership/{domain} (action=release)
ABB constraints
resetppmust be called before any module load/unload operation, even when RAPID is already stopped. Omitting it causes HTTP 400 (SYS_CTRL_E_EXEC_STATE).module_pathis a path on the controller filesystem, e.g."$HOME/my_module.mod".module_nameis the RAPID module name (without extension), e.g."my_module".- RAPID mastership required for both load and unload.
domainmust be one of:"rapid","cfg","motion".
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Raises: |
|
|---|
Example
async with RWSClient(host="192.168.125.1") as client:
await load_module_safe(
client,
task="T_ROB1",
module_path="$HOME/my_module.mod",
module_name="my_module",
)
Source code in abb_rws_client_python_rw6/highlevel/modules.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 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 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |