motion-master-client 0.0.43 → 0.0.44

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.
Files changed (125) hide show
  1. package/package.json +17 -2
  2. package/src/index.js +29 -0
  3. package/src/index.js.map +1 -0
  4. package/src/lib/cia402.d.ts +182 -0
  5. package/src/lib/cia402.js +392 -0
  6. package/src/lib/cia402.js.map +1 -0
  7. package/src/lib/config-file.d.ts +13 -0
  8. package/src/lib/config-file.js +50 -0
  9. package/src/lib/config-file.js.map +1 -0
  10. package/src/lib/device-log-line.d.ts +5 -0
  11. package/src/lib/device-log-line.js +3 -0
  12. package/src/lib/device-log-line.js.map +1 -0
  13. package/src/lib/device-parameter.d.ts +56 -0
  14. package/src/lib/device-parameter.js +39 -0
  15. package/src/lib/device-parameter.js.map +1 -0
  16. package/src/lib/device.d.ts +9 -0
  17. package/src/lib/device.js +3 -0
  18. package/src/lib/device.js.map +1 -0
  19. package/src/lib/hardware-description.d.ts +41 -0
  20. package/src/lib/hardware-description.js +94 -0
  21. package/src/lib/hardware-description.js.map +1 -0
  22. package/src/lib/logger.d.ts +1 -0
  23. package/src/lib/logger.js +8 -0
  24. package/src/lib/logger.js.map +1 -0
  25. package/src/lib/monitoring-config.d.ts +6 -0
  26. package/src/lib/monitoring-config.js +3 -0
  27. package/src/lib/monitoring-config.js.map +1 -0
  28. package/src/lib/{monitoring-entry.ts → monitoring-entry.d.ts} +4 -5
  29. package/src/lib/monitoring-entry.js +3 -0
  30. package/src/lib/monitoring-entry.js.map +1 -0
  31. package/src/lib/motion-master-client.d.ts +56 -0
  32. package/src/lib/motion-master-client.js +167 -0
  33. package/src/lib/motion-master-client.js.map +1 -0
  34. package/src/lib/motion-master-pub-sub-client.d.ts +17 -0
  35. package/src/lib/motion-master-pub-sub-client.js +73 -0
  36. package/src/lib/motion-master-pub-sub-client.js.map +1 -0
  37. package/src/lib/motion-master-pub-sub-socket.d.ts +34 -0
  38. package/src/lib/motion-master-pub-sub-socket.js +3 -0
  39. package/src/lib/motion-master-pub-sub-socket.js.map +1 -0
  40. package/src/lib/motion-master-pub-sub-web-socket.d.ts +14 -0
  41. package/src/lib/motion-master-pub-sub-web-socket.js +67 -0
  42. package/src/lib/motion-master-pub-sub-web-socket.js.map +1 -0
  43. package/src/lib/motion-master-pub-sub-worker-socket.d.ts +14 -0
  44. package/src/lib/motion-master-pub-sub-worker-socket.js +42 -0
  45. package/src/lib/motion-master-pub-sub-worker-socket.js.map +1 -0
  46. package/src/lib/motion-master-req-res-client.d.ts +947 -0
  47. package/src/lib/motion-master-req-res-client.js +1735 -0
  48. package/src/lib/motion-master-req-res-client.js.map +1 -0
  49. package/src/lib/motion-master-req-res-socket.d.ts +52 -0
  50. package/src/lib/motion-master-req-res-socket.js +3 -0
  51. package/src/lib/motion-master-req-res-socket.js.map +1 -0
  52. package/src/lib/motion-master-req-res-web-socket.d.ts +24 -0
  53. package/src/lib/motion-master-req-res-web-socket.js +99 -0
  54. package/src/lib/motion-master-req-res-web-socket.js.map +1 -0
  55. package/src/lib/motion-master-req-res-worker-socket.d.ts +20 -0
  56. package/src/lib/motion-master-req-res-worker-socket.js +69 -0
  57. package/src/lib/motion-master-req-res-worker-socket.js.map +1 -0
  58. package/src/lib/operators.d.ts +20 -0
  59. package/src/lib/operators.js +85 -0
  60. package/src/lib/operators.js.map +1 -0
  61. package/src/lib/options.d.ts +10 -0
  62. package/src/lib/options.js +14 -0
  63. package/src/lib/options.js.map +1 -0
  64. package/src/lib/parameter.d.ts +72 -0
  65. package/src/lib/parameter.js +119 -0
  66. package/src/lib/parameter.js.map +1 -0
  67. package/src/lib/product-id-range.d.ts +7 -0
  68. package/src/lib/product-id-range.js +12 -0
  69. package/src/lib/product-id-range.js.map +1 -0
  70. package/src/lib/request-status-resolver.d.ts +4 -0
  71. package/src/lib/request-status-resolver.js +345 -0
  72. package/src/lib/request-status-resolver.js.map +1 -0
  73. package/src/lib/system-log-line.d.ts +9 -0
  74. package/src/lib/system-log-line.js +3 -0
  75. package/src/lib/system-log-line.js.map +1 -0
  76. package/src/lib/{types.ts → types.d.ts} +149 -81
  77. package/src/lib/types.js +29 -0
  78. package/src/lib/types.js.map +1 -0
  79. package/src/lib/urls.d.ts +3 -0
  80. package/src/lib/urls.js +10 -0
  81. package/src/lib/urls.js.map +1 -0
  82. package/src/lib/util.d.ts +42 -0
  83. package/src/lib/util.js +326 -0
  84. package/src/lib/util.js.map +1 -0
  85. package/.babelrc +0 -3
  86. package/.eslintrc.json +0 -18
  87. package/jest.config.ts +0 -16
  88. package/motion-master.proto +0 -1822
  89. package/project.json +0 -45
  90. package/src/lib/cia402.spec.ts +0 -77
  91. package/src/lib/cia402.ts +0 -414
  92. package/src/lib/config-file.spec.ts +0 -114
  93. package/src/lib/config-file.ts +0 -63
  94. package/src/lib/device-log-line.ts +0 -5
  95. package/src/lib/device-parameter.spec.ts +0 -85
  96. package/src/lib/device-parameter.ts +0 -79
  97. package/src/lib/device.ts +0 -10
  98. package/src/lib/hardware-description.spec.ts +0 -253
  99. package/src/lib/hardware-description.ts +0 -129
  100. package/src/lib/logger.ts +0 -5
  101. package/src/lib/monitoring-config.ts +0 -6
  102. package/src/lib/motion-master-client.ts +0 -250
  103. package/src/lib/motion-master-pub-sub-client.ts +0 -100
  104. package/src/lib/motion-master-pub-sub-socket.ts +0 -40
  105. package/src/lib/motion-master-pub-sub-web-socket.ts +0 -78
  106. package/src/lib/motion-master-pub-sub-worker-socket.ts +0 -51
  107. package/src/lib/motion-master-req-res-client.spec.ts +0 -740
  108. package/src/lib/motion-master-req-res-client.ts +0 -2206
  109. package/src/lib/motion-master-req-res-socket.ts +0 -62
  110. package/src/lib/motion-master-req-res-web-socket.ts +0 -124
  111. package/src/lib/motion-master-req-res-worker-socket.ts +0 -87
  112. package/src/lib/operators.ts +0 -110
  113. package/src/lib/options.ts +0 -12
  114. package/src/lib/parameter.spec.ts +0 -160
  115. package/src/lib/parameter.ts +0 -170
  116. package/src/lib/product-id-range.ts +0 -8
  117. package/src/lib/request-status-resolver.ts +0 -403
  118. package/src/lib/system-log-line.ts +0 -9
  119. package/src/lib/urls.ts +0 -6
  120. package/src/lib/util.ts +0 -317
  121. package/tsconfig.json +0 -23
  122. package/tsconfig.lib.json +0 -10
  123. package/tsconfig.spec.json +0 -20
  124. package/typedoc.json +0 -10
  125. /package/src/{index.ts → index.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,21 @@
1
1
  {
2
2
  "name": "motion-master-client",
3
- "version": "0.0.43",
3
+ "version": "0.0.44",
4
4
  "type": "commonjs",
5
- "description": "A library and CLI program used for communicating with Motion Master."
5
+ "description": "A library and CLI program used for communicating with Motion Master.",
6
+ "dependencies": {
7
+ "fast-deep-equal": "^3.1.3",
8
+ "lodash": "^4.17.21",
9
+ "papaparse": "^5.4.1",
10
+ "protobufjs": "^7.2.3",
11
+ "roarr": "^7.15.0",
12
+ "rxjs": "^7.8.1",
13
+ "semver": "^7.5.1",
14
+ "uuid": "^9.0.0"
15
+ },
16
+ "peerDependencies": {
17
+ "tslib": "2.5.3"
18
+ },
19
+ "main": "./src/index.js",
20
+ "types": "./src/index.d.ts"
6
21
  }
package/src/index.js ADDED
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./lib/cia402"), exports);
5
+ tslib_1.__exportStar(require("./lib/config-file"), exports);
6
+ tslib_1.__exportStar(require("./lib/device-log-line"), exports);
7
+ tslib_1.__exportStar(require("./lib/device-parameter"), exports);
8
+ tslib_1.__exportStar(require("./lib/device"), exports);
9
+ tslib_1.__exportStar(require("./lib/hardware-description"), exports);
10
+ tslib_1.__exportStar(require("./lib/monitoring-config"), exports);
11
+ tslib_1.__exportStar(require("./lib/monitoring-entry"), exports);
12
+ tslib_1.__exportStar(require("./lib/motion-master-client"), exports);
13
+ tslib_1.__exportStar(require("./lib/motion-master-pub-sub-client"), exports);
14
+ tslib_1.__exportStar(require("./lib/motion-master-pub-sub-socket"), exports);
15
+ tslib_1.__exportStar(require("./lib/motion-master-pub-sub-web-socket"), exports);
16
+ tslib_1.__exportStar(require("./lib/motion-master-pub-sub-worker-socket"), exports);
17
+ tslib_1.__exportStar(require("./lib/motion-master-req-res-client"), exports);
18
+ tslib_1.__exportStar(require("./lib/motion-master-req-res-socket"), exports);
19
+ tslib_1.__exportStar(require("./lib/motion-master-req-res-web-socket"), exports);
20
+ tslib_1.__exportStar(require("./lib/motion-master-req-res-worker-socket"), exports);
21
+ tslib_1.__exportStar(require("./lib/operators"), exports);
22
+ tslib_1.__exportStar(require("./lib/options"), exports);
23
+ tslib_1.__exportStar(require("./lib/parameter"), exports);
24
+ tslib_1.__exportStar(require("./lib/request-status-resolver"), exports);
25
+ tslib_1.__exportStar(require("./lib/system-log-line"), exports);
26
+ tslib_1.__exportStar(require("./lib/types"), exports);
27
+ tslib_1.__exportStar(require("./lib/urls"), exports);
28
+ tslib_1.__exportStar(require("./lib/util"), exports);
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/motion-master-client/src/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,4DAAkC;AAClC,gEAAsC;AACtC,iEAAuC;AACvC,uDAA6B;AAC7B,qEAA2C;AAC3C,kEAAwC;AACxC,iEAAuC;AACvC,qEAA2C;AAC3C,6EAAmD;AACnD,6EAAmD;AACnD,iFAAuD;AACvD,oFAA0D;AAC1D,6EAAmD;AACnD,6EAAmD;AACnD,iFAAuD;AACvD,oFAA0D;AAC1D,0DAAgC;AAChC,wDAA8B;AAC9B,0DAAgC;AAChC,wEAA8C;AAC9C,gEAAsC;AACtC,sDAA4B;AAC5B,qDAA2B;AAC3B,qDAA2B"}
@@ -0,0 +1,182 @@
1
+ export declare const statuswordBits: string[];
2
+ /**
3
+ * CIA402 refers to the CANopen application profile for drives and motion control.
4
+ * It defines various states that a CiA402-compliant device, such as a motor drive, can be in.
5
+ *
6
+ * @enum
7
+ */
8
+ export declare enum Cia402State {
9
+ /**
10
+ * Not ready to switch on (NRS).
11
+ *
12
+ * This is the initial state where the drive is not ready to be switched on.
13
+ * In this state, the drive is not powered or initialized.
14
+ */
15
+ NOT_READY_TO_SWITCH_ON = "NOT_READY_TO_SWITCH_ON",
16
+ /**
17
+ * Switch on disabled (SOD).
18
+ *
19
+ * In this state, the drive is powered and initialized but cannot be switched on.
20
+ * This state is usually used for safety purposes or when certain conditions need to be met before enabling the drive.
21
+ */
22
+ SWITCH_ON_DISABLED = "SWITCH_ON_DISABLED",
23
+ /**
24
+ * Ready to switch on (RTS).
25
+ *
26
+ * In this state, the drive is ready to be switched on.
27
+ * It has been powered and initialized, and it is waiting for the switch-on command.
28
+ */
29
+ READY_TO_SWITCH_ON = "READY_TO_SWITCH_ON",
30
+ /**
31
+ * Switched on (SWO).
32
+ *
33
+ * When the switch-on command is received, the drive enters this state.
34
+ * In this state, the drive is energized and ready to start motion.
35
+ */
36
+ SWITCHED_ON = "SWITCHED_ON",
37
+ /**
38
+ * Operation enabled (OP).
39
+ *
40
+ * This state indicates that the drive is enabled and ready to perform its intended operation.
41
+ * It can receive motion commands and execute them.
42
+ */
43
+ OPERATION_ENABLED = "OPERATION_ENABLED",
44
+ /**
45
+ * Quick stop active (QSA).
46
+ *
47
+ * This state is used to bring the drive to an immediate stop.
48
+ * It is typically triggered by an emergency stop or a quick stop command.
49
+ */
50
+ QUICK_STOP_ACTIVE = "QUICK_STOP_ACTIVE",
51
+ /**
52
+ * Fault reaction active (FRA).
53
+ *
54
+ * When a fault or error condition occurs, the drive enters this state.
55
+ * It indicates that the drive is responding to the fault by taking appropriate actions,
56
+ * such as shutting down or entering a safe state.
57
+ */
58
+ FAULT_REACTION_ACTIVE = "FAULT_REACTION_ACTIVE",
59
+ /**
60
+ * Fault (FLT).
61
+ *
62
+ * This state signifies that a fault condition has been detected and the drive is no longer operational.
63
+ * It requires manual intervention or troubleshooting to resolve the fault
64
+ * and bring the drive back to a functional state.
65
+ */
66
+ FAULT = "FAULT"
67
+ }
68
+ export declare const cia402StateMap: Map<number, Cia402State>;
69
+ export declare function getCia402State(value: number): Cia402State;
70
+ export declare function isInternalLimitActive(statusword: number): boolean;
71
+ export declare const controlwordBits: string[];
72
+ /**
73
+ * In the CiA402 standard for drives and motion control, the controlword is a key component
74
+ * used to command and control the operation of a CiA402-compliant device, such as a motor drive.
75
+ * The controlword is typically a 16-bit value,
76
+ * and it consists of several bits that represent different control commands.
77
+ *
78
+ * @enum
79
+ */
80
+ export declare enum ControlwordCommand {
81
+ SHUTDOWN = "SHUTDOWN",
82
+ SWITCH_ON = "SWITCH_ON",
83
+ SWITCH_ON_ENABLE_OPERATION = "SWITCH_ON_ENABLE_OPERATION",
84
+ DISABLE_VOLTAGE = "DISABLE_VOLTAGE",
85
+ /**
86
+ * Quick Stop.
87
+ *
88
+ * This command initiates a quick stop of the drive.
89
+ * When this bit is set to 1, the drive enters the "Quick stop active" state,
90
+ * causing the motor to decelerate and come to a stop as quickly as possible.
91
+ */
92
+ QUICK_STOP = "QUICK_STOP",
93
+ DISABLE_OPERATION = "DISABLE_OPERATION",
94
+ /**
95
+ * Enable Operation.
96
+ *
97
+ * This command enables the drive to perform its intended operation.
98
+ * When this bit is set to 1, the drive transitions from the "Ready to switch on" state to the "Operation enabled" state.
99
+ */
100
+ ENABLE_OPERATION = "ENABLE_OPERATION",
101
+ /**
102
+ * Fault Reset.
103
+ *
104
+ * This command resets a fault condition and clears any fault flags or errors that may have occurred.
105
+ * When this bit is set to 1, the drive attempts to recover from a fault and return to an operational state.
106
+ */
107
+ FAULT_RESET = "FAULT_RESET"
108
+ }
109
+ /**
110
+ * Return one of the controlword commands based its value.
111
+ *
112
+ * NOTE: DISABLE_OPERATION and ENABLE_OPERATION are never returned.
113
+ * Their values are the same as SWITCH_ON and SWITCH_ON_ENABLE_OPERATION.
114
+ * What controlword is commanded depends on the transition.
115
+ */
116
+ export declare function getCommandFromControlword(value: number): ControlwordCommand | undefined;
117
+ export declare const controlwordOptions: {
118
+ Shutdown: number;
119
+ 'Switch on': number;
120
+ 'Switch on + enable operation': number;
121
+ 'Disable voltage': number;
122
+ 'Quick stop': number;
123
+ 'Disable operation': number;
124
+ 'Enable operation': number;
125
+ 'Fault reset': number;
126
+ };
127
+ export declare const controlwordCommandOptions: ControlwordCommand[];
128
+ export declare const controlwordCommandBitmasks: {
129
+ SHUTDOWN: number[];
130
+ SWITCH_ON: number[];
131
+ SWITCH_ON_ENABLE_OPERATION: number[];
132
+ DISABLE_VOLTAGE: number[];
133
+ QUICK_STOP: number[];
134
+ DISABLE_OPERATION: number[];
135
+ ENABLE_OPERATION: number[];
136
+ FAULT_RESET: number[];
137
+ };
138
+ export declare function createControlwordCommand(value: number, command: ControlwordCommand): number;
139
+ /**
140
+ * CiA402 transitions.
141
+ *
142
+ * List of allowed transitions with controlword command.
143
+ *
144
+ * The following transitions are automatic:
145
+ * - 0: START -> NOT_READY_TO_SWITCH_ON
146
+ * - 1: NOT_READY_TO_SWITCH_ON -> SWITCH_ON_DISABLED
147
+ * - 13: ANY -> FAULT_REACTION_ACTIVE
148
+ * - 14: FAULT_REACTION_ACTIVE -> FAULT
149
+ */
150
+ export declare const cia402Transitions: {
151
+ from: Cia402State;
152
+ to: Cia402State;
153
+ transitions: number[];
154
+ command: ControlwordCommand;
155
+ }[];
156
+ export declare enum ModesOfOperation {
157
+ OPEN_LOOP_FIELD_MODE = -3,
158
+ DIAGNOSTICS_MODE = -2,
159
+ COGGING_COMPENSATION_RECORDING_MODE = -1,
160
+ NO_MODE_ASSIGNED = 0,
161
+ PROFILE_POSITION_MODE = 1,
162
+ PROFILE_VELOCITY_MODE = 3,
163
+ TORQUE_PROFILE_MODE = 4,
164
+ HOMING_MODE = 6,
165
+ CYCLIC_SYNC_POSITION_MODE = 8,
166
+ CYCLIC_SYNC_VELOCITY_MODE = 9,
167
+ CYCLIC_SYNC_TORQUE_MODE = 10
168
+ }
169
+ export declare const modesOfOperationOptions: {
170
+ 'Open loop field mode': ModesOfOperation;
171
+ 'Diagnostics mode': ModesOfOperation;
172
+ 'Cogging compensation recording mode': ModesOfOperation;
173
+ 'No mode assigned': ModesOfOperation;
174
+ 'Profile position mode': ModesOfOperation;
175
+ 'Profile velocity mode': ModesOfOperation;
176
+ 'Torque profile mode': ModesOfOperation;
177
+ 'Homing mode': ModesOfOperation;
178
+ 'Cyclic synchronous position mode': ModesOfOperation;
179
+ 'Cyclic synchronous velocity mode': ModesOfOperation;
180
+ 'Cyclic synchronous torque mode': ModesOfOperation;
181
+ };
182
+ export declare const supportedDriveModesBits: string[];
@@ -0,0 +1,392 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.supportedDriveModesBits = exports.modesOfOperationOptions = exports.ModesOfOperation = exports.cia402Transitions = exports.createControlwordCommand = exports.controlwordCommandBitmasks = exports.controlwordCommandOptions = exports.controlwordOptions = exports.getCommandFromControlword = exports.ControlwordCommand = exports.controlwordBits = exports.isInternalLimitActive = exports.getCia402State = exports.cia402StateMap = exports.Cia402State = exports.statuswordBits = void 0;
4
+ exports.statuswordBits = [
5
+ 'rtso = ready to switch on',
6
+ 'so = switched on',
7
+ 'oe = operation enabled',
8
+ 'f = fault',
9
+ 've = voltage enabled',
10
+ 'qs = quick stop',
11
+ 'sod = switch on disabled',
12
+ 'w = warning',
13
+ 'ms = manufacturer-specific',
14
+ 'rm = remote',
15
+ 'tr = target reached',
16
+ 'ila = internal limit active',
17
+ 'oms = operation-mode-specific',
18
+ 'oms = operation-mode-specific',
19
+ 'ms = manufacturer-specific',
20
+ 'ms = manufacturer-specific',
21
+ ];
22
+ /**
23
+ * CIA402 refers to the CANopen application profile for drives and motion control.
24
+ * It defines various states that a CiA402-compliant device, such as a motor drive, can be in.
25
+ *
26
+ * @enum
27
+ */
28
+ var Cia402State;
29
+ (function (Cia402State) {
30
+ /**
31
+ * Not ready to switch on (NRS).
32
+ *
33
+ * This is the initial state where the drive is not ready to be switched on.
34
+ * In this state, the drive is not powered or initialized.
35
+ */
36
+ Cia402State["NOT_READY_TO_SWITCH_ON"] = "NOT_READY_TO_SWITCH_ON";
37
+ /**
38
+ * Switch on disabled (SOD).
39
+ *
40
+ * In this state, the drive is powered and initialized but cannot be switched on.
41
+ * This state is usually used for safety purposes or when certain conditions need to be met before enabling the drive.
42
+ */
43
+ Cia402State["SWITCH_ON_DISABLED"] = "SWITCH_ON_DISABLED";
44
+ /**
45
+ * Ready to switch on (RTS).
46
+ *
47
+ * In this state, the drive is ready to be switched on.
48
+ * It has been powered and initialized, and it is waiting for the switch-on command.
49
+ */
50
+ Cia402State["READY_TO_SWITCH_ON"] = "READY_TO_SWITCH_ON";
51
+ /**
52
+ * Switched on (SWO).
53
+ *
54
+ * When the switch-on command is received, the drive enters this state.
55
+ * In this state, the drive is energized and ready to start motion.
56
+ */
57
+ Cia402State["SWITCHED_ON"] = "SWITCHED_ON";
58
+ /**
59
+ * Operation enabled (OP).
60
+ *
61
+ * This state indicates that the drive is enabled and ready to perform its intended operation.
62
+ * It can receive motion commands and execute them.
63
+ */
64
+ Cia402State["OPERATION_ENABLED"] = "OPERATION_ENABLED";
65
+ /**
66
+ * Quick stop active (QSA).
67
+ *
68
+ * This state is used to bring the drive to an immediate stop.
69
+ * It is typically triggered by an emergency stop or a quick stop command.
70
+ */
71
+ Cia402State["QUICK_STOP_ACTIVE"] = "QUICK_STOP_ACTIVE";
72
+ /**
73
+ * Fault reaction active (FRA).
74
+ *
75
+ * When a fault or error condition occurs, the drive enters this state.
76
+ * It indicates that the drive is responding to the fault by taking appropriate actions,
77
+ * such as shutting down or entering a safe state.
78
+ */
79
+ Cia402State["FAULT_REACTION_ACTIVE"] = "FAULT_REACTION_ACTIVE";
80
+ /**
81
+ * Fault (FLT).
82
+ *
83
+ * This state signifies that a fault condition has been detected and the drive is no longer operational.
84
+ * It requires manual intervention or troubleshooting to resolve the fault
85
+ * and bring the drive back to a functional state.
86
+ */
87
+ Cia402State["FAULT"] = "FAULT";
88
+ })(Cia402State = exports.Cia402State || (exports.Cia402State = {}));
89
+ ;
90
+ exports.cia402StateMap = new Map([
91
+ [0b00000000, Cia402State.NOT_READY_TO_SWITCH_ON],
92
+ [0b01000000, Cia402State.SWITCH_ON_DISABLED],
93
+ [0b00100001, Cia402State.READY_TO_SWITCH_ON],
94
+ [0b00100011, Cia402State.SWITCHED_ON],
95
+ [0b00100111, Cia402State.OPERATION_ENABLED],
96
+ [0b00000111, Cia402State.QUICK_STOP_ACTIVE],
97
+ [0b00001111, Cia402State.FAULT_REACTION_ACTIVE],
98
+ [0b00001000, Cia402State.FAULT],
99
+ ]);
100
+ function getCia402State(value) {
101
+ var _a, _b;
102
+ return (_b = ((_a = exports.cia402StateMap.get(value & 0b01101111)) !== null && _a !== void 0 ? _a : exports.cia402StateMap.get(value & 0b01001111))) !== null && _b !== void 0 ? _b : Cia402State.NOT_READY_TO_SWITCH_ON;
103
+ }
104
+ exports.getCia402State = getCia402State;
105
+ function isInternalLimitActive(statusword) {
106
+ return (0x800 & statusword) === 0x800;
107
+ }
108
+ exports.isInternalLimitActive = isInternalLimitActive;
109
+ exports.controlwordBits = [
110
+ 'so = switch on',
111
+ 'ev = enable voltage',
112
+ 'qs = quick stop',
113
+ 'eo = enable operation',
114
+ 'oms = operation mode specific',
115
+ 'oms = operation mode specific',
116
+ 'oms = operation mode specific',
117
+ 'fr = fault reset',
118
+ 'h = halt',
119
+ 'oms = operation mode specific',
120
+ 'r = reserved',
121
+ 'ms = manufacturer-specific',
122
+ 'ms = manufacturer-specific',
123
+ 'ms = manufacturer-specific',
124
+ 'ms = manufacturer-specific',
125
+ 'ms = manufacturer-specific',
126
+ ];
127
+ /**
128
+ * In the CiA402 standard for drives and motion control, the controlword is a key component
129
+ * used to command and control the operation of a CiA402-compliant device, such as a motor drive.
130
+ * The controlword is typically a 16-bit value,
131
+ * and it consists of several bits that represent different control commands.
132
+ *
133
+ * @enum
134
+ */
135
+ var ControlwordCommand;
136
+ (function (ControlwordCommand) {
137
+ ControlwordCommand["SHUTDOWN"] = "SHUTDOWN";
138
+ ControlwordCommand["SWITCH_ON"] = "SWITCH_ON";
139
+ ControlwordCommand["SWITCH_ON_ENABLE_OPERATION"] = "SWITCH_ON_ENABLE_OPERATION";
140
+ ControlwordCommand["DISABLE_VOLTAGE"] = "DISABLE_VOLTAGE";
141
+ /**
142
+ * Quick Stop.
143
+ *
144
+ * This command initiates a quick stop of the drive.
145
+ * When this bit is set to 1, the drive enters the "Quick stop active" state,
146
+ * causing the motor to decelerate and come to a stop as quickly as possible.
147
+ */
148
+ ControlwordCommand["QUICK_STOP"] = "QUICK_STOP";
149
+ ControlwordCommand["DISABLE_OPERATION"] = "DISABLE_OPERATION";
150
+ /**
151
+ * Enable Operation.
152
+ *
153
+ * This command enables the drive to perform its intended operation.
154
+ * When this bit is set to 1, the drive transitions from the "Ready to switch on" state to the "Operation enabled" state.
155
+ */
156
+ ControlwordCommand["ENABLE_OPERATION"] = "ENABLE_OPERATION";
157
+ /**
158
+ * Fault Reset.
159
+ *
160
+ * This command resets a fault condition and clears any fault flags or errors that may have occurred.
161
+ * When this bit is set to 1, the drive attempts to recover from a fault and return to an operational state.
162
+ */
163
+ ControlwordCommand["FAULT_RESET"] = "FAULT_RESET";
164
+ })(ControlwordCommand = exports.ControlwordCommand || (exports.ControlwordCommand = {}));
165
+ /**
166
+ * Return one of the controlword commands based its value.
167
+ *
168
+ * NOTE: DISABLE_OPERATION and ENABLE_OPERATION are never returned.
169
+ * Their values are the same as SWITCH_ON and SWITCH_ON_ENABLE_OPERATION.
170
+ * What controlword is commanded depends on the transition.
171
+ */
172
+ function getCommandFromControlword(value) {
173
+ if ((value & 0b1000111) === 0b0000110) {
174
+ return ControlwordCommand.SHUTDOWN;
175
+ }
176
+ if ((value & 0b1001111) === 0b0000111) {
177
+ return ControlwordCommand.SWITCH_ON;
178
+ }
179
+ if ((value & 0b1001111) === 0b0001111) {
180
+ return ControlwordCommand.SWITCH_ON_ENABLE_OPERATION;
181
+ }
182
+ if ((value & 0b1000010) === 0b0000000) {
183
+ return ControlwordCommand.DISABLE_VOLTAGE;
184
+ }
185
+ if ((value & 0b1000110) === 0b0000010) {
186
+ return ControlwordCommand.QUICK_STOP;
187
+ }
188
+ if ((value & 0b1001111) === 0b0000111) {
189
+ return ControlwordCommand.DISABLE_OPERATION;
190
+ }
191
+ if ((value & 0b1001111) === 0b0001111) {
192
+ return ControlwordCommand.ENABLE_OPERATION;
193
+ }
194
+ if ((value & 0b1000000) === 0b1000000) {
195
+ return ControlwordCommand.FAULT_RESET;
196
+ }
197
+ return;
198
+ }
199
+ exports.getCommandFromControlword = getCommandFromControlword;
200
+ exports.controlwordOptions = {
201
+ 'Shutdown': 0b00000110,
202
+ 'Switch on': 0b00000111,
203
+ 'Switch on + enable operation': 0b00001111,
204
+ 'Disable voltage': 0b00000000,
205
+ 'Quick stop': 0b00000010,
206
+ 'Disable operation': 0b00000111,
207
+ 'Enable operation': 0b00001111,
208
+ 'Fault reset': 0b10000000, // fault reset 15
209
+ };
210
+ exports.controlwordCommandOptions = Object.values(ControlwordCommand);
211
+ exports.controlwordCommandBitmasks = {
212
+ [ControlwordCommand.SHUTDOWN]: [
213
+ 0b1111111101111110,
214
+ 0b0000000000000110,
215
+ ],
216
+ [ControlwordCommand.SWITCH_ON]: [
217
+ 0b1111111101110111,
218
+ 0b0000000000000111,
219
+ ],
220
+ [ControlwordCommand.SWITCH_ON_ENABLE_OPERATION]: [
221
+ 0b1111111101111111,
222
+ 0b0000000000001111,
223
+ ],
224
+ [ControlwordCommand.DISABLE_VOLTAGE]: [
225
+ 0b1111111101111101,
226
+ 0b0000000000000000,
227
+ ],
228
+ [ControlwordCommand.QUICK_STOP]: [
229
+ 0b1111111101111011,
230
+ 0b0000000000000010,
231
+ ],
232
+ [ControlwordCommand.DISABLE_OPERATION]: [
233
+ 0b1111111101110111,
234
+ 0b0000000000000111,
235
+ ],
236
+ [ControlwordCommand.ENABLE_OPERATION]: [
237
+ 0b1111111101111111,
238
+ 0b0000000000001111,
239
+ ],
240
+ [ControlwordCommand.FAULT_RESET]: [
241
+ 0b1111111111111111,
242
+ 0b0000000010000000,
243
+ ],
244
+ };
245
+ function createControlwordCommand(value, command) {
246
+ const bitmasks = exports.controlwordCommandBitmasks[command];
247
+ return ((value & bitmasks[0]) | bitmasks[1]);
248
+ }
249
+ exports.createControlwordCommand = createControlwordCommand;
250
+ /**
251
+ * CiA402 transitions.
252
+ *
253
+ * List of allowed transitions with controlword command.
254
+ *
255
+ * The following transitions are automatic:
256
+ * - 0: START -> NOT_READY_TO_SWITCH_ON
257
+ * - 1: NOT_READY_TO_SWITCH_ON -> SWITCH_ON_DISABLED
258
+ * - 13: ANY -> FAULT_REACTION_ACTIVE
259
+ * - 14: FAULT_REACTION_ACTIVE -> FAULT
260
+ */
261
+ exports.cia402Transitions = [
262
+ {
263
+ from: Cia402State.SWITCH_ON_DISABLED,
264
+ to: Cia402State.READY_TO_SWITCH_ON,
265
+ transitions: [2],
266
+ command: ControlwordCommand.SHUTDOWN,
267
+ },
268
+ {
269
+ from: Cia402State.READY_TO_SWITCH_ON,
270
+ to: Cia402State.SWITCHED_ON,
271
+ transitions: [3],
272
+ command: ControlwordCommand.SWITCH_ON,
273
+ },
274
+ {
275
+ from: Cia402State.READY_TO_SWITCH_ON,
276
+ to: Cia402State.OPERATION_ENABLED,
277
+ transitions: [3, 4],
278
+ command: ControlwordCommand.SWITCH_ON_ENABLE_OPERATION,
279
+ },
280
+ {
281
+ from: Cia402State.SWITCHED_ON,
282
+ to: Cia402State.OPERATION_ENABLED,
283
+ transitions: [4],
284
+ command: ControlwordCommand.ENABLE_OPERATION,
285
+ },
286
+ {
287
+ from: Cia402State.OPERATION_ENABLED,
288
+ to: Cia402State.SWITCHED_ON,
289
+ transitions: [5],
290
+ command: ControlwordCommand.DISABLE_OPERATION,
291
+ },
292
+ {
293
+ from: Cia402State.SWITCHED_ON,
294
+ to: Cia402State.READY_TO_SWITCH_ON,
295
+ transitions: [6],
296
+ command: ControlwordCommand.SHUTDOWN,
297
+ },
298
+ {
299
+ from: Cia402State.READY_TO_SWITCH_ON,
300
+ to: Cia402State.SWITCH_ON_DISABLED,
301
+ transitions: [7],
302
+ command: ControlwordCommand.DISABLE_VOLTAGE,
303
+ },
304
+ {
305
+ from: Cia402State.OPERATION_ENABLED,
306
+ to: Cia402State.READY_TO_SWITCH_ON,
307
+ transitions: [8],
308
+ command: ControlwordCommand.SHUTDOWN,
309
+ },
310
+ {
311
+ from: Cia402State.OPERATION_ENABLED,
312
+ to: Cia402State.SWITCH_ON_DISABLED,
313
+ transitions: [9],
314
+ command: ControlwordCommand.DISABLE_VOLTAGE,
315
+ },
316
+ {
317
+ from: Cia402State.SWITCHED_ON,
318
+ to: Cia402State.SWITCH_ON_DISABLED,
319
+ transitions: [10],
320
+ command: ControlwordCommand.DISABLE_VOLTAGE,
321
+ },
322
+ {
323
+ from: Cia402State.OPERATION_ENABLED,
324
+ to: Cia402State.QUICK_STOP_ACTIVE,
325
+ transitions: [11],
326
+ command: ControlwordCommand.QUICK_STOP,
327
+ },
328
+ {
329
+ from: Cia402State.QUICK_STOP_ACTIVE,
330
+ to: Cia402State.SWITCH_ON_DISABLED,
331
+ transitions: [12],
332
+ command: ControlwordCommand.DISABLE_VOLTAGE,
333
+ },
334
+ {
335
+ from: Cia402State.FAULT,
336
+ to: Cia402State.SWITCH_ON_DISABLED,
337
+ transitions: [15],
338
+ command: ControlwordCommand.FAULT_RESET,
339
+ },
340
+ {
341
+ from: Cia402State.QUICK_STOP_ACTIVE,
342
+ to: Cia402State.OPERATION_ENABLED,
343
+ transitions: [16],
344
+ command: ControlwordCommand.ENABLE_OPERATION,
345
+ },
346
+ ];
347
+ var ModesOfOperation;
348
+ (function (ModesOfOperation) {
349
+ ModesOfOperation[ModesOfOperation["OPEN_LOOP_FIELD_MODE"] = -3] = "OPEN_LOOP_FIELD_MODE";
350
+ ModesOfOperation[ModesOfOperation["DIAGNOSTICS_MODE"] = -2] = "DIAGNOSTICS_MODE";
351
+ ModesOfOperation[ModesOfOperation["COGGING_COMPENSATION_RECORDING_MODE"] = -1] = "COGGING_COMPENSATION_RECORDING_MODE";
352
+ ModesOfOperation[ModesOfOperation["NO_MODE_ASSIGNED"] = 0] = "NO_MODE_ASSIGNED";
353
+ ModesOfOperation[ModesOfOperation["PROFILE_POSITION_MODE"] = 1] = "PROFILE_POSITION_MODE";
354
+ ModesOfOperation[ModesOfOperation["PROFILE_VELOCITY_MODE"] = 3] = "PROFILE_VELOCITY_MODE";
355
+ ModesOfOperation[ModesOfOperation["TORQUE_PROFILE_MODE"] = 4] = "TORQUE_PROFILE_MODE";
356
+ ModesOfOperation[ModesOfOperation["HOMING_MODE"] = 6] = "HOMING_MODE";
357
+ ModesOfOperation[ModesOfOperation["CYCLIC_SYNC_POSITION_MODE"] = 8] = "CYCLIC_SYNC_POSITION_MODE";
358
+ ModesOfOperation[ModesOfOperation["CYCLIC_SYNC_VELOCITY_MODE"] = 9] = "CYCLIC_SYNC_VELOCITY_MODE";
359
+ ModesOfOperation[ModesOfOperation["CYCLIC_SYNC_TORQUE_MODE"] = 10] = "CYCLIC_SYNC_TORQUE_MODE";
360
+ })(ModesOfOperation = exports.ModesOfOperation || (exports.ModesOfOperation = {}));
361
+ exports.modesOfOperationOptions = {
362
+ 'Open loop field mode': ModesOfOperation.OPEN_LOOP_FIELD_MODE,
363
+ 'Diagnostics mode': ModesOfOperation.DIAGNOSTICS_MODE,
364
+ 'Cogging compensation recording mode': ModesOfOperation.COGGING_COMPENSATION_RECORDING_MODE,
365
+ 'No mode assigned': ModesOfOperation.NO_MODE_ASSIGNED,
366
+ 'Profile position mode': ModesOfOperation.PROFILE_POSITION_MODE,
367
+ 'Profile velocity mode': ModesOfOperation.PROFILE_VELOCITY_MODE,
368
+ 'Torque profile mode': ModesOfOperation.TORQUE_PROFILE_MODE,
369
+ 'Homing mode': ModesOfOperation.HOMING_MODE,
370
+ 'Cyclic synchronous position mode': ModesOfOperation.CYCLIC_SYNC_POSITION_MODE,
371
+ 'Cyclic synchronous velocity mode': ModesOfOperation.CYCLIC_SYNC_VELOCITY_MODE,
372
+ 'Cyclic synchronous torque mode': ModesOfOperation.CYCLIC_SYNC_TORQUE_MODE,
373
+ };
374
+ exports.supportedDriveModesBits = [
375
+ 'pp = profile position mode',
376
+ 'vl = velocity mode',
377
+ 'pv = profile velocity mode',
378
+ 'tq = torque mode',
379
+ 'r = reserved',
380
+ 'hm = homing mode',
381
+ 'ip = interpolated position mode',
382
+ 'csp = cyclic synchronous position mode',
383
+ 'csv = cyclic synchronous velocity mode',
384
+ 'cst = cyclic synchronous torque mode',
385
+ 'r = reserved',
386
+ 'r = reserved',
387
+ 'r = reserved',
388
+ 'r = reserved',
389
+ 'r = reserved',
390
+ 'r = reserved',
391
+ ];
392
+ //# sourceMappingURL=cia402.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cia402.js","sourceRoot":"","sources":["../../../../../libs/motion-master-client/src/lib/cia402.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG;IAC5B,2BAA2B;IAC3B,kBAAkB;IAClB,wBAAwB;IACxB,WAAW;IACX,sBAAsB;IACtB,iBAAiB;IACjB,0BAA0B;IAC1B,aAAa;IACb,4BAA4B;IAC5B,aAAa;IACb,qBAAqB;IACrB,6BAA6B;IAC7B,+BAA+B;IAC/B,+BAA+B;IAC/B,4BAA4B;IAC5B,4BAA4B;CAC7B,CAAC;AAEF;;;;;GAKG;AACH,IAAY,WAkEX;AAlED,WAAY,WAAW;IACrB;;;;;OAKG;IACH,gEAAiD,CAAA;IAEjD;;;;;OAKG;IACH,wDAAyC,CAAA;IAEzC;;;;;OAKG;IACH,wDAAyC,CAAA;IAEzC;;;;;OAKG;IACH,0CAA2B,CAAA;IAE3B;;;;;OAKG;IACH,sDAAuC,CAAA;IAEvC;;;;;OAKG;IACH,sD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AC1B,wFAAyB,CAAA;IACzB,gFAAqB,CAAA;IACrB,sHAAwC,CAAA;IACxC,+EAAoB,CAAA;IACpB,yFAAyB,CAAA;IACzB,yFAAyB,CAAA;IACzB,qFAAuB,CAAA;IACvB,qEAAe,CAAA;IACf,iGAA6B,CAAA;IAC7B,iGAA6B,CAAA;IAC7B,8FAA4B,CAAA;AAC9B,CAAC,EAZW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAY3B;AAEY,QAAA,uBAAuB,GAAG;IACrC,sBAAsB,EAAE,gBAAgB,CAAC,oBAAoB;IAC7D,kBAAkB,EAAE,gBAAgB,CAAC,gBAAgB;IACrD,qCAAqC,EAAE,gBAAgB,CAAC,mCAAmC;IAC3F,kBAAkB,EAAE,gBAAgB,CAAC,gBAAgB;IACrD,uBAAuB,EAAE,gBAAgB,CAAC,qBAAqB;IAC/D,uBAAuB,EAAE,gBAAgB,CAAC,qBAAqB;IAC/D,qBAAqB,EAAE,gBAAgB,CAAC,mBAAmB;IAC3D,aAAa,EAAE,gBAAgB,CAAC,WAAW;IAC3C,kCAAkC,EAAE,gBAAgB,CAAC,yBAAyB;IAC9E,kCAAkC,EAAE,gBAAgB,CAAC,yBAAyB;IAC9E,gCAAgC,EAAE,gBAAgB,CAAC,uBAAuB;CAC3E,CAAC;AAEW,QAAA,uBAAuB,GAAG;IACrC,4BAA4B;IAC5B,oBAAoB;IACpB,4BAA4B;IAC5B,kBAAkB;IAClB,cAAc;IACd,kBAAkB;IAClB,iCAAiC;IACjC,wCAAwC;IACxC,wCAAwC;IACxC,sCAAsC;IACtC,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;CACf,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Parameter } from './parameter';
2
+ import { Optional } from './types';
3
+ export type ConfigParameter = Optional<Parameter, 'name' | 'typeValueKey'>;
4
+ export declare class ConfigFile {
5
+ readonly content: string;
6
+ readonly file?: Pick<File, "name" | "type" | "size" | "lastModified"> | undefined;
7
+ readonly apiId?: string;
8
+ readonly firmwareVersion?: string;
9
+ readonly header?: string;
10
+ parameters: ConfigParameter[];
11
+ constructor(content: string, file?: Pick<File, "name" | "type" | "size" | "lastModified"> | undefined);
12
+ toString(): string;
13
+ }