Symbol
abb_rws_client_python_rw6.highlevel.symbol
High-level RAPID symbol introspection 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.
SymbolProperties
dataclass
Parsed RAPID symbol properties from GET /rw/rapid/symbol/properties.
| Parameters: |
|
|---|
Example
>>> props = SymbolProperties(
... symbolurl="RAPID/T_ROB1/TRAJCENTER_CellConfig/trajTools",
... symtyp="per",
... dattyp="trajCenterTool",
... ndim=1,
... dim=(2,),
... local=False,
... readonly=False,
... )
>>> props.dim[0]
2
Source code in abb_rws_client_python_rw6/highlevel/symbol.py
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 | |
get_array_length(client, *, symbolurl, dimension=0)
async
Read the size of one dimension of a RAPID array symbol.
Convenience wrapper over get_symbol_properties for the common case
of discovering a one-based array's usable upper bound at runtime
(e.g. trajTools{N} where N is cell-dependent).
Route (delegated): GET /rw/rapid/symbol/properties/{symbolurl}
ABB constraints
- The symbol must be declared as an array (
ndim >= 1). - RAPID arrays are one-based; the returned length is the number of
valid indexes
1..length.
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Raises: |
|
|---|
Example
async with RWSClient(host="192.168.125.1") as client:
n = await get_array_length(
client,
symbolurl="RAPID/T_ROB1/TRAJCENTER_CellConfig/trajTools",
)
print("trajTools has", n, "entries")
Source code in abb_rws_client_python_rw6/highlevel/symbol.py
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | |
get_symbol_properties(client, *, symbolurl)
async
Read and parse the properties of a RAPID symbol.
Wraps get_rapid_symbol_properties and parses the ABB XML response
into a typed SymbolProperties.
Route (delegated): GET /rw/rapid/symbol/properties/{symbolurl}
ABB constraints
- Not supported in bootserver mode.
- No mastership required for reads.
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Raises: |
|
|---|
Example
async with RWSClient(host="192.168.125.1") as client:
props = await get_symbol_properties(
client,
symbolurl="RAPID/T_ROB1/TRAJCENTER_CellConfig/trajTools",
)
print(props.ndim, props.dim)
Source code in abb_rws_client_python_rw6/highlevel/symbol.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | |