@synapticon/motion-master-client 6.0.0-alpha.70 → 6.0.0-alpha.71
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/dist/generated/Api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AlStatusCode, BrakeState, Cia402Status, DcSyncStatus, DeviceDiagnostics, DeviceFile, DeviceParameter, EscRegister, EsiParseResult, FirmwareCompatibility, FirmwarePackageName, FoeErrorCode, GameLoopHealth, HardwareDescription, HrdRecording, IntegroVariant, IntegroVariantOption, MailboxErrorCode, Monitoring, ObjectDataTypeInfo, OutputStageResult, ParameterCacheEntry, PdoMapping, PdoMappingRequest, ProcedureListing, ProcedureRequest, ProcedureSnapshot, ProcessDataWatchdog, ProcessImageObject, SdoAbortCode, SlaveConfig, SlaveInformationInterface, UserCacheListing } from "./data-contracts.js";
|
|
1
|
+
import { AlStatusCode, BrakeState, Cia402Status, DcSyncStatus, DeviceDiagnostics, DeviceFile, DeviceParameter, EscRegister, EsiParseResult, FirmwareCompatibility, FirmwarePackageName, FoeErrorCode, GameLoopHealth, HardwareDescription, HrdRecording, IntegroVariant, IntegroVariantOption, MailboxErrorCode, Monitoring, ObjectDataTypeInfo, OperationModes, OutputStageResult, ParameterCacheEntry, PdoMapping, PdoMappingRequest, ProcedureListing, ProcedureRequest, ProcedureSnapshot, ProcessDataWatchdog, ProcessImageObject, SdoAbortCode, SlaveConfig, SlaveInformationInterface, UserCacheListing } from "./data-contracts.js";
|
|
2
2
|
import { HttpClient, RequestParams } from "./http-client.js";
|
|
3
3
|
export declare class Api<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
|
|
4
4
|
/**
|
|
@@ -396,6 +396,52 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
396
396
|
* @request GET:/api/meta/sdo-abort-codes
|
|
397
397
|
*/
|
|
398
398
|
getSdoAbortCodes: (params?: RequestParams) => Promise<import("./http-client.js").HttpResponse<SdoAbortCode[], any>>;
|
|
399
|
+
/**
|
|
400
|
+
* @description The register map of the Integro's internal (Kübler) encoder — the reference table for POST /api/devices/{slavePosition}/procedures/kuebler-register-communication, and documentation in its own right. Static: it describes the encoder type, not any connected device, so it needs no bus and no scan. Transcribed from the vendor's own draft table. Each entry carries the width, the access type, whether the encoder actually implements it — seven are documented but not implemented — and the vendor's bit definitions verbatim, which for a bit-field register is the only place its meaning is recorded. `format` says how to read the assembled value, because signedness is not uniform and one register is not a single number at all: `unsigned`, `signed`, `bitField` (the number means nothing on its own), or `signedHalves` — two signed 16-bit values packed into 32 bits, which register 0x3C is the only case of. `readableInOneCommand` is false for the one 64-bit register, since the command's length byte caps at 4 bytes.
|
|
401
|
+
*
|
|
402
|
+
* @name GetKueblerRegisters
|
|
403
|
+
* @summary The Integro internal encoder's register map
|
|
404
|
+
* @request GET:/api/meta/kuebler-registers
|
|
405
|
+
*/
|
|
406
|
+
getKueblerRegisters: (params?: RequestParams) => Promise<import("./http-client.js").HttpResponse<{
|
|
407
|
+
/**
|
|
408
|
+
* Register address, as OS command 19 carries it.
|
|
409
|
+
* @example 48
|
|
410
|
+
*/
|
|
411
|
+
address: number;
|
|
412
|
+
/**
|
|
413
|
+
* Width in bits — 8, 16, 32, or 64.
|
|
414
|
+
* @example 32
|
|
415
|
+
*/
|
|
416
|
+
bits: number;
|
|
417
|
+
/**
|
|
418
|
+
* The vendor's own name for the register.
|
|
419
|
+
* @example "Absolute position ST"
|
|
420
|
+
*/
|
|
421
|
+
name: string;
|
|
422
|
+
/** @example "ro" */
|
|
423
|
+
access: "ro" | "wo" | "rw";
|
|
424
|
+
/**
|
|
425
|
+
* Whether the encoder implements it, per the vendor's draft.
|
|
426
|
+
* @example true
|
|
427
|
+
*/
|
|
428
|
+
implemented: boolean;
|
|
429
|
+
/**
|
|
430
|
+
* How to read the assembled value.
|
|
431
|
+
* @example "unsigned"
|
|
432
|
+
*/
|
|
433
|
+
format: "unsigned" | "signed" | "bitField" | "signedHalves";
|
|
434
|
+
/**
|
|
435
|
+
* The vendor's bit definitions, clauses joined with "; ".
|
|
436
|
+
* @example "Left aligned 32 bit singleturn position"
|
|
437
|
+
*/
|
|
438
|
+
definition: string;
|
|
439
|
+
/**
|
|
440
|
+
* False only for the 64-bit register, which exceeds the command's 4-byte length field.
|
|
441
|
+
* @example true
|
|
442
|
+
*/
|
|
443
|
+
readableInOneCommand: boolean;
|
|
444
|
+
}[], any>>;
|
|
399
445
|
/**
|
|
400
446
|
* @description Returns the static catalogue of CoE mailbox error codes defined in ETG.1000.4, Table 30 ("Error Reply Service Data"). A slave returns one of these when the mailbox layer (below a specific protocol such as CoE/FoE) rejects a transfer; the code is embedded in the error text the mailbox endpoints return.
|
|
401
447
|
*
|
|
@@ -616,7 +662,15 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
616
662
|
*/
|
|
617
663
|
getCia402Status: (slavePosition: number, params?: RequestParams) => Promise<import("./http-client.js").HttpResponse<Cia402Status, void>>;
|
|
618
664
|
/**
|
|
619
|
-
* @description
|
|
665
|
+
* @description Every operation mode the device has, standard and manufacturer-specific, with what the drive says about each. The standard modes are CiA402's (ETG.6010 §6.8.1) and carry the bit of "Supported drive modes" (0x6502) that advertises them, decoded into `supported`. The manufacturer modes are the vendor's own — the negative half of 0x6060 — and are listed only for a device whose vendor this server knows; their `supported` is null, because 0x6502 reserves bits 16-31 for the vendor without defining them, so a drive has no way to advertise one that a master could read. That null means "the drive does not say", not "no". Read this once per device and cache it: it is a static property of the firmware, and the one thing that makes a negative value of 0x6061 nameable rather than "Unknown".
|
|
666
|
+
*
|
|
667
|
+
* @name GetOperationModes
|
|
668
|
+
* @summary List a device's operation modes
|
|
669
|
+
* @request GET:/api/devices/{slavePosition}/operation-modes
|
|
670
|
+
*/
|
|
671
|
+
getOperationModes: (slavePosition: number, params?: RequestParams) => Promise<import("./http-client.js").HttpResponse<OperationModes, void>>;
|
|
672
|
+
/**
|
|
673
|
+
* @description Writes the requested operation mode to 0x6060 and returns the resulting control snapshot. The drive reflects the accepted mode in 0x6061 (the modeOfOperation of the response) once it takes effect. Any value object 0x6060 can hold is accepted, standard or manufacturer-specific — the negative half of that range belongs to the vendor, so a SOMANET's diagnostics (-2) or system identification (-4) go through here like any other. Whether a given drive has the mode is the drive's answer, seen in the modeOfOperation of the response; GET /api/devices/{slavePosition}/operation-modes is what lists them beforehand.
|
|
620
674
|
*
|
|
621
675
|
* @name SetCia402OperationMode
|
|
622
676
|
* @summary Set a device's CiA402 operation mode
|
|
@@ -624,13 +678,29 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
624
678
|
*/
|
|
625
679
|
setCia402OperationMode: (slavePosition: number, data: {
|
|
626
680
|
/**
|
|
627
|
-
*
|
|
681
|
+
* Operation mode to request (the 0x6060 value). Standard modes are 0 NoMode, 1 Profile Position, 2 Velocity, 3 Profile Velocity, 4 Profile Torque, 6 Homing, 7 Interpolated Position, 8 Cyclic Sync Position, 9 Cyclic Sync Velocity, 10 Cyclic Sync Torque, 11 Cyclic Sync Torque with Commutation Angle; negative values are the vendor's.
|
|
682
|
+
* @min -128
|
|
683
|
+
* @max 127
|
|
628
684
|
* @example 9
|
|
629
685
|
*/
|
|
630
686
|
mode: number;
|
|
631
687
|
}, params?: RequestParams) => Promise<import("./http-client.js").HttpResponse<Cia402Status, void>>;
|
|
632
688
|
/**
|
|
633
|
-
* @description
|
|
689
|
+
* @description Walks the CiA402 device-control state machine to the state you name, issuing whatever transitions that takes and re-reading the drive between each — so multi-hop paths are ordinary: Switch On Disabled up to Operation Enabled, Quick Stop Active back down to Ready To Switch On. Starting from Fault begins with a fault reset, and a fault whose cause is still present is reported as such (with the drive's 0x603F error code) rather than as a timeout. Only the five states a master can command are accepted. Not Ready To Switch On, Fault Reaction Active and Fault are entered by the drive itself and are rejected as a bad request. **Asking for Operation Enabled while the drive is in Quick Stop Active leaves that quick stop** (CiA402 transition 16), because naming the destination is an explicit instruction to go there. The "enable" command on the sibling endpoint deliberately does not, so a procedure preparing a drive cannot undo somebody's stop by accident. The device must be exchanging process data for any of this to progress — the statusword has to update between polls, and the firmware refuses Operation Enabled unless master communication is live. Returns the resulting control snapshot.
|
|
690
|
+
*
|
|
691
|
+
* @name TransitionToCia402State
|
|
692
|
+
* @summary Bring a drive to a CiA402 state
|
|
693
|
+
* @request POST:/api/devices/{slavePosition}/cia402/state
|
|
694
|
+
*/
|
|
695
|
+
transitionToCia402State: (slavePosition: number, data: {
|
|
696
|
+
/**
|
|
697
|
+
* The state to bring the drive to.
|
|
698
|
+
* @example "OperationEnabled"
|
|
699
|
+
*/
|
|
700
|
+
state: "SwitchOnDisabled" | "ReadyToSwitchOn" | "SwitchedOn" | "OperationEnabled" | "QuickStopActive";
|
|
701
|
+
}, params?: RequestParams) => Promise<import("./http-client.js").HttpResponse<Cia402Status, void>>;
|
|
702
|
+
/**
|
|
703
|
+
* @description Drives the CiA402 device-control state machine. "enable" walks every intermediate transition to Operation Enabled (clearing a fault first if needed); "disable" goes to Switch On Disabled; "quickStop" triggers a quick stop; "faultReset" clears a latched fault. The device must be exchanging process data for "enable" to make progress. Returns the resulting control snapshot. Use POST /api/devices/{slavePosition}/cia402/state to name a destination instead of an action — it reaches states these four cannot, and it is the one that will leave a quick stop. "enable" here deliberately will not.
|
|
634
704
|
*
|
|
635
705
|
* @name RunCia402Command
|
|
636
706
|
* @summary Run a CiA402 state-machine command
|
package/dist/generated/Api.js
CHANGED
|
@@ -219,6 +219,19 @@ export class Api extends HttpClient {
|
|
|
219
219
|
format: "json",
|
|
220
220
|
...params,
|
|
221
221
|
});
|
|
222
|
+
/**
|
|
223
|
+
* @description The register map of the Integro's internal (Kübler) encoder — the reference table for POST /api/devices/{slavePosition}/procedures/kuebler-register-communication, and documentation in its own right. Static: it describes the encoder type, not any connected device, so it needs no bus and no scan. Transcribed from the vendor's own draft table. Each entry carries the width, the access type, whether the encoder actually implements it — seven are documented but not implemented — and the vendor's bit definitions verbatim, which for a bit-field register is the only place its meaning is recorded. `format` says how to read the assembled value, because signedness is not uniform and one register is not a single number at all: `unsigned`, `signed`, `bitField` (the number means nothing on its own), or `signedHalves` — two signed 16-bit values packed into 32 bits, which register 0x3C is the only case of. `readableInOneCommand` is false for the one 64-bit register, since the command's length byte caps at 4 bytes.
|
|
224
|
+
*
|
|
225
|
+
* @name GetKueblerRegisters
|
|
226
|
+
* @summary The Integro internal encoder's register map
|
|
227
|
+
* @request GET:/api/meta/kuebler-registers
|
|
228
|
+
*/
|
|
229
|
+
getKueblerRegisters = (params = {}) => this.request({
|
|
230
|
+
path: `/api/meta/kuebler-registers`,
|
|
231
|
+
method: "GET",
|
|
232
|
+
format: "json",
|
|
233
|
+
...params,
|
|
234
|
+
});
|
|
222
235
|
/**
|
|
223
236
|
* @description Returns the static catalogue of CoE mailbox error codes defined in ETG.1000.4, Table 30 ("Error Reply Service Data"). A slave returns one of these when the mailbox layer (below a specific protocol such as CoE/FoE) rejects a transfer; the code is embedded in the error text the mailbox endpoints return.
|
|
224
237
|
*
|
|
@@ -413,7 +426,20 @@ export class Api extends HttpClient {
|
|
|
413
426
|
...params,
|
|
414
427
|
});
|
|
415
428
|
/**
|
|
416
|
-
* @description
|
|
429
|
+
* @description Every operation mode the device has, standard and manufacturer-specific, with what the drive says about each. The standard modes are CiA402's (ETG.6010 §6.8.1) and carry the bit of "Supported drive modes" (0x6502) that advertises them, decoded into `supported`. The manufacturer modes are the vendor's own — the negative half of 0x6060 — and are listed only for a device whose vendor this server knows; their `supported` is null, because 0x6502 reserves bits 16-31 for the vendor without defining them, so a drive has no way to advertise one that a master could read. That null means "the drive does not say", not "no". Read this once per device and cache it: it is a static property of the firmware, and the one thing that makes a negative value of 0x6061 nameable rather than "Unknown".
|
|
430
|
+
*
|
|
431
|
+
* @name GetOperationModes
|
|
432
|
+
* @summary List a device's operation modes
|
|
433
|
+
* @request GET:/api/devices/{slavePosition}/operation-modes
|
|
434
|
+
*/
|
|
435
|
+
getOperationModes = (slavePosition, params = {}) => this.request({
|
|
436
|
+
path: `/api/devices/${slavePosition}/operation-modes`,
|
|
437
|
+
method: "GET",
|
|
438
|
+
format: "json",
|
|
439
|
+
...params,
|
|
440
|
+
});
|
|
441
|
+
/**
|
|
442
|
+
* @description Writes the requested operation mode to 0x6060 and returns the resulting control snapshot. The drive reflects the accepted mode in 0x6061 (the modeOfOperation of the response) once it takes effect. Any value object 0x6060 can hold is accepted, standard or manufacturer-specific — the negative half of that range belongs to the vendor, so a SOMANET's diagnostics (-2) or system identification (-4) go through here like any other. Whether a given drive has the mode is the drive's answer, seen in the modeOfOperation of the response; GET /api/devices/{slavePosition}/operation-modes is what lists them beforehand.
|
|
417
443
|
*
|
|
418
444
|
* @name SetCia402OperationMode
|
|
419
445
|
* @summary Set a device's CiA402 operation mode
|
|
@@ -428,7 +454,22 @@ export class Api extends HttpClient {
|
|
|
428
454
|
...params,
|
|
429
455
|
});
|
|
430
456
|
/**
|
|
431
|
-
* @description
|
|
457
|
+
* @description Walks the CiA402 device-control state machine to the state you name, issuing whatever transitions that takes and re-reading the drive between each — so multi-hop paths are ordinary: Switch On Disabled up to Operation Enabled, Quick Stop Active back down to Ready To Switch On. Starting from Fault begins with a fault reset, and a fault whose cause is still present is reported as such (with the drive's 0x603F error code) rather than as a timeout. Only the five states a master can command are accepted. Not Ready To Switch On, Fault Reaction Active and Fault are entered by the drive itself and are rejected as a bad request. **Asking for Operation Enabled while the drive is in Quick Stop Active leaves that quick stop** (CiA402 transition 16), because naming the destination is an explicit instruction to go there. The "enable" command on the sibling endpoint deliberately does not, so a procedure preparing a drive cannot undo somebody's stop by accident. The device must be exchanging process data for any of this to progress — the statusword has to update between polls, and the firmware refuses Operation Enabled unless master communication is live. Returns the resulting control snapshot.
|
|
458
|
+
*
|
|
459
|
+
* @name TransitionToCia402State
|
|
460
|
+
* @summary Bring a drive to a CiA402 state
|
|
461
|
+
* @request POST:/api/devices/{slavePosition}/cia402/state
|
|
462
|
+
*/
|
|
463
|
+
transitionToCia402State = (slavePosition, data, params = {}) => this.request({
|
|
464
|
+
path: `/api/devices/${slavePosition}/cia402/state`,
|
|
465
|
+
method: "POST",
|
|
466
|
+
body: data,
|
|
467
|
+
type: ContentType.Json,
|
|
468
|
+
format: "json",
|
|
469
|
+
...params,
|
|
470
|
+
});
|
|
471
|
+
/**
|
|
472
|
+
* @description Drives the CiA402 device-control state machine. "enable" walks every intermediate transition to Operation Enabled (clearing a fault first if needed); "disable" goes to Switch On Disabled; "quickStop" triggers a quick stop; "faultReset" clears a latched fault. The device must be exchanging process data for "enable" to make progress. Returns the resulting control snapshot. Use POST /api/devices/{slavePosition}/cia402/state to name a destination instead of an action — it reaches states these four cannot, and it is the one that will leave a quick stop. "enable" here deliberately will not.
|
|
432
473
|
*
|
|
433
474
|
* @name RunCia402Command
|
|
434
475
|
* @summary Run a CiA402 state-machine command
|
|
@@ -27,11 +27,69 @@ export interface Cia402Status {
|
|
|
27
27
|
*/
|
|
28
28
|
modeName: string;
|
|
29
29
|
/**
|
|
30
|
-
* The setpoint currently commanded for the active mode — target position 0x607A (PP/CSP), velocity 0x60FF (PV/CSV), or torque 0x6071 (PT/CST), widened to INTEGER32. 0 only when the active mode has no linear setpoint (NoMode / Homing).
|
|
30
|
+
* The setpoint currently commanded for the active mode — target position 0x607A (PP/CSP), velocity 0x60FF (PV/CSV), or torque 0x6071 (PT/CST), widened to INTEGER32. 0 only when the active mode has no linear setpoint (NoMode / Homing / vl / ip).
|
|
31
31
|
* @example 100000
|
|
32
32
|
*/
|
|
33
33
|
target: number;
|
|
34
34
|
}
|
|
35
|
+
/** Every operation mode a device has, with what its "Supported drive modes" field (0x6502) says about each. */
|
|
36
|
+
export interface OperationModes {
|
|
37
|
+
/**
|
|
38
|
+
* Object 0x6502 verbatim, as an UNSIGNED32.
|
|
39
|
+
* @example 197549
|
|
40
|
+
*/
|
|
41
|
+
supportedDriveModes: number;
|
|
42
|
+
/**
|
|
43
|
+
* The set bits of 0x6502 from bit 16 upwards, reported as bit numbers and nothing more. The profile leaves their meaning entirely to the vendor, so nothing here can decode them — a SOMANET drive sets bits 16 and 17 and publishes no definition for either.
|
|
44
|
+
* @example [16,17]
|
|
45
|
+
*/
|
|
46
|
+
manufacturerBits: number[];
|
|
47
|
+
/** Every mode, ascending by value — manufacturer modes first, then standard. */
|
|
48
|
+
modes: OperationMode[];
|
|
49
|
+
}
|
|
50
|
+
/** One operation mode of one device. */
|
|
51
|
+
export interface OperationMode {
|
|
52
|
+
/**
|
|
53
|
+
* The value written to 0x6060 / read from 0x6061. Negative for a vendor mode.
|
|
54
|
+
* @example -2
|
|
55
|
+
*/
|
|
56
|
+
value: number;
|
|
57
|
+
/**
|
|
58
|
+
* PascalCase identifier, matching the modeName of GET /api/devices/{n}/cia402.
|
|
59
|
+
* @example "Diagnostics"
|
|
60
|
+
*/
|
|
61
|
+
name: string;
|
|
62
|
+
/**
|
|
63
|
+
* The profile's or the vendor's own wording, for a user-facing list.
|
|
64
|
+
* @example "Diagnostics mode"
|
|
65
|
+
*/
|
|
66
|
+
label: string;
|
|
67
|
+
/**
|
|
68
|
+
* Whether CiA402 or the vendor defines this mode.
|
|
69
|
+
* @example "manufacturer"
|
|
70
|
+
*/
|
|
71
|
+
kind: "standard" | "manufacturer";
|
|
72
|
+
/**
|
|
73
|
+
* The bit of 0x6502 that advertises this mode. Null for every manufacturer mode, and for NoMode, which is always legal and so has no bit.
|
|
74
|
+
* @example 7
|
|
75
|
+
*/
|
|
76
|
+
bit: number | null;
|
|
77
|
+
/**
|
|
78
|
+
* The profile's short form (pp, vl, pv, tq, hm, ip, csp, csv, cst, cstca).
|
|
79
|
+
* @example "csp"
|
|
80
|
+
*/
|
|
81
|
+
abbreviation: string | null;
|
|
82
|
+
/**
|
|
83
|
+
* Whether the drive advertises this mode. Null for every manufacturer mode — 0x6502 has no bit a master could read for one — which means "the drive does not say", not "no".
|
|
84
|
+
* @example true
|
|
85
|
+
*/
|
|
86
|
+
supported: boolean | null;
|
|
87
|
+
/**
|
|
88
|
+
* Present and true only for a mode the vendor's firmware marks deprecated.
|
|
89
|
+
* @example true
|
|
90
|
+
*/
|
|
91
|
+
deprecated?: boolean;
|
|
92
|
+
}
|
|
35
93
|
/** Point-in-time health of the real-time game loop. Times are nanoseconds; rates are hertz. All fields are diagnostic (relaxed reads), not synchronised. */
|
|
36
94
|
export interface GameLoopHealth {
|
|
37
95
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synapticon/motion-master-client",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.71",
|
|
4
4
|
"description": "Isomorphic TypeScript client for Motion Master: the generated HTTP API client, the WebSocket connection, and helpers.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|