@synapticon/motion-master-client 6.0.0-alpha.95 → 6.0.0-alpha.97
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, AutoTuningError, AutoTuningRunRequest, AutoTuningRunResponse, AutoTuningStatus, BrakeState, Cia402Status, DcSyncStatus, DeviceDiagnostics, DeviceFile, DeviceParameter, EscRegister, EsiParseResult, FirmwareCompatibility, FirmwarePackageName, FoeErrorCode, GameLoopHealth, HardwareDescription, HrdRecording, IntegroVariant, IntegroVariantOption, MailboxErrorCode, Monitoring, ObjectDataTypeInfo, OperationModes, OutputStageResult, ParameterCacheEntry, ParameterValue, PdoMapping, PdoMappingRequest, ProcedureListing, ProcedureRequest, ProcedureSnapshot, ProcessDataWatchdog, ProcessImageObject, SdoAbortCode, SlaveConfig, SlaveInformationInterface, UserCacheListing } from "./data-contracts.js";
|
|
1
|
+
import { AlStatusCode, AutoTuningError, AutoTuningRunRequest, AutoTuningRunResponse, AutoTuningStatus, BrakeState, Cia402Status, DcSyncStatus, DeviceDiagnostics, DeviceFile, DeviceParameter, Encoders, EscRegister, EsiParseResult, FirmwareCompatibility, FirmwarePackageName, FoeErrorCode, GameLoopHealth, HardwareDescription, HrdRecording, IntegroVariant, IntegroVariantOption, MailboxErrorCode, Monitoring, ObjectDataTypeInfo, OperationModes, OutputStageResult, ParameterCacheEntry, ParameterValue, 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
|
/**
|
|
@@ -915,6 +915,31 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
915
915
|
*/
|
|
916
916
|
value: number;
|
|
917
917
|
}, params?: RequestParams) => Promise<import("./http-client.js").HttpResponse<void, void>>;
|
|
918
|
+
/**
|
|
919
|
+
* @description Copies the actual value into the target of one kind: position actual value (0x6064) into target position (0x607A), velocity actual value (0x606C) into target velocity (0x60FF), or torque actual value (0x6077) into target torque (0x6071). Without `kind` the pair is the one the active operation mode (0x6061) acts on. A drive holds its actual position only until the first setpoint reaches it. In CSP the master sends 0x607A every cycle, so a drive enabled with a stale target position steps to it at once, and that step can pull the supply down. Call this before you enable a drive in CSP. Motion Master never does it on its own: an enable writes the controlword and nothing else.
|
|
920
|
+
*
|
|
921
|
+
* @name SetCia402TargetToActual
|
|
922
|
+
* @summary Set a CiA402 target to its actual value
|
|
923
|
+
* @request POST:/api/devices/{slavePosition}/cia402/target/actual
|
|
924
|
+
*/
|
|
925
|
+
setCia402TargetToActual: (slavePosition: number, query?: {
|
|
926
|
+
/**
|
|
927
|
+
* Which pair to copy. Omit it to copy the pair of the active operation mode.
|
|
928
|
+
* @example "position"
|
|
929
|
+
*/
|
|
930
|
+
kind?: "position" | "velocity" | "torque";
|
|
931
|
+
}, params?: RequestParams) => Promise<import("./http-client.js").HttpResponse<{
|
|
932
|
+
/**
|
|
933
|
+
* The pair that was copied.
|
|
934
|
+
* @example "position"
|
|
935
|
+
*/
|
|
936
|
+
kind: "position" | "velocity" | "torque";
|
|
937
|
+
/**
|
|
938
|
+
* The value written, in the object's own units. Torque is per mille of rated, widened from INTEGER16.
|
|
939
|
+
* @example 123456
|
|
940
|
+
*/
|
|
941
|
+
value: number;
|
|
942
|
+
}, void>>;
|
|
918
943
|
/**
|
|
919
944
|
* @description Returns every procedure available on the device, each with its descriptor and the state of its current or last run. One request is enough to render a whole per-device procedures view: the descriptor carries the title, description and caveats to display, and the snapshot says whether anything is running or how the last run went. The list is per device, not global — a procedure is offered only where it applies, so a third-party slave reports an empty list rather than controls that could only ever fail. A procedure that has never run reports an idle snapshot (`status` `idle`, `runCount` 0, every step `idle`), so every entry has the same shape.
|
|
920
945
|
*
|
|
@@ -947,6 +972,14 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
|
|
|
947
972
|
* @request DELETE:/api/devices/{slavePosition}/procedures/{procedureName}
|
|
948
973
|
*/
|
|
949
974
|
cancelProcedure: (slavePosition: number, procedureName: string, params?: RequestParams) => Promise<import("./http-client.js").HttpResponse<void, void>>;
|
|
975
|
+
/**
|
|
976
|
+
* @description Reports both encoder configuration records, 0x2110 (encoder 1) and 0x2112 (encoder 2), and the encoder each controller uses: position control from 0x2012:09, velocity control from 0x2011:05, commutation from 0x2010:0C. A record whose type is `none` is still listed, because the controller fields refer to the ordinal. Read this to learn what one revolution is in position counts. A position in 0x6064 or 0x607A is in counts of the position encoder, unscaled by the gear ratio (0x6091), so one revolution of that encoder is its `resolution`. The feed constant (0x6092) is not applied here.
|
|
977
|
+
*
|
|
978
|
+
* @name GetEncoders
|
|
979
|
+
* @summary Read a SOMANET drive's encoders and which controller uses which
|
|
980
|
+
* @request GET:/api/devices/{slavePosition}/encoders
|
|
981
|
+
*/
|
|
982
|
+
getEncoders: (slavePosition: number, params?: RequestParams) => Promise<import("./http-client.js").HttpResponse<Encoders, void>>;
|
|
950
983
|
/**
|
|
951
984
|
* @description Reports the brake objects (0x2004) that decide what a release or engage will do: its current state, the release strategy, the pull time and the pull/hold voltages. Read this before commanding the brake. `softwareControllable` is false when the release strategy is `manualOutputVoltage`, meaning the firmware does not drive the brake at all and both commands below are no-ops. `releaseMovesShaft` is true for a pin brake, whose release procedure turns the motor to lift the load off the pin.
|
|
952
985
|
*
|
package/dist/generated/Api.js
CHANGED
|
@@ -563,6 +563,20 @@ export class Api extends HttpClient {
|
|
|
563
563
|
type: ContentType.Json,
|
|
564
564
|
...params,
|
|
565
565
|
});
|
|
566
|
+
/**
|
|
567
|
+
* @description Copies the actual value into the target of one kind: position actual value (0x6064) into target position (0x607A), velocity actual value (0x606C) into target velocity (0x60FF), or torque actual value (0x6077) into target torque (0x6071). Without `kind` the pair is the one the active operation mode (0x6061) acts on. A drive holds its actual position only until the first setpoint reaches it. In CSP the master sends 0x607A every cycle, so a drive enabled with a stale target position steps to it at once, and that step can pull the supply down. Call this before you enable a drive in CSP. Motion Master never does it on its own: an enable writes the controlword and nothing else.
|
|
568
|
+
*
|
|
569
|
+
* @name SetCia402TargetToActual
|
|
570
|
+
* @summary Set a CiA402 target to its actual value
|
|
571
|
+
* @request POST:/api/devices/{slavePosition}/cia402/target/actual
|
|
572
|
+
*/
|
|
573
|
+
setCia402TargetToActual = (slavePosition, query, params = {}) => this.request({
|
|
574
|
+
path: `/api/devices/${slavePosition}/cia402/target/actual`,
|
|
575
|
+
method: "POST",
|
|
576
|
+
query: query,
|
|
577
|
+
format: "json",
|
|
578
|
+
...params,
|
|
579
|
+
});
|
|
566
580
|
/**
|
|
567
581
|
* @description Returns every procedure available on the device, each with its descriptor and the state of its current or last run. One request is enough to render a whole per-device procedures view: the descriptor carries the title, description and caveats to display, and the snapshot says whether anything is running or how the last run went. The list is per device, not global — a procedure is offered only where it applies, so a third-party slave reports an empty list rather than controls that could only ever fail. A procedure that has never run reports an idle snapshot (`status` `idle`, `runCount` 0, every step `idle`), so every entry has the same shape.
|
|
568
582
|
*
|
|
@@ -616,6 +630,19 @@ export class Api extends HttpClient {
|
|
|
616
630
|
method: "DELETE",
|
|
617
631
|
...params,
|
|
618
632
|
});
|
|
633
|
+
/**
|
|
634
|
+
* @description Reports both encoder configuration records, 0x2110 (encoder 1) and 0x2112 (encoder 2), and the encoder each controller uses: position control from 0x2012:09, velocity control from 0x2011:05, commutation from 0x2010:0C. A record whose type is `none` is still listed, because the controller fields refer to the ordinal. Read this to learn what one revolution is in position counts. A position in 0x6064 or 0x607A is in counts of the position encoder, unscaled by the gear ratio (0x6091), so one revolution of that encoder is its `resolution`. The feed constant (0x6092) is not applied here.
|
|
635
|
+
*
|
|
636
|
+
* @name GetEncoders
|
|
637
|
+
* @summary Read a SOMANET drive's encoders and which controller uses which
|
|
638
|
+
* @request GET:/api/devices/{slavePosition}/encoders
|
|
639
|
+
*/
|
|
640
|
+
getEncoders = (slavePosition, params = {}) => this.request({
|
|
641
|
+
path: `/api/devices/${slavePosition}/encoders`,
|
|
642
|
+
method: "GET",
|
|
643
|
+
format: "json",
|
|
644
|
+
...params,
|
|
645
|
+
});
|
|
619
646
|
/**
|
|
620
647
|
* @description Reports the brake objects (0x2004) that decide what a release or engage will do: its current state, the release strategy, the pull time and the pull/hold voltages. Read this before commanding the brake. `softwareControllable` is false when the release strategy is `manualOutputVoltage`, meaning the firmware does not drive the brake at all and both commands below are no-ops. `releaseMovesShaft` is true for a pin brake, whose release procedure turns the motor to lift the load off the pin.
|
|
621
648
|
*
|
|
@@ -27,10 +27,40 @@ export interface Cia402Status {
|
|
|
27
27
|
*/
|
|
28
28
|
modeName: string;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Target position (0x607A), INTEGER32, in the drive's own position units. The drive acts on it in the position modes (PP, CSP) only, but it is reported in every mode. Read from the process image while the device exchanges, else over SDO. `null` when the drive has no such object or the read failed.
|
|
31
31
|
* @example 100000
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
targetPosition: number | null;
|
|
34
|
+
/**
|
|
35
|
+
* Target velocity (0x60FF), INTEGER32, in the drive's own velocity units. The drive acts on it in the velocity modes (PV, CSV) only, but it is reported in every mode. Read from the process image while the device exchanges, else over SDO. `null` when the drive has no such object or the read failed.
|
|
36
|
+
* @example 250000
|
|
37
|
+
*/
|
|
38
|
+
targetVelocity: number | null;
|
|
39
|
+
/**
|
|
40
|
+
* Target torque (0x6071), INTEGER16 widened to INTEGER32, in per mille of rated torque. The drive acts on it in the torque modes (PT, CST) only, but it is reported in every mode. Read from the process image while the device exchanges, else over SDO. `null` when the drive has no such object or the read failed.
|
|
41
|
+
* @example -100
|
|
42
|
+
*/
|
|
43
|
+
targetTorque: number | null;
|
|
44
|
+
/**
|
|
45
|
+
* Position actual value (0x6064), INTEGER32, in the drive's own position units. Read from the process image while the device exchanges, else over SDO. `null` when the drive has no such object or the read failed.
|
|
46
|
+
* @example 99874
|
|
47
|
+
*/
|
|
48
|
+
actualPosition: number | null;
|
|
49
|
+
/**
|
|
50
|
+
* Velocity actual value (0x606C), INTEGER32, in the drive's own velocity units. Read from the process image while the device exchanges, else over SDO. `null` when the drive has no such object or the read failed.
|
|
51
|
+
* @example 249000
|
|
52
|
+
*/
|
|
53
|
+
actualVelocity: number | null;
|
|
54
|
+
/**
|
|
55
|
+
* Torque actual value (0x6077), INTEGER16 widened to INTEGER32, in per mille of rated torque. Read from the process image while the device exchanges, else over SDO. `null` when the drive has no such object or the read failed.
|
|
56
|
+
* @example -150
|
|
57
|
+
*/
|
|
58
|
+
actualTorque: number | null;
|
|
59
|
+
/**
|
|
60
|
+
* The drive's own short description of its last fault, read from the vendor object that holds one. A SOMANET drive keeps it in 0x203F:01 and reports an empty string while there is no fault. `null` when the drive has no such object or the read failed.
|
|
61
|
+
* @example "CyclicHb"
|
|
62
|
+
*/
|
|
63
|
+
errorDescription: string | null;
|
|
34
64
|
}
|
|
35
65
|
/** Every operation mode a device has, with what its "Supported drive modes" field (0x6502) says about each. */
|
|
36
66
|
export interface OperationModes {
|
|
@@ -505,6 +535,63 @@ export interface HrdRecording {
|
|
|
505
535
|
*/
|
|
506
536
|
samples: number[][];
|
|
507
537
|
}
|
|
538
|
+
/** One encoder configuration record, 0x2110 for encoder 1 or 0x2112 for encoder 2. */
|
|
539
|
+
export interface EncoderConfiguration {
|
|
540
|
+
/**
|
|
541
|
+
* The ordinal the controller fields refer to; 1 is 0x2110, 2 is 0x2112.
|
|
542
|
+
* @example 1
|
|
543
|
+
*/
|
|
544
|
+
encoder: 1 | 2;
|
|
545
|
+
/**
|
|
546
|
+
* The port the encoder is wired to (:01), 0 for none.
|
|
547
|
+
* @example 1
|
|
548
|
+
*/
|
|
549
|
+
sensorPort: number;
|
|
550
|
+
/**
|
|
551
|
+
* The kind of encoder (:02). `unknown` for a value this version does not name.
|
|
552
|
+
* @example "biss"
|
|
553
|
+
*/
|
|
554
|
+
type: "none" | "hallSensor" | "incremental" | "nikonAFormat" | "biss" | "internal" | "ssi" | "sinCosModule" | "unknown";
|
|
555
|
+
/**
|
|
556
|
+
* Counts per revolution (:03). One revolution of this encoder in position counts.
|
|
557
|
+
* @example 262144
|
|
558
|
+
*/
|
|
559
|
+
resolution: number;
|
|
560
|
+
/**
|
|
561
|
+
* Whether the counting direction is inverted (:05).
|
|
562
|
+
* @example false
|
|
563
|
+
*/
|
|
564
|
+
inverted: boolean;
|
|
565
|
+
/**
|
|
566
|
+
* Bits of the turn counter in the encoder's frame (:0A).
|
|
567
|
+
* @example 0
|
|
568
|
+
*/
|
|
569
|
+
multiturnBits: number;
|
|
570
|
+
/**
|
|
571
|
+
* Bits of the position within one turn in the encoder's frame (:0C).
|
|
572
|
+
* @example 18
|
|
573
|
+
*/
|
|
574
|
+
singleturnBits: number;
|
|
575
|
+
}
|
|
576
|
+
/** Both encoder records of a SOMANET drive and which of them each controller uses. The three controller fields hold an ordinal of the `encoders` list, or `null` when the controller names no encoder. */
|
|
577
|
+
export interface Encoders {
|
|
578
|
+
encoders: EncoderConfiguration[];
|
|
579
|
+
/**
|
|
580
|
+
* The encoder position control uses (0x2012:09).
|
|
581
|
+
* @example 1
|
|
582
|
+
*/
|
|
583
|
+
position: 1 | 2 | null;
|
|
584
|
+
/**
|
|
585
|
+
* The encoder velocity control uses (0x2011:05).
|
|
586
|
+
* @example 1
|
|
587
|
+
*/
|
|
588
|
+
velocity: 1 | 2 | null;
|
|
589
|
+
/**
|
|
590
|
+
* The encoder commutation uses (0x2010:0C).
|
|
591
|
+
* @example 1
|
|
592
|
+
*/
|
|
593
|
+
commutation: 1 | 2 | null;
|
|
594
|
+
}
|
|
508
595
|
/** A drive's brake configuration and current state — the parts of object 0x2004 that decide what commanding the brake will actually do. Returned by every brake endpoint, so the outcome of a release or engage arrives in the same shape as a plain read. */
|
|
509
596
|
export interface BrakeState {
|
|
510
597
|
/**
|
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.97",
|
|
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": {
|