@zaber/motion 7.15.0 → 8.0.0
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/LICENSE +504 -7
- package/dist/binding/wasm/zaber-motion-core.wasm +0 -0
- package/dist/lib/ascii/axis.d.ts +10 -0
- package/dist/lib/ascii/axis.d.ts.map +1 -1
- package/dist/lib/ascii/axis.js +22 -0
- package/dist/lib/ascii/axis.js.map +1 -1
- package/dist/lib/ascii/axis_settings.d.ts +8 -0
- package/dist/lib/ascii/axis_settings.d.ts.map +1 -1
- package/dist/lib/ascii/axis_settings.js +21 -0
- package/dist/lib/ascii/axis_settings.js.map +1 -1
- package/dist/lib/ascii/device.d.ts +10 -0
- package/dist/lib/ascii/device.d.ts.map +1 -1
- package/dist/lib/ascii/device.js +21 -0
- package/dist/lib/ascii/device.js.map +1 -1
- package/dist/lib/ascii/device_settings.d.ts +8 -0
- package/dist/lib/ascii/device_settings.d.ts.map +1 -1
- package/dist/lib/ascii/device_settings.js +20 -0
- package/dist/lib/ascii/device_settings.js.map +1 -1
- package/dist/lib/ascii/index.d.ts +0 -1
- package/dist/lib/ascii/index.d.ts.map +1 -1
- package/dist/lib/ascii/index.js +0 -1
- package/dist/lib/ascii/index.js.map +1 -1
- package/dist/lib/ascii/lockstep.d.ts +0 -8
- package/dist/lib/ascii/lockstep.d.ts.map +1 -1
- package/dist/lib/ascii/lockstep.js +0 -20
- package/dist/lib/ascii/lockstep.js.map +1 -1
- package/dist/lib/ascii/pvt_sequence.d.ts +0 -31
- package/dist/lib/ascii/pvt_sequence.d.ts.map +1 -1
- package/dist/lib/ascii/pvt_sequence.js +0 -84
- package/dist/lib/ascii/pvt_sequence.js.map +1 -1
- package/dist/lib/ascii/response.d.ts +4 -1
- package/dist/lib/ascii/response.d.ts.map +1 -1
- package/dist/lib/ascii/response.js.map +1 -1
- package/dist/lib/ascii/servo_tuner.d.ts +11 -30
- package/dist/lib/ascii/servo_tuner.d.ts.map +1 -1
- package/dist/lib/ascii/servo_tuner.js +12 -42
- package/dist/lib/ascii/servo_tuner.js.map +1 -1
- package/dist/lib/ascii/simple_tuning.d.ts +5 -4
- package/dist/lib/ascii/simple_tuning.d.ts.map +1 -1
- package/dist/lib/ascii/simple_tuning.js +6 -6
- package/dist/lib/ascii/simple_tuning.js.map +1 -1
- package/dist/lib/ascii/stream.d.ts +0 -50
- package/dist/lib/ascii/stream.d.ts.map +1 -1
- package/dist/lib/ascii/stream.js +0 -126
- package/dist/lib/ascii/stream.js.map +1 -1
- package/dist/lib/ascii/unknown_response_event.d.ts +4 -1
- package/dist/lib/ascii/unknown_response_event.d.ts.map +1 -1
- package/dist/lib/ascii/unknown_response_event.js.map +1 -1
- package/dist/lib/binary/connection.d.ts +17 -2
- package/dist/lib/binary/connection.d.ts.map +1 -1
- package/dist/lib/binary/connection.js +14 -3
- package/dist/lib/binary/connection.js.map +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +1 -0
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/library.js +1 -1
- package/dist/lib/library.js.map +1 -1
- package/dist/lib/microscopy/objective_changer.d.ts +0 -23
- package/dist/lib/microscopy/objective_changer.d.ts.map +1 -1
- package/dist/lib/microscopy/objective_changer.js +0 -27
- package/dist/lib/microscopy/objective_changer.js.map +1 -1
- package/dist/lib/requests/get_command_unit_conversion_response.d.ts +13 -0
- package/dist/lib/requests/get_command_unit_conversion_response.d.ts.map +1 -0
- package/dist/lib/requests/get_command_unit_conversion_response.js +28 -0
- package/dist/lib/requests/get_command_unit_conversion_response.js.map +1 -0
- package/dist/lib/requests/index.d.ts +2 -0
- package/dist/lib/requests/index.d.ts.map +1 -1
- package/dist/lib/requests/index.js +2 -0
- package/dist/lib/requests/index.js.map +1 -1
- package/dist/lib/requests/set_simple_tuning.d.ts +4 -4
- package/dist/lib/requests/set_simple_tuning.d.ts.map +1 -1
- package/dist/lib/requests/set_simple_tuning.js +12 -12
- package/dist/lib/requests/set_simple_tuning.js.map +1 -1
- package/dist/lib/requests/unit_convert_native_request.d.ts +17 -0
- package/dist/lib/requests/unit_convert_native_request.d.ts.map +1 -0
- package/dist/lib/requests/unit_convert_native_request.js +39 -0
- package/dist/lib/requests/unit_convert_native_request.js.map +1 -0
- package/dist/lib/unit_conversion_descriptor.d.ts +30 -0
- package/dist/lib/unit_conversion_descriptor.d.ts.map +1 -0
- package/dist/lib/unit_conversion_descriptor.js +37 -0
- package/dist/lib/unit_conversion_descriptor.js.map +1 -0
- package/dist/lib/unit_table.d.ts +33 -0
- package/dist/lib/unit_table.d.ts.map +1 -1
- package/dist/lib/unit_table.js +80 -0
- package/dist/lib/unit_table.js.map +1 -1
- package/package.json +1 -1
- package/dist/lib/ascii/lockstep_axes.d.ts +0 -30
- package/dist/lib/ascii/lockstep_axes.d.ts.map +0 -1
- package/dist/lib/ascii/lockstep_axes.js +0 -37
- package/dist/lib/ascii/lockstep_axes.js.map +0 -1
|
@@ -14,14 +14,17 @@ export interface Response {
|
|
|
14
14
|
axisNumber: number;
|
|
15
15
|
/**
|
|
16
16
|
* The reply flag indicates if the request was accepted (OK) or rejected (RJ).
|
|
17
|
+
* Does not apply to info messages.
|
|
17
18
|
*/
|
|
18
19
|
replyFlag: string;
|
|
19
20
|
/**
|
|
20
21
|
* The device status contains BUSY when the axis is moving and IDLE otherwise.
|
|
22
|
+
* Does not apply to info messages.
|
|
21
23
|
*/
|
|
22
24
|
status: string;
|
|
23
25
|
/**
|
|
24
26
|
* The warning flag contains the highest priority warning currently active for the device or axis.
|
|
27
|
+
* Does not apply to info messages.
|
|
25
28
|
*/
|
|
26
29
|
warningFlag: string;
|
|
27
30
|
/**
|
|
@@ -29,7 +32,7 @@ export interface Response {
|
|
|
29
32
|
*/
|
|
30
33
|
data: string;
|
|
31
34
|
/**
|
|
32
|
-
* Type of the
|
|
35
|
+
* Type of the response received (only Reply or Info).
|
|
33
36
|
*/
|
|
34
37
|
messageType: MessageType;
|
|
35
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../src/ascii/response.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB
|
|
1
|
+
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../src/ascii/response.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC;CAE1B;AAED,eAAO,MAAM,QAAQ;yBACE,UAAU,KAAG,QAAQ;sBACxB,QAAQ,KAAG,UAAU;;sBAUrB,QAAQ,KAAG,QAAQ;qBAapB,KAAK,QAAQ,KAAG,QAAQ;CAS1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/ascii/response.ts"],"names":[],"mappings":";;;AAAA,oDAAoD;AACpD,+BAA4B;AAC5B,oDAAiD;AACjD,wDAAoD;
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot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;YACxD,WAAW,EAAE,qBAAS,CAAC,cAAc,CAAC,KAAK,CAAC,WAAW,EAAE,aAAa,CAAC;YACvE,IAAI,EAAE,qBAAS,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC;YAClD,WAAW,EAAE,qBAAS,CAAC,YAAY,CAAC,KAAK,CAAC,WAAW,EAAE,aAAa,EAAE,0BAAW,EAAE,aAAa,CAAC;SAClG,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,CAAC,KAAoB,EAAY,EAAE,CAAC,CAAC;QAC5C,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,WAAW,EAAE,KAAK,CAAC,WAAW;KAC/B,CAAC;CACH,CAAC","sourcesContent":["/* This file is generated. Do not modify by hand. */\nimport { BSON } from 'bson';\nimport { sanitizer } from '../gateway/sanitizer';\nimport { MessageType } from '../ascii/message_type';\n\n/**\n * Response message from the device.\n */\nexport interface Response {\n /**\n * Number of the device that sent the message.\n */\n deviceAddress: number;\n\n /**\n * Number of the axis which the response applies to. Zero denotes device scope.\n */\n axisNumber: number;\n\n /**\n * The reply flag indicates if the request was accepted (OK) or rejected (RJ).\n * Does not apply to info messages.\n */\n replyFlag: string;\n\n /**\n * The device status contains BUSY when the axis is moving and IDLE otherwise.\n * Does not apply to info messages.\n */\n status: string;\n\n /**\n * The warning flag contains the highest priority warning currently active for the device or axis.\n * Does not apply to info messages.\n */\n warningFlag: string;\n\n /**\n * Response data which varies depending on the request.\n */\n data: string;\n\n /**\n * Type of the response received (only Reply or Info).\n */\n messageType: MessageType;\n\n}\n\nexport const Response = {\n fromBinary: (buffer: Uint8Array): Response => Response.convert(BSON.deserialize(buffer, { useBigInt64: true })),\n toBinary: (value: Response): Uint8Array => BSON.serialize(Response.sanitize(value)),\n DEFAULT: Object.freeze({\n deviceAddress: 0,\n axisNumber: 0,\n replyFlag: '',\n status: '',\n warningFlag: '',\n data: '',\n messageType: 0 as MessageType,\n }) as Readonly<Response>,\n sanitize: (value: Response): Response => {\n if (value == null) { throw new TypeError('Expected Response object but got null or undefined.') }\n if (typeof value !== 'object') { throw new TypeError(`Expected Response object but got ${typeof value}.`) }\n return {\n deviceAddress: sanitizer.sanitizeInt(value.deviceAddress, 'deviceAddress'),\n axisNumber: sanitizer.sanitizeInt(value.axisNumber, 'axisNumber'),\n replyFlag: sanitizer.sanitizeString(value.replyFlag, 'replyFlag'),\n status: sanitizer.sanitizeString(value.status, 'status'),\n warningFlag: sanitizer.sanitizeString(value.warningFlag, 'warningFlag'),\n data: sanitizer.sanitizeString(value.data, 'data'),\n messageType: sanitizer.sanitizeEnum(value.messageType, 'MessageType', MessageType, 'messageType'),\n };\n },\n convert: (value: BSON.Document): Response => ({\n deviceAddress: value.deviceAddress,\n axisNumber: value.axisNumber,\n replyFlag: value.replyFlag,\n status: value.status,\n warningFlag: value.warningFlag,\n data: value.data,\n messageType: value.messageType,\n })\n};\n"]}
|
|
@@ -78,55 +78,42 @@ export declare class ServoTuner {
|
|
|
78
78
|
* @param tuningParams The params used to tune this device.
|
|
79
79
|
* To get what parameters are expected, call GetSimpleTuningParamList.
|
|
80
80
|
* All values must be between 0 and 1.
|
|
81
|
-
* @param
|
|
82
|
-
* Unless specified by the
|
|
81
|
+
* @param loadInertia The mass loaded on the stage, excluding the mass of the carriage itself.
|
|
82
|
+
* Unless specified by the LoadInertiaUnits parameter, this is in units of kg for linear devices,
|
|
83
83
|
* and kg⋅m² for rotary devices.
|
|
84
|
-
* @param [options.
|
|
85
|
-
* @param [options.
|
|
86
|
-
* Unless specified by the
|
|
84
|
+
* @param [options.loadInertiaUnits=Units.NATIVE] The units the load mass was supplied in.
|
|
85
|
+
* @param [options.carriageInertia=null] The mass of the carriage itself. If not supplied, the product's default mass will be used.
|
|
86
|
+
* Unless specified by the CarriageInertiaUnits parameter, this is in units of kg for linear devices,
|
|
87
87
|
* and kg⋅m² for rotary devices.
|
|
88
|
-
* @param [options.
|
|
88
|
+
* @param [options.carriageInertiaUnits=Units.NATIVE] The units the carriage mass was supplied in.
|
|
89
89
|
* @param [options.motorInertia=null] The inertia of the motor. Unless specified by the MotorInertiaUnits parameter,
|
|
90
90
|
* this is in units of kg⋅m².
|
|
91
91
|
* @param [options.motorInertiaUnits=Units.NATIVE] The units the motor inertia was supplied in.
|
|
92
92
|
*/
|
|
93
|
-
setSimpleTuning(paramset: ServoTuningParamset, tuningParams: ServoTuningParam[],
|
|
93
|
+
setSimpleTuning(paramset: ServoTuningParamset, tuningParams: ServoTuningParam[], loadInertia: number, options?: ServoTuner.SetSimpleTuningOptions): Promise<void>;
|
|
94
94
|
/**
|
|
95
95
|
* Get the simple tuning parameters for this device.
|
|
96
96
|
* @param paramset The paramset to get tuning for.
|
|
97
97
|
* @returns The simple tuning parameters.
|
|
98
98
|
*/
|
|
99
99
|
getSimpleTuning(paramset: ServoTuningParamset): Promise<SimpleTuning>;
|
|
100
|
-
/**
|
|
101
|
-
* @deprecated Use GetSimpleTuning instead.
|
|
102
|
-
*
|
|
103
|
-
* Checks if the provided simple tuning is being stored by this paramset.
|
|
104
|
-
* @param paramset The paramset to set tuning for.
|
|
105
|
-
* @param tuningParams The params used to tune this device.
|
|
106
|
-
* To get what parameters are expected, call GetSimpleTuningParamList.
|
|
107
|
-
* All values must be between 0 and 1.
|
|
108
|
-
* @param loadMass The mass loaded on the stage (excluding the mass of the carriage itself) in kg.
|
|
109
|
-
* @param [options.carriageMass=null] The mass of the carriage in kg. If this value is not set the default carriage mass is used.
|
|
110
|
-
* @returns True if the provided simple tuning is currently stored in this paramset.
|
|
111
|
-
*/
|
|
112
|
-
isUsingSimpleTuning(paramset: ServoTuningParamset, tuningParams: ServoTuningParam[], loadMass: number, options?: ServoTuner.IsUsingSimpleTuningOptions): Promise<boolean>;
|
|
113
100
|
}
|
|
114
101
|
declare namespace ServoTuner {
|
|
115
102
|
interface SetSimpleTuningOptions {
|
|
116
103
|
/**
|
|
117
104
|
* The units the load mass was supplied in.
|
|
118
105
|
*/
|
|
119
|
-
|
|
106
|
+
loadInertiaUnits?: Units;
|
|
120
107
|
/**
|
|
121
108
|
* The mass of the carriage itself. If not supplied, the product's default mass will be used.
|
|
122
|
-
* Unless specified by the
|
|
109
|
+
* Unless specified by the CarriageInertiaUnits parameter, this is in units of kg for linear devices,
|
|
123
110
|
* and kg⋅m² for rotary devices.
|
|
124
111
|
*/
|
|
125
|
-
|
|
112
|
+
carriageInertia?: number;
|
|
126
113
|
/**
|
|
127
114
|
* The units the carriage mass was supplied in.
|
|
128
115
|
*/
|
|
129
|
-
|
|
116
|
+
carriageInertiaUnits?: Units;
|
|
130
117
|
/**
|
|
131
118
|
* The inertia of the motor. Unless specified by the MotorInertiaUnits parameter,
|
|
132
119
|
* this is in units of kg⋅m².
|
|
@@ -137,12 +124,6 @@ declare namespace ServoTuner {
|
|
|
137
124
|
*/
|
|
138
125
|
motorInertiaUnits?: Units;
|
|
139
126
|
}
|
|
140
|
-
interface IsUsingSimpleTuningOptions {
|
|
141
|
-
/**
|
|
142
|
-
* The mass of the carriage in kg. If this value is not set the default carriage mass is used.
|
|
143
|
-
*/
|
|
144
|
-
carriageMass?: number;
|
|
145
|
-
}
|
|
146
127
|
}
|
|
147
128
|
export {};
|
|
148
129
|
//# sourceMappingURL=servo_tuner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"servo_tuner.d.ts","sourceRoot":"","sources":["../../../src/ascii/servo_tuner.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAA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C,uBAAuB,GAAE,OAAe,GACvC,OAAO,CAAC,IAAI,CAAC;IAiBhB;;;;;;;;OAQG;IACU,YAAY,CACvB,QAAQ,EAAE,mBAAmB,EAC7B,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,SAAS,CAAC;IAuBrB;;;;OAIG;IACU,YAAY,CACvB,QAAQ,EAAE,mBAAmB,GAC5B,OAAO,CAAC,SAAS,CAAC;IAmBrB;;;OAGG;IACU,+BAA+B,IAAI,OAAO,CAAC,2BAA2B,EAAE,CAAC;IAkBtF;;;;;;;;;;;;;;;;;OAiBG;IACU,eAAe,CAC1B,QAAQ,EAAE,mBAAmB,EAC7B,YAAY,EAAE,gBAAgB,EAAE,EAChC,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,UAAU,CAAC,sBAA2B,GAC9C,OAAO,CAAC,IAAI,CAAC;IA6BhB;;;;OAIG;IACU,eAAe,CAC1B,QAAQ,EAAE,mBAAmB,GAC5B,OAAO,CAAC,YAAY,CAAC;CAkBzB;AAED,kBAAU,UAAU,CAAC;IACnB,UAAiB,sBAAsB;QACnC;;WAEG;QACH,gBAAgB,CAAC,EAAE,KAAK,CAAC;QACzB;;;;WAIG;QACH,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB;;WAEG;QACH,oBAAoB,CAAC,EAAE,KAAK,CAAC;QAC7B;;;WAGG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB;;WAEG;QACH,iBAAiB,CAAC,EAAE,KAAK,CAAC;KAC7B;CACF"}
|
|
@@ -213,20 +213,20 @@ class ServoTuner {
|
|
|
213
213
|
* @param tuningParams The params used to tune this device.
|
|
214
214
|
* To get what parameters are expected, call GetSimpleTuningParamList.
|
|
215
215
|
* All values must be between 0 and 1.
|
|
216
|
-
* @param
|
|
217
|
-
* Unless specified by the
|
|
216
|
+
* @param loadInertia The mass loaded on the stage, excluding the mass of the carriage itself.
|
|
217
|
+
* Unless specified by the LoadInertiaUnits parameter, this is in units of kg for linear devices,
|
|
218
218
|
* and kg⋅m² for rotary devices.
|
|
219
|
-
* @param [options.
|
|
220
|
-
* @param [options.
|
|
221
|
-
* Unless specified by the
|
|
219
|
+
* @param [options.loadInertiaUnits=Units.NATIVE] The units the load mass was supplied in.
|
|
220
|
+
* @param [options.carriageInertia=null] The mass of the carriage itself. If not supplied, the product's default mass will be used.
|
|
221
|
+
* Unless specified by the CarriageInertiaUnits parameter, this is in units of kg for linear devices,
|
|
222
222
|
* and kg⋅m² for rotary devices.
|
|
223
|
-
* @param [options.
|
|
223
|
+
* @param [options.carriageInertiaUnits=Units.NATIVE] The units the carriage mass was supplied in.
|
|
224
224
|
* @param [options.motorInertia=null] The inertia of the motor. Unless specified by the MotorInertiaUnits parameter,
|
|
225
225
|
* this is in units of kg⋅m².
|
|
226
226
|
* @param [options.motorInertiaUnits=Units.NATIVE] The units the motor inertia was supplied in.
|
|
227
227
|
*/
|
|
228
|
-
async setSimpleTuning(paramset, tuningParams,
|
|
229
|
-
const {
|
|
228
|
+
async setSimpleTuning(paramset, tuningParams, loadInertia, options = {}) {
|
|
229
|
+
const { loadInertiaUnits = units_1.Units.NATIVE, carriageInertia = null, carriageInertiaUnits = units_1.Units.NATIVE, motorInertia = null, motorInertiaUnits = units_1.Units.NATIVE, } = options;
|
|
230
230
|
const request = {
|
|
231
231
|
...requests.SetSimpleTuning.DEFAULT,
|
|
232
232
|
interfaceId: this.axis.device.connection.interfaceId,
|
|
@@ -234,10 +234,10 @@ class ServoTuner {
|
|
|
234
234
|
axis: this.axis.axisNumber,
|
|
235
235
|
paramset: paramset,
|
|
236
236
|
tuningParams: tuningParams,
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
237
|
+
loadInertia: loadInertia,
|
|
238
|
+
loadInertiaUnits: loadInertiaUnits,
|
|
239
|
+
carriageInertia: carriageInertia,
|
|
240
|
+
carriageInertiaUnits: carriageInertiaUnits,
|
|
241
241
|
motorInertia: motorInertia,
|
|
242
242
|
motorInertiaUnits: motorInertiaUnits,
|
|
243
243
|
toBinary() {
|
|
@@ -265,36 +265,6 @@ class ServoTuner {
|
|
|
265
265
|
const response = await gateway.callAsync('servotuning/get_simple_tuning', request, simple_tuning_1.SimpleTuning.fromBinary);
|
|
266
266
|
return response;
|
|
267
267
|
}
|
|
268
|
-
/**
|
|
269
|
-
* @deprecated Use GetSimpleTuning instead.
|
|
270
|
-
*
|
|
271
|
-
* Checks if the provided simple tuning is being stored by this paramset.
|
|
272
|
-
* @param paramset The paramset to set tuning for.
|
|
273
|
-
* @param tuningParams The params used to tune this device.
|
|
274
|
-
* To get what parameters are expected, call GetSimpleTuningParamList.
|
|
275
|
-
* All values must be between 0 and 1.
|
|
276
|
-
* @param loadMass The mass loaded on the stage (excluding the mass of the carriage itself) in kg.
|
|
277
|
-
* @param [options.carriageMass=null] The mass of the carriage in kg. If this value is not set the default carriage mass is used.
|
|
278
|
-
* @returns True if the provided simple tuning is currently stored in this paramset.
|
|
279
|
-
*/
|
|
280
|
-
async isUsingSimpleTuning(paramset, tuningParams, loadMass, options = {}) {
|
|
281
|
-
const { carriageMass = null, } = options;
|
|
282
|
-
const request = {
|
|
283
|
-
...requests.SetSimpleTuning.DEFAULT,
|
|
284
|
-
interfaceId: this.axis.device.connection.interfaceId,
|
|
285
|
-
device: this.axis.device.deviceAddress,
|
|
286
|
-
axis: this.axis.axisNumber,
|
|
287
|
-
paramset: paramset,
|
|
288
|
-
tuningParams: tuningParams,
|
|
289
|
-
loadMass: loadMass,
|
|
290
|
-
carriageMass: carriageMass,
|
|
291
|
-
toBinary() {
|
|
292
|
-
return requests.SetSimpleTuning.toBinary(this);
|
|
293
|
-
},
|
|
294
|
-
};
|
|
295
|
-
const response = await gateway.callAsync('servotuning/is_using_simple_tuning', request, requests.BoolResponse.fromBinary);
|
|
296
|
-
return response.value;
|
|
297
|
-
}
|
|
298
268
|
}
|
|
299
269
|
exports.ServoTuner = ServoTuner;
|
|
300
270
|
//# sourceMappingURL=servo_tuner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"servo_tuner.js","sourceRoot":"","sources":["../../../src/ascii/servo_tuner.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oDAAsC;AACtC,sDAAwC;AAExC,mDAA+C;AAE/C,6CAAyC;AAEzC,mDAA+C;AAC/C,oCAAiC;AAEjC;;;GAGG;AACH,MAAa,UAAU;IACrB;;OAEG;IACH,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAGD;;OAEG;IACH,YAAY,IAAU;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,kBAAkB;QAC7B,MAAM,OAAO,GAAgD;YAC3D,GAAG,QAAQ,CAAC,gBAAgB,CAAC,OAAO;YACpC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW;YACpD,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa;YACtC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU;YAC1B,QAAQ;gBACN,OAAO,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAClD,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,6BAA6B,EAC7B,OAAO,EACP,QAAQ,CAAC,2BAA2B,CAAC,UAAU,CAAC,CAAC;QACnD,OAAO,QAAQ,CAAC,QAAQ,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,kBAAkB,CAC7B,QAA6B;QAE7B,MAAM,OAAO,GAAkD;YAC7D,GAAG,QAAQ,CAAC,kBAAkB,CAAC,OAAO;YACt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CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACjD,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,oCAAoC,EACpC,OAAO,EACP,QAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QACpC,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;CACF;AAvVD,gCAuVC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Axis } from './axis';\nimport * as gateway from '../gateway';\nimport * as requests from '../requests';\nimport { ServoTuningParamset } from './servo_tuning_paramset';\nimport { ParamsetInfo } from './paramset_info';\nimport { ServoTuningParam } from './servo_tuning_param';\nimport { PidTuning } from './pid_tuning';\nimport { SimpleTuningParamDefinition } from './simple_tuning_param_definition';\nimport { SimpleTuning } from './simple_tuning';\nimport { Units } from '../units';\n\n/**\n * Exposes the capabilities to inspect and edit an axis' servo tuning.\n * Requires at least Firmware 6.25 or 7.00.\n */\nexport class ServoTuner {\n /**\n * The axis that will be tuned.\n */\n public get axis(): Axis {\n return this._axis;\n }\n private _axis: Axis;\n\n /**\n * Creates instance of ServoTuner for the given axis.\n */\n constructor(axis: Axis) {\n this._axis = axis;\n }\n\n /**\n * Get the paramset that this device uses by default when it starts up.\n * @returns The paramset used when the device restarts.\n */\n public async getStartupParamset(): Promise<ServoTuningParamset> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.ServoTuningParamsetResponse>(\n 'servotuning/get_startup_set',\n request,\n requests.ServoTuningParamsetResponse.fromBinary);\n return response.paramset;\n }\n\n /**\n * Set the paramset that this device uses by default when it starts up.\n * @param paramset The paramset to use at startup.\n */\n public async setStartupParamset(\n paramset: ServoTuningParamset\n ): Promise<void> {\n const request: requests.ServoTuningRequest & gateway.Message = {\n ...requests.ServoTuningRequest.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n paramset: paramset,\n toBinary() {\n return requests.ServoTuningRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('servotuning/set_startup_set', request);\n }\n\n /**\n * Load the values from one paramset into another.\n * @param toParamset The paramset to load into.\n * @param fromParamset The paramset to load from.\n */\n public async loadParamset(\n toParamset: ServoTuningParamset,\n fromParamset: ServoTuningParamset\n ): Promise<void> {\n const request: requests.LoadParamset & gateway.Message = {\n ...requests.LoadParamset.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n toParamset: toParamset,\n fromParamset: fromParamset,\n toBinary() {\n return requests.LoadParamset.toBinary(this);\n },\n };\n\n await gateway.callAsync('servotuning/load_paramset', request);\n }\n\n /**\n * Get the full set of tuning parameters used by the firmware driving this axis.\n * @param paramset The paramset to get tuning for.\n * @returns The raw representation of the current tuning.\n */\n public async getTuning(\n paramset: ServoTuningParamset\n ): Promise<ParamsetInfo> {\n const request: requests.ServoTuningRequest & gateway.Message = {\n ...requests.ServoTuningRequest.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n paramset: paramset,\n toBinary() {\n return requests.ServoTuningRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<ParamsetInfo>(\n 'servotuning/get_raw',\n request,\n ParamsetInfo.fromBinary);\n return response;\n }\n\n /**\n * Set individual tuning parameters.\n * Only use this method if you have a strong understanding of Zaber specific tuning parameters.\n * @param paramset The paramset to set tuning of.\n * @param tuningParams The params to set.\n * @param [setUnspecifiedToDefault=false] If true, any tuning parameters not included in TuningParams\n * are reset to their default values.\n */\n public async setTuning(\n paramset: ServoTuningParamset,\n tuningParams: ServoTuningParam[],\n setUnspecifiedToDefault: boolean = false\n ): Promise<void> {\n const request: requests.SetServoTuningRequest & gateway.Message = {\n ...requests.SetServoTuningRequest.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n paramset: paramset,\n tuningParams: tuningParams,\n setUnspecifiedToDefault: setUnspecifiedToDefault,\n toBinary() {\n return requests.SetServoTuningRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('servotuning/set_raw', request);\n }\n\n /**\n * Sets the tuning of a paramset using the PID method.\n * @param paramset The paramset to get tuning for.\n * @param p The proportional gain. Must be in units of N/m for linear devices, and N⋅m/° for rotary devices.\n * @param i The integral gain. Must be in units of N/(m⋅s) for linear devices, and N⋅m/(°⋅s) for rotary devices.\n * @param d The derivative gain. Must be in units of N⋅s/m for linear devices, and N⋅m⋅s/° for rotary devices.\n * @param fc The cutoff frequency. Must be in units of Hz.\n * @returns The PID representation of the current tuning after your changes have been applied.\n */\n public async setPidTuning(\n paramset: ServoTuningParamset,\n p: number,\n i: number,\n d: number,\n fc: number\n ): Promise<PidTuning> {\n const request: requests.SetServoTuningPIDRequest & gateway.Message = {\n ...requests.SetServoTuningPIDRequest.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n paramset: paramset,\n p: p,\n i: i,\n d: d,\n fc: fc,\n toBinary() {\n return requests.SetServoTuningPIDRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<PidTuning>(\n 'servotuning/set_pid',\n request,\n PidTuning.fromBinary);\n return response;\n }\n\n /**\n * Gets the PID representation of this paramset's servo tuning.\n * @param paramset The paramset to get tuning for.\n * @returns The PID representation of the current tuning.\n */\n public async getPidTuning(\n paramset: ServoTuningParamset\n ): Promise<PidTuning> {\n const request: requests.ServoTuningRequest & gateway.Message = {\n ...requests.ServoTuningRequest.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n paramset: paramset,\n toBinary() {\n return requests.ServoTuningRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<PidTuning>(\n 'servotuning/get_pid',\n request,\n PidTuning.fromBinary);\n return response;\n }\n\n /**\n * Gets the parameters that are required to tune this device.\n * @returns The tuning parameters.\n */\n public async getSimpleTuningParamDefinitions(): Promise<SimpleTuningParamDefinition[]> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.GetSimpleTuningParamDefinitionResponse>(\n 'servotuning/get_simple_params_definition',\n request,\n requests.GetSimpleTuningParamDefinitionResponse.fromBinary);\n return response.params;\n }\n\n /**\n * Set the tuning of this device using the simple input method.\n * @param paramset The paramset to set tuning for.\n * @param tuningParams The params used to tune this device.\n * To get what parameters are expected, call GetSimpleTuningParamList.\n * All values must be between 0 and 1.\n * @param loadMass The mass loaded on the stage, excluding the mass of the carriage itself.\n * Unless specified by the LoadMassUnits parameter, this is in units of kg for linear devices,\n * and kg⋅m² for rotary devices.\n * @param [options.loadMassUnits=Units.NATIVE] The units the load mass was supplied in.\n * @param [options.carriageMass=null] The mass of the carriage itself. If not supplied, the product's default mass will be used.\n * Unless specified by the CarriageMassUnits parameter, this is in units of kg for linear devices,\n * and kg⋅m² for rotary devices.\n * @param [options.carriageMassUnits=Units.NATIVE] The units the carriage mass was supplied in.\n * @param [options.motorInertia=null] The inertia of the motor. Unless specified by the MotorInertiaUnits parameter,\n * this is in units of kg⋅m².\n * @param [options.motorInertiaUnits=Units.NATIVE] The units the motor inertia was supplied in.\n */\n public async setSimpleTuning(\n paramset: ServoTuningParamset,\n tuningParams: ServoTuningParam[],\n loadMass: number,\n options: ServoTuner.SetSimpleTuningOptions = {}\n ): Promise<void> {\n const {\n loadMassUnits = Units.NATIVE,\n carriageMass = null,\n carriageMassUnits = Units.NATIVE,\n motorInertia = null,\n motorInertiaUnits = Units.NATIVE,\n } = options;\n const request: requests.SetSimpleTuning & gateway.Message = {\n ...requests.SetSimpleTuning.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n paramset: paramset,\n tuningParams: tuningParams,\n loadMass: loadMass,\n loadMassUnits: loadMassUnits,\n carriageMass: carriageMass,\n carriageMassUnits: carriageMassUnits,\n motorInertia: motorInertia,\n motorInertiaUnits: motorInertiaUnits,\n toBinary() {\n return requests.SetSimpleTuning.toBinary(this);\n },\n };\n\n await gateway.callAsync('servotuning/set_simple_tuning', request);\n }\n\n /**\n * Get the simple tuning parameters for this device.\n * @param paramset The paramset to get tuning for.\n * @returns The simple tuning parameters.\n */\n public async getSimpleTuning(\n paramset: ServoTuningParamset\n ): Promise<SimpleTuning> {\n const request: requests.ServoTuningRequest & gateway.Message = {\n ...requests.ServoTuningRequest.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n paramset: paramset,\n toBinary() {\n return requests.ServoTuningRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<SimpleTuning>(\n 'servotuning/get_simple_tuning',\n request,\n SimpleTuning.fromBinary);\n return response;\n }\n\n /**\n * @deprecated Use GetSimpleTuning instead.\n *\n * Checks if the provided simple tuning is being stored by this paramset.\n * @param paramset The paramset to set tuning for.\n * @param tuningParams The params used to tune this device.\n * To get what parameters are expected, call GetSimpleTuningParamList.\n * All values must be between 0 and 1.\n * @param loadMass The mass loaded on the stage (excluding the mass of the carriage itself) in kg.\n * @param [options.carriageMass=null] The mass of the carriage in kg. If this value is not set the default carriage mass is used.\n * @returns True if the provided simple tuning is currently stored in this paramset.\n */\n public async isUsingSimpleTuning(\n paramset: ServoTuningParamset,\n tuningParams: ServoTuningParam[],\n loadMass: number,\n options: ServoTuner.IsUsingSimpleTuningOptions = {}\n ): Promise<boolean> {\n const {\n carriageMass = null,\n } = options;\n const request: requests.SetSimpleTuning & gateway.Message = {\n ...requests.SetSimpleTuning.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n paramset: paramset,\n tuningParams: tuningParams,\n loadMass: loadMass,\n carriageMass: carriageMass,\n toBinary() {\n return requests.SetSimpleTuning.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'servotuning/is_using_simple_tuning',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n}\n\nnamespace ServoTuner {\n export interface SetSimpleTuningOptions {\n /**\n * The units the load mass was supplied in.\n */\n loadMassUnits?: Units;\n /**\n * The mass of the carriage itself. If not supplied, the product's default mass will be used.\n * Unless specified by the CarriageMassUnits parameter, this is in units of kg for linear devices,\n * and kg⋅m² for rotary devices.\n */\n carriageMass?: number;\n /**\n * The units the carriage mass was supplied in.\n */\n carriageMassUnits?: Units;\n /**\n * The inertia of the motor. Unless specified by the MotorInertiaUnits parameter,\n * this is in units of kg⋅m².\n */\n motorInertia?: number;\n /**\n * The units the motor inertia was supplied in.\n */\n motorInertiaUnits?: Units;\n }\n export interface IsUsingSimpleTuningOptions {\n /**\n * The mass of the carriage in kg. If this value is not set the default carriage mass is used.\n */\n carriageMass?: number;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"servo_tuner.js","sourceRoot":"","sources":["../../../src/ascii/servo_tuner.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oDAAsC;AACtC,sDAAwC;AAExC,mDAA+C;AAE/C,6CAAyC;AAEzC,mDAA+C;AAC/C,oCAAiC;AAEjC;;;GAGG;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ACtC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU;YAC1B,QAAQ,EAAE,QAAQ;YAClB,QAAQ;gBACN,OAAO,QAAQ,CAAC,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACpD,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,+BAA+B,EAC/B,OAAO,EACP,4BAAY,CAAC,UAAU,CAAC,CAAC;QAC3B,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AA7SD,gCA6SC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Axis } from './axis';\nimport * as gateway from '../gateway';\nimport * as requests from '../requests';\nimport { ServoTuningParamset } from './servo_tuning_paramset';\nimport { ParamsetInfo } from './paramset_info';\nimport { ServoTuningParam } from './servo_tuning_param';\nimport { PidTuning } from './pid_tuning';\nimport { SimpleTuningParamDefinition } from './simple_tuning_param_definition';\nimport { SimpleTuning } from './simple_tuning';\nimport { Units } from '../units';\n\n/**\n * Exposes the capabilities to inspect and edit an axis' servo tuning.\n * Requires at least Firmware 6.25 or 7.00.\n */\nexport class ServoTuner {\n /**\n * The axis that will be tuned.\n */\n public get axis(): Axis {\n return this._axis;\n }\n private _axis: Axis;\n\n /**\n * Creates instance of ServoTuner for the given axis.\n */\n constructor(axis: Axis) {\n this._axis = axis;\n }\n\n /**\n * Get the paramset that this device uses by default when it starts up.\n * @returns The paramset used when the device restarts.\n */\n public async getStartupParamset(): Promise<ServoTuningParamset> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.ServoTuningParamsetResponse>(\n 'servotuning/get_startup_set',\n request,\n requests.ServoTuningParamsetResponse.fromBinary);\n return response.paramset;\n }\n\n /**\n * Set the paramset that this device uses by default when it starts up.\n * @param paramset The paramset to use at startup.\n */\n public async setStartupParamset(\n paramset: ServoTuningParamset\n ): Promise<void> {\n const request: requests.ServoTuningRequest & gateway.Message = {\n ...requests.ServoTuningRequest.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n paramset: paramset,\n toBinary() {\n return requests.ServoTuningRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('servotuning/set_startup_set', request);\n }\n\n /**\n * Load the values from one paramset into another.\n * @param toParamset The paramset to load into.\n * @param fromParamset The paramset to load from.\n */\n public async loadParamset(\n toParamset: ServoTuningParamset,\n fromParamset: ServoTuningParamset\n ): Promise<void> {\n const request: requests.LoadParamset & gateway.Message = {\n ...requests.LoadParamset.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n toParamset: toParamset,\n fromParamset: fromParamset,\n toBinary() {\n return requests.LoadParamset.toBinary(this);\n },\n };\n\n await gateway.callAsync('servotuning/load_paramset', request);\n }\n\n /**\n * Get the full set of tuning parameters used by the firmware driving this axis.\n * @param paramset The paramset to get tuning for.\n * @returns The raw representation of the current tuning.\n */\n public async getTuning(\n paramset: ServoTuningParamset\n ): Promise<ParamsetInfo> {\n const request: requests.ServoTuningRequest & gateway.Message = {\n ...requests.ServoTuningRequest.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n paramset: paramset,\n toBinary() {\n return requests.ServoTuningRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<ParamsetInfo>(\n 'servotuning/get_raw',\n request,\n ParamsetInfo.fromBinary);\n return response;\n }\n\n /**\n * Set individual tuning parameters.\n * Only use this method if you have a strong understanding of Zaber specific tuning parameters.\n * @param paramset The paramset to set tuning of.\n * @param tuningParams The params to set.\n * @param [setUnspecifiedToDefault=false] If true, any tuning parameters not included in TuningParams\n * are reset to their default values.\n */\n public async setTuning(\n paramset: ServoTuningParamset,\n tuningParams: ServoTuningParam[],\n setUnspecifiedToDefault: boolean = false\n ): Promise<void> {\n const request: requests.SetServoTuningRequest & gateway.Message = {\n ...requests.SetServoTuningRequest.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n paramset: paramset,\n tuningParams: tuningParams,\n setUnspecifiedToDefault: setUnspecifiedToDefault,\n toBinary() {\n return requests.SetServoTuningRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('servotuning/set_raw', request);\n }\n\n /**\n * Sets the tuning of a paramset using the PID method.\n * @param paramset The paramset to get tuning for.\n * @param p The proportional gain. Must be in units of N/m for linear devices, and N⋅m/° for rotary devices.\n * @param i The integral gain. Must be in units of N/(m⋅s) for linear devices, and N⋅m/(°⋅s) for rotary devices.\n * @param d The derivative gain. Must be in units of N⋅s/m for linear devices, and N⋅m⋅s/° for rotary devices.\n * @param fc The cutoff frequency. Must be in units of Hz.\n * @returns The PID representation of the current tuning after your changes have been applied.\n */\n public async setPidTuning(\n paramset: ServoTuningParamset,\n p: number,\n i: number,\n d: number,\n fc: number\n ): Promise<PidTuning> {\n const request: requests.SetServoTuningPIDRequest & gateway.Message = {\n ...requests.SetServoTuningPIDRequest.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n paramset: paramset,\n p: p,\n i: i,\n d: d,\n fc: fc,\n toBinary() {\n return requests.SetServoTuningPIDRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<PidTuning>(\n 'servotuning/set_pid',\n request,\n PidTuning.fromBinary);\n return response;\n }\n\n /**\n * Gets the PID representation of this paramset's servo tuning.\n * @param paramset The paramset to get tuning for.\n * @returns The PID representation of the current tuning.\n */\n public async getPidTuning(\n paramset: ServoTuningParamset\n ): Promise<PidTuning> {\n const request: requests.ServoTuningRequest & gateway.Message = {\n ...requests.ServoTuningRequest.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n paramset: paramset,\n toBinary() {\n return requests.ServoTuningRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<PidTuning>(\n 'servotuning/get_pid',\n request,\n PidTuning.fromBinary);\n return response;\n }\n\n /**\n * Gets the parameters that are required to tune this device.\n * @returns The tuning parameters.\n */\n public async getSimpleTuningParamDefinitions(): Promise<SimpleTuningParamDefinition[]> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.GetSimpleTuningParamDefinitionResponse>(\n 'servotuning/get_simple_params_definition',\n request,\n requests.GetSimpleTuningParamDefinitionResponse.fromBinary);\n return response.params;\n }\n\n /**\n * Set the tuning of this device using the simple input method.\n * @param paramset The paramset to set tuning for.\n * @param tuningParams The params used to tune this device.\n * To get what parameters are expected, call GetSimpleTuningParamList.\n * All values must be between 0 and 1.\n * @param loadInertia The mass loaded on the stage, excluding the mass of the carriage itself.\n * Unless specified by the LoadInertiaUnits parameter, this is in units of kg for linear devices,\n * and kg⋅m² for rotary devices.\n * @param [options.loadInertiaUnits=Units.NATIVE] The units the load mass was supplied in.\n * @param [options.carriageInertia=null] The mass of the carriage itself. If not supplied, the product's default mass will be used.\n * Unless specified by the CarriageInertiaUnits parameter, this is in units of kg for linear devices,\n * and kg⋅m² for rotary devices.\n * @param [options.carriageInertiaUnits=Units.NATIVE] The units the carriage mass was supplied in.\n * @param [options.motorInertia=null] The inertia of the motor. Unless specified by the MotorInertiaUnits parameter,\n * this is in units of kg⋅m².\n * @param [options.motorInertiaUnits=Units.NATIVE] The units the motor inertia was supplied in.\n */\n public async setSimpleTuning(\n paramset: ServoTuningParamset,\n tuningParams: ServoTuningParam[],\n loadInertia: number,\n options: ServoTuner.SetSimpleTuningOptions = {}\n ): Promise<void> {\n const {\n loadInertiaUnits = Units.NATIVE,\n carriageInertia = null,\n carriageInertiaUnits = Units.NATIVE,\n motorInertia = null,\n motorInertiaUnits = Units.NATIVE,\n } = options;\n const request: requests.SetSimpleTuning & gateway.Message = {\n ...requests.SetSimpleTuning.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n paramset: paramset,\n tuningParams: tuningParams,\n loadInertia: loadInertia,\n loadInertiaUnits: loadInertiaUnits,\n carriageInertia: carriageInertia,\n carriageInertiaUnits: carriageInertiaUnits,\n motorInertia: motorInertia,\n motorInertiaUnits: motorInertiaUnits,\n toBinary() {\n return requests.SetSimpleTuning.toBinary(this);\n },\n };\n\n await gateway.callAsync('servotuning/set_simple_tuning', request);\n }\n\n /**\n * Get the simple tuning parameters for this device.\n * @param paramset The paramset to get tuning for.\n * @returns The simple tuning parameters.\n */\n public async getSimpleTuning(\n paramset: ServoTuningParamset\n ): Promise<SimpleTuning> {\n const request: requests.ServoTuningRequest & gateway.Message = {\n ...requests.ServoTuningRequest.DEFAULT,\n interfaceId: this.axis.device.connection.interfaceId,\n device: this.axis.device.deviceAddress,\n axis: this.axis.axisNumber,\n paramset: paramset,\n toBinary() {\n return requests.ServoTuningRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<SimpleTuning>(\n 'servotuning/get_simple_tuning',\n request,\n SimpleTuning.fromBinary);\n return response;\n }\n}\n\nnamespace ServoTuner {\n export interface SetSimpleTuningOptions {\n /**\n * The units the load mass was supplied in.\n */\n loadInertiaUnits?: Units;\n /**\n * The mass of the carriage itself. If not supplied, the product's default mass will be used.\n * Unless specified by the CarriageInertiaUnits parameter, this is in units of kg for linear devices,\n * and kg⋅m² for rotary devices.\n */\n carriageInertia?: number;\n /**\n * The units the carriage mass was supplied in.\n */\n carriageInertiaUnits?: Units;\n /**\n * The inertia of the motor. Unless specified by the MotorInertiaUnits parameter,\n * this is in units of kg⋅m².\n */\n motorInertia?: number;\n /**\n * The units the motor inertia was supplied in.\n */\n motorInertiaUnits?: Units;\n }\n}\n"]}
|
|
@@ -14,17 +14,18 @@ export interface SimpleTuning {
|
|
|
14
14
|
*/
|
|
15
15
|
isSet: boolean;
|
|
16
16
|
/**
|
|
17
|
-
* The
|
|
17
|
+
* The inertia of the carriage in kg (for linear devices) or kg⋅m² (for rotary devices).
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
carriageInertia?: (number | null);
|
|
20
20
|
/**
|
|
21
21
|
* The inertia of the motor in kg⋅m².
|
|
22
22
|
*/
|
|
23
23
|
motorInertia?: (number | null);
|
|
24
24
|
/**
|
|
25
|
-
* The
|
|
25
|
+
* The inertia of the load in kg (for linear devices) or kg⋅m² (for rotary devices),
|
|
26
|
+
* excluding the inertia of the carriage.
|
|
26
27
|
*/
|
|
27
|
-
|
|
28
|
+
loadInertia: number;
|
|
28
29
|
/**
|
|
29
30
|
* The parameters used by simple tuning.
|
|
30
31
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simple_tuning.d.ts","sourceRoot":"","sources":["../../../src/ascii/simple_tuning.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"simple_tuning.d.ts","sourceRoot":"","sources":["../../../src/ascii/simple_tuning.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAElC;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAE/B;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,YAAY,EAAE,gBAAgB,EAAE,CAAC;CAElC;AAED,eAAO,MAAM,YAAY;yBACF,UAAU,KAAG,YAAY;sBAC5B,YAAY,KAAG,UAAU;;sBASzB,YAAY,KAAG,YAAY;qBAY5B,KAAK,QAAQ,KAAG,YAAY;CAQ9C,CAAC"}
|
|
@@ -11,9 +11,9 @@ exports.SimpleTuning = {
|
|
|
11
11
|
DEFAULT: Object.freeze({
|
|
12
12
|
isUsed: false,
|
|
13
13
|
isSet: false,
|
|
14
|
-
|
|
14
|
+
carriageInertia: null,
|
|
15
15
|
motorInertia: null,
|
|
16
|
-
|
|
16
|
+
loadInertia: 0,
|
|
17
17
|
tuningParams: [],
|
|
18
18
|
}),
|
|
19
19
|
sanitize: (value) => {
|
|
@@ -26,18 +26,18 @@ exports.SimpleTuning = {
|
|
|
26
26
|
return {
|
|
27
27
|
isUsed: sanitizer_1.sanitizer.sanitizeBool(value.isUsed, 'isUsed'),
|
|
28
28
|
isSet: sanitizer_1.sanitizer.sanitizeBool(value.isSet, 'isSet'),
|
|
29
|
-
|
|
29
|
+
carriageInertia: value.carriageInertia != null ? sanitizer_1.sanitizer.sanitizeNumber(value.carriageInertia, 'carriageInertia') : null,
|
|
30
30
|
motorInertia: value.motorInertia != null ? sanitizer_1.sanitizer.sanitizeNumber(value.motorInertia, 'motorInertia') : null,
|
|
31
|
-
|
|
31
|
+
loadInertia: sanitizer_1.sanitizer.sanitizeNumber(value.loadInertia, 'loadInertia'),
|
|
32
32
|
tuningParams: Array.from(value.tuningParams ?? [], item => servo_tuning_param_1.ServoTuningParam.sanitize(item)),
|
|
33
33
|
};
|
|
34
34
|
},
|
|
35
35
|
convert: (value) => ({
|
|
36
36
|
isUsed: value.isUsed,
|
|
37
37
|
isSet: value.isSet,
|
|
38
|
-
|
|
38
|
+
carriageInertia: value.carriageInertia,
|
|
39
39
|
motorInertia: value.motorInertia,
|
|
40
|
-
|
|
40
|
+
loadInertia: value.loadInertia,
|
|
41
41
|
tuningParams: value.tuningParams,
|
|
42
42
|
})
|
|
43
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simple_tuning.js","sourceRoot":"","sources":["../../../src/ascii/simple_tuning.ts"],"names":[],"mappings":";;;AAAA,oDAAoD;AACpD,+BAA4B;AAC5B,oDAAiD;AACjD,oEAA+D;
|
|
1
|
+
{"version":3,"file":"simple_tuning.js","sourceRoot":"","sources":["../../../src/ascii/simple_tuning.ts"],"names":[],"mappings":";;;AAAA,oDAAoD;AACpD,+BAA4B;AAC5B,oDAAiD;AACjD,oEAA+D;AAwClD,QAAA,YAAY,GAAG;IAC1B,UAAU,EAAE,CAAC,MAAkB,EAAgB,EAAE,CAAC,oBAAY,CAAC,OAAO,CAAC,WAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IACvH,QAAQ,EAAE,CAAC,KAAmB,EAAc,EAAE,CAAC,WAAI,CAAC,SAAS,CAAC,oBAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3F,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACrB,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,KAAK;QACZ,eAAe,EAAE,IAAI;QACrB,YAAY,EAAE,IA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AAC,eAAe;QACtC,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,YAAY,EAAE,KAAK,CAAC,YAAY;KACjC,CAAC;CACH,CAAC","sourcesContent":["/* This file is generated. Do not modify by hand. */\nimport { BSON } from 'bson';\nimport { sanitizer } from '../gateway/sanitizer';\nimport { ServoTuningParam } from '../ascii/servo_tuning_param';\n\n/**\n * The masses and parameters last used by simple tuning.\n */\nexport interface SimpleTuning {\n /**\n * Whether the tuning returned is currently in use by this paramset,\n * or if it has been overwritten by a later change.\n */\n isUsed: boolean;\n\n /**\n * If this paramset has been tuned using the simple tuning method, whether or not it's currently in use.\n */\n isSet: boolean;\n\n /**\n * The inertia of the carriage in kg (for linear devices) or kg⋅m² (for rotary devices).\n */\n carriageInertia?: (number | null);\n\n /**\n * The inertia of the motor in kg⋅m².\n */\n motorInertia?: (number | null);\n\n /**\n * The inertia of the load in kg (for linear devices) or kg⋅m² (for rotary devices),\n * excluding the inertia of the carriage.\n */\n loadInertia: number;\n\n /**\n * The parameters used by simple tuning.\n */\n tuningParams: ServoTuningParam[];\n\n}\n\nexport const SimpleTuning = {\n fromBinary: (buffer: Uint8Array): SimpleTuning => SimpleTuning.convert(BSON.deserialize(buffer, { useBigInt64: true })),\n toBinary: (value: SimpleTuning): Uint8Array => BSON.serialize(SimpleTuning.sanitize(value)),\n DEFAULT: Object.freeze({\n isUsed: false,\n isSet: false,\n carriageInertia: null,\n motorInertia: null,\n loadInertia: 0,\n tuningParams: [],\n }) as Readonly<SimpleTuning>,\n sanitize: (value: SimpleTuning): SimpleTuning => {\n if (value == null) { throw new TypeError('Expected SimpleTuning object but got null or undefined.') }\n if (typeof value !== 'object') { throw new TypeError(`Expected SimpleTuning object but got ${typeof value}.`) }\n return {\n isUsed: sanitizer.sanitizeBool(value.isUsed, 'isUsed'),\n isSet: sanitizer.sanitizeBool(value.isSet, 'isSet'),\n carriageInertia: value.carriageInertia != null ? sanitizer.sanitizeNumber(value.carriageInertia, 'carriageInertia') : null,\n motorInertia: value.motorInertia != null ? sanitizer.sanitizeNumber(value.motorInertia, 'motorInertia') : null,\n loadInertia: sanitizer.sanitizeNumber(value.loadInertia, 'loadInertia'),\n tuningParams: Array.from(value.tuningParams ?? [], item => ServoTuningParam.sanitize(item)),\n };\n },\n convert: (value: BSON.Document): SimpleTuning => ({\n isUsed: value.isUsed,\n isSet: value.isSet,\n carriageInertia: value.carriageInertia,\n motorInertia: value.motorInertia,\n loadInertia: value.loadInertia,\n tuningParams: value.tuningParams,\n })\n};\n"]}
|
|
@@ -6,7 +6,6 @@ import { StreamBuffer } from './stream_buffer';
|
|
|
6
6
|
import { StreamMode } from './stream_mode';
|
|
7
7
|
import { StreamAxisDefinition } from './stream_axis_definition';
|
|
8
8
|
import { StreamIo } from './stream_io';
|
|
9
|
-
import { DigitalOutputAction } from './digital_output_action';
|
|
10
9
|
/**
|
|
11
10
|
* A handle for a stream with this number on the device.
|
|
12
11
|
* Streams provide a way to execute or store a sequence of actions.
|
|
@@ -348,55 +347,6 @@ export declare class Stream {
|
|
|
348
347
|
* @returns Mode of the stream.
|
|
349
348
|
*/
|
|
350
349
|
private _retrieveMode;
|
|
351
|
-
/**
|
|
352
|
-
* @deprecated Use Stream.Io.WaitDigitalInput instead.
|
|
353
|
-
*
|
|
354
|
-
* Wait for a digital input channel to reach a given value.
|
|
355
|
-
* @param channelNumber The number of the digital input channel.
|
|
356
|
-
* Channel numbers are numbered from one.
|
|
357
|
-
* @param value The value that the stream should wait for.
|
|
358
|
-
*/
|
|
359
|
-
waitDigitalInput(channelNumber: number, value: boolean): Promise<void>;
|
|
360
|
-
/**
|
|
361
|
-
* @deprecated Use Stream.Io.WaitAnalogInput instead.
|
|
362
|
-
*
|
|
363
|
-
* Wait for the value of a analog input channel to reach a condition concerning a given value.
|
|
364
|
-
* @param channelNumber The number of the analog input channel.
|
|
365
|
-
* Channel numbers are numbered from one.
|
|
366
|
-
* @param condition A condition (e.g. <, <=, ==, !=).
|
|
367
|
-
* @param value The value that the condition concerns, in Volts.
|
|
368
|
-
*/
|
|
369
|
-
waitAnalogInput(channelNumber: number, condition: string, value: number): Promise<void>;
|
|
370
|
-
/**
|
|
371
|
-
* @deprecated Use Stream.Io.SetDigitalOutput instead.
|
|
372
|
-
*
|
|
373
|
-
* Sets value for the specified digital output channel.
|
|
374
|
-
* @param channelNumber Channel number starting at 1.
|
|
375
|
-
* @param value The type of action to perform on the channel.
|
|
376
|
-
*/
|
|
377
|
-
setDigitalOutput(channelNumber: number, value: DigitalOutputAction): Promise<void>;
|
|
378
|
-
/**
|
|
379
|
-
* @deprecated Use Stream.Io.SetAllDigitalOutputs instead.
|
|
380
|
-
*
|
|
381
|
-
* Sets values for all digital output channels.
|
|
382
|
-
* @param values The type of action to perform on the channel.
|
|
383
|
-
*/
|
|
384
|
-
setAllDigitalOutputs(values: DigitalOutputAction[]): Promise<void>;
|
|
385
|
-
/**
|
|
386
|
-
* @deprecated Use Stream.Io.setAnalogOutput instead.
|
|
387
|
-
*
|
|
388
|
-
* Sets value for the specified analog output channel.
|
|
389
|
-
* @param channelNumber Channel number starting at 1.
|
|
390
|
-
* @param value Value to set the output channel voltage to.
|
|
391
|
-
*/
|
|
392
|
-
setAnalogOutput(channelNumber: number, value: number): Promise<void>;
|
|
393
|
-
/**
|
|
394
|
-
* @deprecated Use Stream.Io.setAllAnalogOutputs instead.
|
|
395
|
-
*
|
|
396
|
-
* Sets values for all analog output channels.
|
|
397
|
-
* @param values Voltage values to set the output channels to.
|
|
398
|
-
*/
|
|
399
|
-
setAllAnalogOutputs(values: number[]): Promise<void>;
|
|
400
350
|
}
|
|
401
351
|
declare namespace Stream {
|
|
402
352
|
interface WaitUntilIdleOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../src/ascii/stream.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAA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