abb-rws-client 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/README.md +48 -20
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,38 @@ All notable changes to `abb-rws-client` are documented here.
|
|
|
4
4
|
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.7.2] — 2026-05-08
|
|
8
|
+
|
|
9
|
+
### Documentation
|
|
10
|
+
|
|
11
|
+
- **Fixed the embarrassing compatibility table** that incorrectly claimed
|
|
12
|
+
RobotWare 7.x / OmniCore was "Not compatible". The package has supported
|
|
13
|
+
both protocols since v0.7.0 — the table was a stale leftover from when
|
|
14
|
+
only RWS 1.0 shipped. Now correctly shows both ✅, with live-tested
|
|
15
|
+
versions called out (RW7.21 + RW6.16).
|
|
16
|
+
- **Documented `RobotManager` higher-level surface** — the README's
|
|
17
|
+
API-reference tables only covered the protocol-level `RwsClient`, so
|
|
18
|
+
callers couldn't see what `RobotManager` adds on top: RMMP, mastership
|
|
19
|
+
status, opmode auto-routing, backup, FK, service-routine call,
|
|
20
|
+
tool/wobj activation, CFG write surface, DIPC messaging, file volumes,
|
|
21
|
+
module source, compress, value validation. New section lists all of
|
|
22
|
+
these with descriptions.
|
|
23
|
+
- **Clarified RWS 2.0 subscription quirks** — the polling-fallback
|
|
24
|
+
paragraph now names the specific RWS 2.0 VC `robapi2_subscription`
|
|
25
|
+
rejection that triggers the fallback, rather than implying it's
|
|
26
|
+
always 5s polling.
|
|
27
|
+
- **Session-pool clarifications** — IRC5's 70-session number was being
|
|
28
|
+
presented as universal; called out OmniCore's also-finite-but-different
|
|
29
|
+
pool with the empirical 503-once-full behaviour we observed during
|
|
30
|
+
protocol probes.
|
|
31
|
+
- **`RobotManager` polling cadence** correctly described as hybrid:
|
|
32
|
+
5 s when WS subscriptions handle state changes, 1 s when polling
|
|
33
|
+
covers everything.
|
|
34
|
+
|
|
35
|
+
No code changes — pure README updates. `RwsClient`, `RwsClient2`,
|
|
36
|
+
`RobotManager`, `MultiRobotManager`, `createClient`, all examples and
|
|
37
|
+
unit tests are bit-for-bit identical to v0.7.1.
|
|
38
|
+
|
|
7
39
|
## [0.7.1] — 2026-05-07
|
|
8
40
|
|
|
9
41
|
### Added
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ Prefer a GUI? The companion VS Code extension gives you live status, motion data
|
|
|
25
25
|
- **Connection lifecycle** — `RobotManager` handles port discovery, polling, WebSocket subscriptions with polling fallback, reconnect-on-failure
|
|
26
26
|
- **Typed adapter pattern** — `IRWSAdapter` lets you write code that works across both protocols
|
|
27
27
|
- **WebSocket subscriptions** for real-time events (panel state, RAPID exec, signals, persvar, elog, jointtarget, …)
|
|
28
|
-
- Session cookie management (avoids the controller's 70-session pool fill)
|
|
28
|
+
- Session cookie management (IRC5: avoids the controller's 70-session pool fill; OmniCore: avoids 503 lockout from session-pool exhaustion)
|
|
29
29
|
- Automatic `/logout` on disconnect to release server-side mastership and free the session slot
|
|
30
30
|
- Request rate limiting (< 20 req/sec)
|
|
31
31
|
- Fully typed public API — every method throws `RwsError` with a typed `code`
|
|
@@ -214,17 +214,40 @@ multi.setActive('cell-B');
|
|
|
214
214
|
```
|
|
215
215
|
|
|
216
216
|
`MultiRobotManager` wraps individual `RobotManager` instances. Each `RobotManager` handles its own:
|
|
217
|
-
- Auto port discovery (probes 5466/9403/443/80/11811, plus a wide-scan fallback)
|
|
218
|
-
- Protocol auto-detection (Digest
|
|
219
|
-
-
|
|
220
|
-
- WebSocket subscriptions with automatic polling fallback
|
|
221
|
-
- Reconnect-on-failure (3-strike)
|
|
222
|
-
- Clean
|
|
217
|
+
- Auto port discovery (probes 5466 / 9403 / 443 / 80 / 11811 in that order, plus a wide-scan fallback when none of those answer — RobotStudio assigns random VC ports above 30000)
|
|
218
|
+
- Protocol auto-detection (`WWW-Authenticate: Digest` → RWS 1.0; `Basic` → RWS 2.0)
|
|
219
|
+
- Hybrid polling cadence: **5 s when WebSocket subscriptions are active** (positions only — state-change resources stream over WS); **1 s when subscriptions failed** (full state coverage via polling)
|
|
220
|
+
- WebSocket subscriptions with automatic polling fallback (RWS 2.0 VC notably rejects the `robapi2_subscription` subprotocol — fallback kicks in)
|
|
221
|
+
- Reconnect-on-failure (3-strike, surfaces via `onError` listener)
|
|
222
|
+
- Clean `GET /logout` on disconnect — releases server-side mastership and frees the session slot
|
|
223
223
|
|
|
224
224
|
You can also create a `RobotManager` directly if you only have one robot.
|
|
225
225
|
|
|
226
226
|
---
|
|
227
227
|
|
|
228
|
+
## `RobotManager` — higher-level surface
|
|
229
|
+
|
|
230
|
+
`RobotManager` wraps either client with operational helpers that handle mastership, polling, and protocol differences for you. In addition to delegating every protocol method to the underlying client, it exposes:
|
|
231
|
+
|
|
232
|
+
- **`getRmmpPrivilege()`**, **`requestRmmp(level)`** — Remote Mastership Privilege management. Required on OmniCore in AUTO mode for any modify op.
|
|
233
|
+
- **`getMastershipStatus(domain?)`** — read who currently holds rapid/cfg/motion mastership (uid + application name).
|
|
234
|
+
- **`setOperationMode('AUTO' | 'MANR' | 'MANF')`** — VC-only switch with auto-routing through MANR for AUTO ↔ MANF (the controller rejects direct transitions). Acquires `edit` mastership for the higher-privilege direction.
|
|
235
|
+
- **`setSpeedRatio(0..100)`** — wraps `edit` mastership; uses the live-verified `?action=setspeedratio&speed-ratio=N` form on RWS 2.0 (the bare endpoint returns 400).
|
|
236
|
+
- **`createBackup(name)`**, **`restoreBackup(name)`**, **`getBackupStatus()`**, **`listBackups()`** — `/ctrl/backup/...`
|
|
237
|
+
- **`callServiceRoutine(task, name, args?)`** — invoke a service routine remotely (calibration, brake check, etc.).
|
|
238
|
+
- **`calcJointsFromCartesian(...)`** — inverse kinematics. **`calcCartesianFromJoints(...)`** — forward kinematics.
|
|
239
|
+
- **`setActiveTool(mechunit, name)`**, **`setActiveWobj(mechunit, name)`** — switch active persistent tooldata / wobjdata.
|
|
240
|
+
- **CFG write** — `setCfgInstance` / `createCfgInstance` / `removeCfgInstance` / `loadCfgFile` / `saveCfgFile`. Each acquires `edit` mastership for the duration.
|
|
241
|
+
- **DIPC** — `listDipcQueues` / `createDipcQueue` / `sendDipcMessage` / `readDipcMessage` / `removeDipcQueue`. Bidirectional messaging between RAPID and external clients.
|
|
242
|
+
- **`listFileVolumes()`** — every controller volume (HOME, BACKUP, DATA, ADDINDATA, PRODUCTS, RAMDISK, TEMP).
|
|
243
|
+
- **`getModuleSource(task, name)`** — pull a module's RAPID text in one call.
|
|
244
|
+
- **`compressPath(source, dest)`** — controller-side compression.
|
|
245
|
+
- **`validateRapidValue(task, value, datatype)`** — pre-flight a literal before writing.
|
|
246
|
+
|
|
247
|
+
Every method returns `Promise<...>` and throws `RwsError` on failure.
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
228
251
|
## Logging
|
|
229
252
|
|
|
230
253
|
The lib ships a no-op logger by default. Hosts (CLIs, services, the VS Code extension) install their own:
|
|
@@ -460,7 +483,7 @@ try {
|
|
|
460
483
|
|
|
461
484
|
## Session Persistence
|
|
462
485
|
|
|
463
|
-
|
|
486
|
+
IRC5 controllers allow a maximum of **70 concurrent RWS sessions**; OmniCore controllers also have a finite session pool (the exact number isn't published, but heavy probing without `/logout` returns HTTP 503 once it fills). Persist the session cookie across restarts to always reuse the same slot — the lib calls `/logout` on `disconnect()` to free the slot cleanly, but a saved cookie is the most robust path:
|
|
464
487
|
|
|
465
488
|
```ts
|
|
466
489
|
import fs from 'fs';
|
|
@@ -481,14 +504,16 @@ await client.connect(); // reuses the existing session slot
|
|
|
481
504
|
|
|
482
505
|
## Rate Limits
|
|
483
506
|
|
|
484
|
-
| Constraint | Value |
|
|
485
|
-
|
|
486
|
-
| Max request rate | 20 req/sec |
|
|
487
|
-
| Client
|
|
488
|
-
| Max concurrent sessions | 70 |
|
|
489
|
-
| Session inactivity timeout | 5 minutes |
|
|
490
|
-
| Max session lifetime | 25 minutes |
|
|
491
|
-
| Max file upload | 800 MB |
|
|
507
|
+
| Constraint | Value | Source |
|
|
508
|
+
|------------|-------|--------|
|
|
509
|
+
| Max request rate | 20 req/sec | Both protocols (controller-enforced) |
|
|
510
|
+
| Client-enforced interval | 55 ms between requests | This package, default |
|
|
511
|
+
| Max concurrent sessions | 70 (IRC5) / finite (OmniCore) | Controller-enforced |
|
|
512
|
+
| Session inactivity timeout | 5 minutes (IRC5) | Controller-enforced |
|
|
513
|
+
| Max session lifetime | 25 minutes (IRC5) | Controller-enforced |
|
|
514
|
+
| Max file upload | 800 MB (IRC5) | Controller-enforced; OmniCore is similar |
|
|
515
|
+
|
|
516
|
+
OmniCore-specific limits aren't fully documented by ABB; what the lib observes empirically matches the IRC5 numbers within an order of magnitude.
|
|
492
517
|
|
|
493
518
|
---
|
|
494
519
|
|
|
@@ -496,10 +521,13 @@ await client.connect(); // reuses the existing session slot
|
|
|
496
521
|
|
|
497
522
|
| | RobotWare 6.x (RWS 1.0) | RobotWare 7.x (RWS 2.0) |
|
|
498
523
|
|--|--|--|
|
|
499
|
-
| This package | ✅
|
|
500
|
-
| IRC5 controller | ✅ | n/a |
|
|
501
|
-
| OmniCore controller | n/a |
|
|
502
|
-
| RobotStudio virtual | ✅ (
|
|
524
|
+
| This package | ✅ `RwsClient` | ✅ `RwsClient2` |
|
|
525
|
+
| IRC5 controller (real) | ✅ | n/a |
|
|
526
|
+
| OmniCore controller (real) | n/a | ✅ |
|
|
527
|
+
| RobotStudio virtual controller | ✅ (RW6.x VC) | ✅ (RW7.x VC) |
|
|
528
|
+
| Auto-detect from one entry point | ✅ via `createClient()` | ✅ via `createClient()` |
|
|
529
|
+
|
|
530
|
+
**Live-tested matrix** as of v0.7.1: RobotWare 7.21 (OmniCore VC, RWS 2.0), RobotWare 6.16 (IRC5 VC, RWS 1.0). 116 unit tests + 339 live protocol-coverage tests pass against both.
|
|
503
531
|
|
|
504
532
|
---
|
|
505
533
|
|
package/package.json
CHANGED