motion-master-client 0.0.77 → 0.0.86
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/README.md +227 -138
- package/package.json +1 -1
- package/src/cli.d.ts +1 -1
- package/src/cli.js +160 -160
- package/src/index.d.ts +30 -28
- package/src/index.js +33 -31
- package/src/index.js.map +1 -1
- package/src/lib/cia402.d.ts +184 -182
- package/src/lib/cia402.js +393 -391
- package/src/lib/cia402.js.map +1 -1
- package/src/lib/config-file.d.ts +13 -13
- package/src/lib/config-file.js +49 -49
- package/src/lib/data-monitoring.d.ts +12 -12
- package/src/lib/data-monitoring.js +33 -33
- package/src/lib/device-log-line.d.ts +5 -5
- package/src/lib/device-log-line.js +2 -2
- package/src/lib/device-parameter.d.ts +56 -56
- package/src/lib/device-parameter.js +38 -38
- package/src/lib/device.d.ts +46 -9
- package/src/lib/device.js +166 -2
- package/src/lib/device.js.map +1 -1
- package/src/lib/encoder-register.d.ts +16 -16
- package/src/lib/encoder-register.js +116 -116
- package/src/lib/hardware-description.d.ts +46 -46
- package/src/lib/hardware-description.js +109 -109
- package/src/lib/integro-encoder-calibration.d.ts +31 -0
- package/src/lib/integro-encoder-calibration.js +196 -0
- package/src/lib/integro-encoder-calibration.js.map +1 -0
- package/src/lib/logger.d.ts +1 -1
- package/src/lib/logger.js +7 -7
- package/src/lib/monitoring-config.d.ts +31 -31
- package/src/lib/monitoring-config.js +2 -2
- package/src/lib/monitoring-entry.d.ts +9 -9
- package/src/lib/monitoring-entry.js +2 -2
- package/src/lib/motion-master-client.d.ts +77 -77
- package/src/lib/motion-master-client.js +196 -196
- package/src/lib/motion-master-pub-sub-client.d.ts +17 -17
- package/src/lib/motion-master-pub-sub-client.js +72 -72
- package/src/lib/motion-master-pub-sub-client.js.map +1 -1
- package/src/lib/motion-master-pub-sub-socket.d.ts +42 -42
- package/src/lib/motion-master-pub-sub-socket.js +2 -2
- package/src/lib/motion-master-pub-sub-web-socket.d.ts +18 -18
- package/src/lib/motion-master-pub-sub-web-socket.js +65 -65
- package/src/lib/motion-master-pub-sub-worker-socket.d.ts +18 -18
- package/src/lib/motion-master-pub-sub-worker-socket.js +47 -47
- package/src/lib/motion-master-req-res-client.d.ts +1104 -1062
- package/src/lib/motion-master-req-res-client.js +2137 -1997
- package/src/lib/motion-master-req-res-client.js.map +1 -1
- package/src/lib/motion-master-req-res-socket.d.ts +60 -60
- package/src/lib/motion-master-req-res-socket.js +2 -2
- package/src/lib/motion-master-req-res-web-socket.d.ts +28 -28
- package/src/lib/motion-master-req-res-web-socket.js +97 -97
- package/src/lib/motion-master-req-res-worker-socket.d.ts +24 -24
- package/src/lib/motion-master-req-res-worker-socket.js +71 -71
- package/src/lib/motion-master.proto.d.ts +5183 -5183
- package/src/lib/motion-master.proto.js +53218 -53218
- package/src/lib/operators.d.ts +20 -20
- package/src/lib/operators.js +82 -83
- package/src/lib/operators.js.map +1 -1
- package/src/lib/options.d.ts +10 -10
- package/src/lib/options.js +13 -13
- package/src/lib/os-command.d.ts +387 -173
- package/src/lib/os-command.js +555 -269
- package/src/lib/os-command.js.map +1 -1
- package/src/lib/parameter.d.ts +156 -138
- package/src/lib/parameter.js +377 -152
- package/src/lib/parameter.js.map +1 -1
- package/src/lib/product-id-range.d.ts +7 -7
- package/src/lib/product-id-range.js +11 -11
- package/src/lib/request-status-resolver.d.ts +4 -4
- package/src/lib/request-status-resolver.js +344 -344
- package/src/lib/somanet-product.d.ts +37 -0
- package/src/lib/somanet-product.js +126 -0
- package/src/lib/somanet-product.js.map +1 -0
- package/src/lib/system-log-line.d.ts +9 -9
- package/src/lib/system-log-line.js +2 -2
- package/src/lib/types.d.ts +141 -141
- package/src/lib/types.js +28 -28
- package/src/lib/urls.d.ts +3 -3
- package/src/lib/urls.js +9 -9
- package/src/lib/util.d.ts +21 -45
- package/src/lib/util.js +113 -379
- package/src/lib/util.js.map +1 -1
- package/src/lib/web-socket-connection-close-codes.d.ts +8 -8
- package/src/lib/web-socket-connection-close-codes.js +88 -88
package/src/lib/os-command.d.ts
CHANGED
|
@@ -1,173 +1,387 @@
|
|
|
1
|
-
import { RequestStatus } from "./types";
|
|
2
|
-
export interface OsCommandResponse {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
export
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* the
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
export
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
1
|
+
import { RequestStatus } from "./types";
|
|
2
|
+
export interface OsCommandResponse {
|
|
3
|
+
/**
|
|
4
|
+
* The command that was sent to the device through the 0x1023:01 OS Command.
|
|
5
|
+
*/
|
|
6
|
+
command?: Uint8Array;
|
|
7
|
+
/**
|
|
8
|
+
* Array of numbers representing the received data.
|
|
9
|
+
*
|
|
10
|
+
* The length of data depends on the response type.
|
|
11
|
+
* If the response number is 3 (Command completed with error and with response),
|
|
12
|
+
* the length can be up to 5 numbers; otherwise, it can be up to 6 numbers.
|
|
13
|
+
*/
|
|
14
|
+
data?: number[];
|
|
15
|
+
/**
|
|
16
|
+
* The error code is only set when the response number is 3 (Command completed with error and with response).
|
|
17
|
+
*
|
|
18
|
+
* The meaning of the error code can be general or command specific.
|
|
19
|
+
* General error codes start at 254 and go downwards:
|
|
20
|
+
* - 254: Unsupported command
|
|
21
|
+
* - 253: Command timeout
|
|
22
|
+
* - 252: Command aborted
|
|
23
|
+
* - 251: Command not allowed
|
|
24
|
+
* OS command specific error codes start at 0 and go upwards.
|
|
25
|
+
*/
|
|
26
|
+
errorCode?: number;
|
|
27
|
+
/**
|
|
28
|
+
* The error name is derived from the OS command number and error code number.
|
|
29
|
+
*/
|
|
30
|
+
errorName?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The error description is derived from the OS command number and error code number.
|
|
33
|
+
* The purpose of the error description is to provide more information about the error than the name can.
|
|
34
|
+
*/
|
|
35
|
+
errorDescription?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Reported progress during the OS command execution.
|
|
38
|
+
*
|
|
39
|
+
* The progress can be in the range from 0 to 100 and is computed from the command status.
|
|
40
|
+
* A status value between 100 and 200 indicates that the command is executing with a percentage (100 = 0%, 200 = 100%).
|
|
41
|
+
*/
|
|
42
|
+
progress?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Status of the request.
|
|
45
|
+
*/
|
|
46
|
+
request: RequestStatus;
|
|
47
|
+
/**
|
|
48
|
+
* Raw response as sent by the device.
|
|
49
|
+
*/
|
|
50
|
+
response: Uint8Array;
|
|
51
|
+
}
|
|
52
|
+
export declare function parseOsCommandResponse(response: Uint8Array, command?: Uint8Array): OsCommandResponse;
|
|
53
|
+
export declare enum OsCommandMode {
|
|
54
|
+
EXECUTE_THE_NEXT_COMMAND_IMMEDIATELY = 0,
|
|
55
|
+
ABORT_THE_CURRENT_COMMAND_AND_ALL_COMMANDS_IN_THE_BUFFER = 3
|
|
56
|
+
}
|
|
57
|
+
export declare enum OsCommandId {
|
|
58
|
+
CUSTOM_OS_COMMAND = -1,
|
|
59
|
+
ENCODER_REGISTER_COMMUNICATION = 0,
|
|
60
|
+
ICMU_CALIBRATION_MODE = 1,
|
|
61
|
+
OPEN_LOOP_FIELD_MODE = 2,
|
|
62
|
+
HRD_STREAMING = 3,
|
|
63
|
+
MOTOR_PHASE_ORDER_DETECTION = 4,
|
|
64
|
+
COMMUTATION_OFFSET_MEASUREMENT = 5,
|
|
65
|
+
OPEN_PHASE_DETECTION = 6,
|
|
66
|
+
POLE_PAIR_DETECTION = 7,
|
|
67
|
+
PHASE_RESISTANCE_MEASUREMENT = 8,
|
|
68
|
+
PHASE_INDUCTANCE_MEASUREMENT = 9,
|
|
69
|
+
TORQUE_CONSTANT_MEASUREMENT = 10,
|
|
70
|
+
SMM = 11,
|
|
71
|
+
SKIPPED_CYCLED_COUNTER = 13,
|
|
72
|
+
IGNORE_BISS_STATUS_BITS = 14,
|
|
73
|
+
SYSTEM_IDENTIFICATION = 15,
|
|
74
|
+
TRIGGER_ERROR = 16,
|
|
75
|
+
KUBLER_ENCODER_COMMAND = 17,
|
|
76
|
+
USE_INTERNAL_ENCODER_VELOCITY = 18,
|
|
77
|
+
KUBLER_ENCODER_REGISTER_COMMUNICATION = 19
|
|
78
|
+
}
|
|
79
|
+
export declare const osCommandErrorCode: {
|
|
80
|
+
[key: number]: string;
|
|
81
|
+
};
|
|
82
|
+
export declare function createOsCommandTypedArray(elements: number[]): Uint8Array;
|
|
83
|
+
/**
|
|
84
|
+
* OS command 0: Encoder register communication
|
|
85
|
+
*
|
|
86
|
+
* This OS command is utilized for reading or writing registers from an encoder service.
|
|
87
|
+
* Presently, the only service supporting this functionality is BiSS, but it can be easily extended to other encoder services.
|
|
88
|
+
* For more information on how BiSS register communication operates, please consult the official BiSS C Interface Protocol Description.
|
|
89
|
+
*
|
|
90
|
+
* | | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 |
|
|
91
|
+
* |--------|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|
|
|
92
|
+
* | Byte 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
|
|
93
|
+
* | Byte 1 | - | - | - | - | - | A | A | A |
|
|
94
|
+
* | Byte 2 | B | B | B | B | B | B | B | C |
|
|
95
|
+
* | Byte 3 | D | D | D | D | D | D | D | D |
|
|
96
|
+
* | Byte 4 | E | E | E | E | E | E | E | E |
|
|
97
|
+
* | Byte 5 | - | - | - | - | - | - | - | - |
|
|
98
|
+
* | Byte 6 | - | - | - | - | - | - | - | - |
|
|
99
|
+
* | Byte 7 | - | - | - | - | - | - | - | - |
|
|
100
|
+
*
|
|
101
|
+
* @param encoderOrdinal (A) 2^3=8 encoder ordinals. Counting starts from 1, so '1' refers to Encoder 1 configured in 0x2110.
|
|
102
|
+
* @param slaveAddress (B) 2^7=128 slave addresses. Select the address of the slave to read (BiSS protocol level). Since our BiSS service doesn't support multiple slaves in the same device, this value should always be 0.
|
|
103
|
+
* @param rw (C) Read or write the encoder register. Select the direction of the command: 0 for reading a register, and 1 for writing it.
|
|
104
|
+
* @param registerAddress (D) Register to be read/written.
|
|
105
|
+
* @param registerWriteValue (E) The value to write to the register. This value is ignored when reading a register (when rw is set to 0).
|
|
106
|
+
*/
|
|
107
|
+
export declare function createEncoderRegisterCommunicationOsCommand(encoderOrdinal?: number, slaveAddress?: number, rw?: number, registerAddress?: number, registerWriteValue?: number): Uint8Array;
|
|
108
|
+
export interface EncoderRegisterCommunicationOsCommandResponse extends OsCommandResponse {
|
|
109
|
+
registerValue?: number;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* OS command 1: iC-MU calibration mode
|
|
113
|
+
*
|
|
114
|
+
* This command is used to set a particular BiSS mode when using an iC-MU encoder, which is primarily employed for iC-MU calibration.
|
|
115
|
+
*
|
|
116
|
+
* The supported modes are explained below:
|
|
117
|
+
*
|
|
118
|
+
* **Configuration mode**: The BiSS service clocks the encoder normally, but it only utilizes the bits for register communication and discards the rest,
|
|
119
|
+
* thereby not updating the encoder data.
|
|
120
|
+
* This also implies that the BisCrc error is not triggered while in this mode.
|
|
121
|
+
* This mode is intended to allow the user to change the configuration in the encoder BiSS registers without encountering a BisCrc error.
|
|
122
|
+
*
|
|
123
|
+
* **Raw mode**: The BiSS service clocks the encoder assuming it was correctly configured for raw mode.
|
|
124
|
+
* It continues to calculate all the encoder data, but additionally, it averages the raw data and makes it available in 0x2704 User MISO, as follows:
|
|
125
|
+
*
|
|
126
|
+
* <table border="1">
|
|
127
|
+
* <tr>
|
|
128
|
+
* <td>31</td>
|
|
129
|
+
* <td>30</td>
|
|
130
|
+
* <td>29</td>
|
|
131
|
+
* <td>28</td>
|
|
132
|
+
* <td>27</td>
|
|
133
|
+
* <td>26</td>
|
|
134
|
+
* <td>25</td>
|
|
135
|
+
* <td>24</td>
|
|
136
|
+
* <td>23</td>
|
|
137
|
+
* <td>22</td>
|
|
138
|
+
* <td>21</td>
|
|
139
|
+
* <td>20</td>
|
|
140
|
+
* <td>19</td>
|
|
141
|
+
* <td>18</td>
|
|
142
|
+
* <td>17</td>
|
|
143
|
+
* <td>16</td>
|
|
144
|
+
* <td>15</td>
|
|
145
|
+
* <td>14</td>
|
|
146
|
+
* <td>13</td>
|
|
147
|
+
* <td>12</td>
|
|
148
|
+
* <td>11</td>
|
|
149
|
+
* <td>10</td>
|
|
150
|
+
* <td>9</td>
|
|
151
|
+
* <td>8</td>
|
|
152
|
+
* <td>7</td>
|
|
153
|
+
* <td>6</td>
|
|
154
|
+
* <td>5</td>
|
|
155
|
+
* <td>4</td>
|
|
156
|
+
* <td>3</td>
|
|
157
|
+
* <td>2</td>
|
|
158
|
+
* <td>1</td>
|
|
159
|
+
* <td>0</td>
|
|
160
|
+
* </tr>
|
|
161
|
+
* <tr>
|
|
162
|
+
* <td colspan="4" style="text-align: center;">0</td>
|
|
163
|
+
* <td colspan="14" style="text-align: center;">Nonius count</td>
|
|
164
|
+
* <td colspan="14" style="text-align: center;">Master count</td>
|
|
165
|
+
* </tr>
|
|
166
|
+
* </table>
|
|
167
|
+
*
|
|
168
|
+
* This data can also be read by using OS command 3.
|
|
169
|
+
*
|
|
170
|
+
* **Standard mode**: The BiSS service clocks the encoder normally.
|
|
171
|
+
*
|
|
172
|
+
* When transitioning from any mode to Configuration mode, the current position is saved.
|
|
173
|
+
* If we subsequently switch to Raw mode, this saved position serves as the starting point for position calculation because the raw data is relative.
|
|
174
|
+
* Therefore, the motor should not be moved while in Configuration mode if there are plans to switch to Raw mode afterward.
|
|
175
|
+
*
|
|
176
|
+
* @param encoderOrdinal (A) 2^3=8 encoder ordinals. Counting starts from 1, so '1' refers to Encoder 1 configured in 0x2110.
|
|
177
|
+
* @param modeEnable: Select the iC-MU calibration mode. Configuration mode is 0, raw mode is 1, and standard mode is 2.
|
|
178
|
+
*/
|
|
179
|
+
export declare function createIcMuCalibrationModeOsCommand(encoderOrdinal?: number, modeEnable?: number): Uint8Array;
|
|
180
|
+
export interface IcMuCalibrationModeOsCommandResponse extends OsCommandResponse {
|
|
181
|
+
calibrationModeSet?: boolean;
|
|
182
|
+
}
|
|
183
|
+
export declare function createOpenLoopFieldModeOsCommand(parameterIndex?: number, parameterValue?: number): Uint8Array;
|
|
184
|
+
export declare const openLoopFieldModeParameters: {
|
|
185
|
+
parameterIndex: number;
|
|
186
|
+
parameterName: string;
|
|
187
|
+
}[];
|
|
188
|
+
export interface OpenLoopFieldModeOsCommandResponse extends OsCommandResponse {
|
|
189
|
+
openLoopFieldMode?: boolean;
|
|
190
|
+
}
|
|
191
|
+
export declare function createHrdStreamingOsCommand(action?: number, dataIndex?: number, duration?: number): Uint8Array;
|
|
192
|
+
export interface HrdStreamingOsCommandResponse extends OsCommandResponse {
|
|
193
|
+
hrdStreamingComplete: true;
|
|
194
|
+
}
|
|
195
|
+
export declare const hrdStreamingOsCommandErrors: {
|
|
196
|
+
[key: number]: {
|
|
197
|
+
errorName: string;
|
|
198
|
+
errorDescription: string;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* Command 4: Motor phase order detection
|
|
203
|
+
*
|
|
204
|
+
* This command is used to detect the order of the motor phases.
|
|
205
|
+
* When this command finishes successfully, the found value is automatically written to the object 0x2003:5 Motor phases inverted.
|
|
206
|
+
* This command rotates the motor.
|
|
207
|
+
*
|
|
208
|
+
* This OS command has no arguments.
|
|
209
|
+
*
|
|
210
|
+
* When the command finishes successfully, it will return a value of 0 for normal and 1 for inverted motor phases.
|
|
211
|
+
*
|
|
212
|
+
* This command doesn't have any command-specific OS error code, so this status will only happen when a general OS error code occurs.
|
|
213
|
+
*
|
|
214
|
+
* This command will report its progress without indicating a percentage.
|
|
215
|
+
*
|
|
216
|
+
* This command can only be run when the opmode is -2 (OPMODE_DIAGNOSTICS), the CIA402 state is Operation enabled, there is no active limit switch,
|
|
217
|
+
* and the brake status is disengaged (in case there is a configured brake). If any of these conditions is not true during the execution of the command,
|
|
218
|
+
* the execution will stop, and it will return the OS error code 251 (command not allowed).
|
|
219
|
+
*/
|
|
220
|
+
export declare function createMotorPhaseOrderDetectionOsCommand(): Uint8Array;
|
|
221
|
+
export interface MotorPhaseOrderDetectionOsCommandResponse extends OsCommandResponse {
|
|
222
|
+
motorPhaseOrder?: number;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Command 5: Commutation offset measurement
|
|
226
|
+
*
|
|
227
|
+
* This command is used to measure the commutation angle offset.
|
|
228
|
+
* The configuration of the procedure is derived from the pre-existing and previously used commutation offset objects in the object dictionary.
|
|
229
|
+
* Upon successful completion of this command, the determined value is automatically written to:
|
|
230
|
+
* - 0x2001:00 Commutation angle offset
|
|
231
|
+
* - 0x2009:01 State is set to OFFSET_VALID
|
|
232
|
+
*
|
|
233
|
+
* In version 5.0, three different methods can be selected for command 5. These methods are named:
|
|
234
|
+
* - Commutation offset measurement - method 0
|
|
235
|
+
* - Commutation offset measurement - method 1
|
|
236
|
+
* - Commutation offset measurement - method 2
|
|
237
|
+
* Among these three methods, "method 0" and "method 1" involve rotating the rotor.
|
|
238
|
+
*
|
|
239
|
+
* This command can only be run when the opmode is -2 (OPMODE_DIAGNOSTICS) and the CIA402 state is Operation enabled.
|
|
240
|
+
* Additionally, if the commutation offset measurement method (0x2009:3) is set to 0 or 1,
|
|
241
|
+
* the command is permissible only when there are no active limit switches, and the brake status is disengaged (in case a brake is configured).
|
|
242
|
+
* If any of these conditions is not met during the execution of the command, the execution will be halted,
|
|
243
|
+
* and it will return the OS error code 251 (Command not allowed).
|
|
244
|
+
*/
|
|
245
|
+
export declare function createCommutationOffsetMeasurementOsCommand(): Uint8Array;
|
|
246
|
+
export interface CommutationOffsetMeasurementOsCommandResponse extends OsCommandResponse {
|
|
247
|
+
commutationAngleOffset?: number;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Command 6: Open phase detection
|
|
251
|
+
*
|
|
252
|
+
* This command is used to detect whether one of the phases is open.
|
|
253
|
+
* It might rotate the motor if there is no brake or if it is disengaged.
|
|
254
|
+
*
|
|
255
|
+
* If this command finishes successfully, it indicates that all motor phases seem to be fine.
|
|
256
|
+
*
|
|
257
|
+
* This command can only be run when the opmode is -2 (OPMODE_DIAGNOSTICS), the CIA402 state is Operation enabled,
|
|
258
|
+
* and there is no limit switch active. If any of these conditions is not true during the execution of the command,
|
|
259
|
+
* the execution will stop, and it will return the OS error code 251 (Command not allowed).
|
|
260
|
+
*/
|
|
261
|
+
export declare function createOpenPhaseDetectionOsCommand(): Uint8Array;
|
|
262
|
+
export interface OpenPhaseDetectionOsCommandResponse extends OsCommandResponse {
|
|
263
|
+
phaseOpened?: boolean;
|
|
264
|
+
}
|
|
265
|
+
export declare const openPhaseDetectionErrors: {
|
|
266
|
+
[key: number]: {
|
|
267
|
+
errorName: string;
|
|
268
|
+
errorDescription: string;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
/**
|
|
272
|
+
* Command 7: Pole pair detection
|
|
273
|
+
*
|
|
274
|
+
* This command is used to detect the number of pole pairs that the connected motor has.
|
|
275
|
+
* It requires the rotation of the rotor.
|
|
276
|
+
*
|
|
277
|
+
* This command can only be run when the opmode is -2 (OPMODE_DIAGNOSTICS), the CIA402 state is Operation enabled,
|
|
278
|
+
* and there is no limit switch active. If any of these conditions is not true during the execution of the command,
|
|
279
|
+
* the execution will stop, and it will return the OS error code 251 (Command not allowed).
|
|
280
|
+
*/
|
|
281
|
+
export declare function createPolePairDetectionOsCommand(): Uint8Array;
|
|
282
|
+
export interface PolePairDetectionOsCommandResponse extends OsCommandResponse {
|
|
283
|
+
numberOfPolePairs?: number;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Command 8: Phase resistance measurement
|
|
287
|
+
*
|
|
288
|
+
* This command is used to measure the phase resistance of the motor in milliohms (mΩ).
|
|
289
|
+
* It might rotate the motor if there is no brake or if it is disengaged.
|
|
290
|
+
*
|
|
291
|
+
* This command can only be run when the opmode is -2 (OPMODE_DIAGNOSTICS), the CIA402 state is Operation enabled,
|
|
292
|
+
* and there is no limit switch active. If any of these conditions is not true during the execution of the command,
|
|
293
|
+
* the execution will stop, and it will return the OS error code 251 (Command not allowed).
|
|
294
|
+
*/
|
|
295
|
+
export declare function createPhaseResistanceMeasurementOsCommand(): Uint8Array;
|
|
296
|
+
export interface PhaseResistanceMeasurementOsCommandResponse extends OsCommandResponse {
|
|
297
|
+
phaseResistance?: number;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Command 9: Phase inductance measurement
|
|
301
|
+
*
|
|
302
|
+
* This command is used to measure the phase inductance of the motor in microhenries (μH).
|
|
303
|
+
* It might rotate the motor if there is no brake or if it is disengaged.
|
|
304
|
+
*
|
|
305
|
+
* This command can only be run when the opmode is -2 (OPMODE_DIAGNOSTICS), the CIA402 state is Operation enabled,
|
|
306
|
+
* and there is no limit switch active. If any of these conditions is not true during the execution of the command,
|
|
307
|
+
* the execution will stop, and it will return the OS error code 251 (Command not allowed).
|
|
308
|
+
*/
|
|
309
|
+
export declare function createPhaseInductanceMeasurementOsCommand(): Uint8Array;
|
|
310
|
+
export interface PhaseInductanceMeasurementOsCommandResponse extends OsCommandResponse {
|
|
311
|
+
phaseInductance?: number;
|
|
312
|
+
}
|
|
313
|
+
export declare function createTorqueConstantMeasurementOsCommand(): Uint8Array;
|
|
314
|
+
export interface TorqueConstantMeasurementOsCommandResponse extends OsCommandResponse {
|
|
315
|
+
torqueConstant: number;
|
|
316
|
+
}
|
|
317
|
+
export declare function createSkippedCyclesCounterOsCommand(firmwareService?: number): Uint8Array;
|
|
318
|
+
export interface SkippedCyclesCounterOsCommandResponse extends OsCommandResponse {
|
|
319
|
+
skippedCycles: number;
|
|
320
|
+
}
|
|
321
|
+
export declare function createIgnoreBissStatusBitsOsCommand(trigger?: number, encoderOrdinal?: number): Uint8Array;
|
|
322
|
+
export interface IgnoreBissStatusBitsOsCommandResponse extends OsCommandResponse {
|
|
323
|
+
ignoringBissStatusBits: boolean;
|
|
324
|
+
}
|
|
325
|
+
export declare function createSystemIdentificationOsCommand(parameterIndex?: number, parameterValue?: number): Uint8Array;
|
|
326
|
+
export declare const systemIdentificationParameters: {
|
|
327
|
+
parameterIndex: number;
|
|
328
|
+
parameterName: string;
|
|
329
|
+
}[];
|
|
330
|
+
export interface SystemIdentificationOsCommandResponse extends OsCommandResponse {
|
|
331
|
+
systemIdentificationCompleted?: boolean;
|
|
332
|
+
}
|
|
333
|
+
export declare function createTriggerErrorOsCommand(firmwareService?: number, errorType?: number): Uint8Array;
|
|
334
|
+
export interface TriggerErrorOsCommandResponse extends OsCommandResponse {
|
|
335
|
+
errorSet: boolean;
|
|
336
|
+
}
|
|
337
|
+
export declare const triggerErrorTypes: {
|
|
338
|
+
value: number;
|
|
339
|
+
name: string;
|
|
340
|
+
}[];
|
|
341
|
+
export declare function createKublerEncoderCommand(command?: number): Uint8Array;
|
|
342
|
+
export interface KublerEncoderCommandOsCommandResponse extends OsCommandResponse {
|
|
343
|
+
numberOfBytesWritten: number;
|
|
344
|
+
responseInFoeBuffer: boolean;
|
|
345
|
+
}
|
|
346
|
+
export declare const kublerEncoderCommandWriteCorrectionTableOsCommandErrors: {
|
|
347
|
+
[key: number]: {
|
|
348
|
+
errorName: string;
|
|
349
|
+
errorDescription: string;
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
export declare const kublerEncoderCommandSendScpiCommandOsCommandErrors: {
|
|
353
|
+
[key: number]: {
|
|
354
|
+
errorName: string;
|
|
355
|
+
errorDescription: string;
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
export declare function createUseInternalEncoderVelocityOsCommand(trigger?: number): Uint8Array;
|
|
359
|
+
export interface UseInternalEncoderVelocityOsCommandResponse extends OsCommandResponse {
|
|
360
|
+
usingInternalEncoderVelocity: boolean;
|
|
361
|
+
}
|
|
362
|
+
export declare function createKublerEncoderRegisterCommunicationOsCommand(rw?: number, registerAddress?: number, registerLength?: number, registerWriteValue?: number): Uint8Array;
|
|
363
|
+
export interface KublerEncoderRegisterCommunicationOsCommandResponse extends OsCommandResponse {
|
|
364
|
+
kublerRegisterValue: number;
|
|
365
|
+
}
|
|
366
|
+
export declare const kublerEncoderRegisterCommunicationReadOsCommandErrors: {
|
|
367
|
+
[key: number]: {
|
|
368
|
+
errorName: string;
|
|
369
|
+
errorDescription: string;
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
export declare const kublerEncoderRegisterCommunicationWriteOsCommandErrors: {
|
|
373
|
+
[key: number]: {
|
|
374
|
+
errorName: string;
|
|
375
|
+
errorDescription: string;
|
|
376
|
+
};
|
|
377
|
+
};
|
|
378
|
+
export declare const kublerEncoderRegisterValueMeaning: {
|
|
379
|
+
[register: string]: {
|
|
380
|
+
[value: string]: string;
|
|
381
|
+
};
|
|
382
|
+
};
|
|
383
|
+
export interface OsCommand {
|
|
384
|
+
id: OsCommandId;
|
|
385
|
+
name: string;
|
|
386
|
+
}
|
|
387
|
+
export declare const osCommands: OsCommand[];
|