@kuriousdesign/machine-sdk 1.0.106 → 1.0.108

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.
@@ -110,7 +110,8 @@ export declare enum AxisMethods {
110
110
  ENFORCE_RAIL_BRAKES = 4,
111
111
  START_STREAM = 5,
112
112
  STOP = 6,
113
- SET_IS_HOMED = 7
113
+ SET_IS_HOMED = 7,
114
+ MOVE_REL_CMD = 8
114
115
  }
115
116
  export declare function axisMethodIdToString(method: AxisMethods): string;
116
117
  export declare enum AxisProcesses {
@@ -18,6 +18,7 @@ var AxisMethods;
18
18
  AxisMethods[AxisMethods["START_STREAM"] = 5] = "START_STREAM";
19
19
  AxisMethods[AxisMethods["STOP"] = 6] = "STOP";
20
20
  AxisMethods[AxisMethods["SET_IS_HOMED"] = 7] = "SET_IS_HOMED";
21
+ AxisMethods[AxisMethods["MOVE_REL_CMD"] = 8] = "MOVE_REL_CMD";
21
22
  })(AxisMethods || (exports.AxisMethods = AxisMethods = {}));
22
23
  function axisMethodIdToString(method) {
23
24
  switch (method) {
@@ -37,6 +38,8 @@ function axisMethodIdToString(method) {
37
38
  return "Stop";
38
39
  case AxisMethods.SET_IS_HOMED:
39
40
  return "Set isHomed";
41
+ case AxisMethods.MOVE_REL_CMD:
42
+ return "Move Relative Command";
40
43
  default:
41
44
  return "Unknown";
42
45
  }
@@ -14,11 +14,14 @@ export declare enum PartStates {
14
14
  StartedPreWeighing = 29,
15
15
  PreWeighed = 30,
16
16
  StartedApplying = 31,
17
- Applied = 40,
17
+ LinerApplied = 40,
18
+ StartedLinerBrushing = 41,
19
+ LinerBrushed = 50,
18
20
  StartedPhotographing = 61,
19
21
  Photographed = 70,
20
22
  StartedPostWeighing = 71,
21
23
  PostWeighed = 80,
24
+ Scrapped = 900,
22
25
  Failed = 911,
23
26
  Passed = 1000
24
27
  }
@@ -35,6 +38,7 @@ export declare enum PartValidationStates {
35
38
  NONE = 0,
36
39
  Scrapped_Generic = 1,
37
40
  Scrapped_LINER_APPLICATION_STARTED_BUT_NOT_FINISHED = 101,
41
+ Scrapped_LINER_BRUSHING_STARTED_BUT_NOT_FINISHED = 102,
38
42
  Scrapped_Failed_Weight_TOO_LIGHT = 701,
39
43
  Scrapped_Failed_Weight_TOO_HEAVY = 702,
40
44
  Scrapped_Failed_Image_Review_GENERAL = 800,
@@ -43,12 +47,13 @@ export declare enum PartValidationStates {
43
47
  PASSED = 1000
44
48
  }
45
49
  export interface PartValidationData {
46
- valState: PartValidationStates;
50
+ weightSts: PartValidationStates;
51
+ visionSts: PartValidationStates;
52
+ timestampVision_sec: number;
47
53
  statusMsg: string;
48
54
  preWeightKg: number;
49
55
  postWeightKg: number;
50
56
  linerWeightKg: number;
51
- videoReviewSts: number;
52
57
  }
53
58
  export declare const initialPartValidationData: PartValidationData;
54
59
  export declare const initialPartData: PartData;
@@ -41,42 +41,24 @@ function partLocationIdToString(locationId) {
41
41
  return "Unknown";
42
42
  }
43
43
  }
44
- // TYPE PartStates :
45
- // (
46
- // Empty:=0,//no part present
47
- // //BadSensorEmpty:=1, //used if sensors give false positive
48
- // UnvalidatedRaw:=10, //used if registered by sensor, but not approved by operator
49
- // Raw:=20,
50
- // //BadSensorRaw:=21, //used if loaded by sensor didn't work
51
- // StartedPreWeighing:=29,
52
- // PreWeighed:=30,
53
- // StartedApplying:=31,
54
- // Applied:=40,
55
- // StartedPhotographing:=61,
56
- // Photographed:=70,
57
- // StartedPostWeighing:=71,
58
- // PostWeighed:=80,
59
- // Failed:=911,
60
- // Passed:=1000 //ProessingDone, back in fixture and waiting to be unloaded
61
- // );
62
- // END_TYPE
63
44
  var PartStates;
64
45
  (function (PartStates) {
65
46
  PartStates[PartStates["Empty"] = 0] = "Empty";
66
- //BadSensorEmpty = 1, //used if sensors give false positive
67
47
  PartStates[PartStates["UnvalidatedRaw"] = 10] = "UnvalidatedRaw";
68
48
  PartStates[PartStates["Raw"] = 20] = "Raw";
69
- //BadSensorRaw = 21, //used if loaded by sensor didn't work
70
49
  PartStates[PartStates["StartedPreWeighing"] = 29] = "StartedPreWeighing";
71
50
  PartStates[PartStates["PreWeighed"] = 30] = "PreWeighed";
72
51
  PartStates[PartStates["StartedApplying"] = 31] = "StartedApplying";
73
- PartStates[PartStates["Applied"] = 40] = "Applied";
52
+ PartStates[PartStates["LinerApplied"] = 40] = "LinerApplied";
53
+ PartStates[PartStates["StartedLinerBrushing"] = 41] = "StartedLinerBrushing";
54
+ PartStates[PartStates["LinerBrushed"] = 50] = "LinerBrushed";
74
55
  PartStates[PartStates["StartedPhotographing"] = 61] = "StartedPhotographing";
75
56
  PartStates[PartStates["Photographed"] = 70] = "Photographed";
76
57
  PartStates[PartStates["StartedPostWeighing"] = 71] = "StartedPostWeighing";
77
58
  PartStates[PartStates["PostWeighed"] = 80] = "PostWeighed";
59
+ PartStates[PartStates["Scrapped"] = 900] = "Scrapped";
78
60
  PartStates[PartStates["Failed"] = 911] = "Failed";
79
- PartStates[PartStates["Passed"] = 1000] = "Passed"; //ProessingDone, back in fixture and waiting to be unloaded
61
+ PartStates[PartStates["Passed"] = 1000] = "Passed"; //ProessingDone, back in fixture and waiting to be unloaded
80
62
  })(PartStates || (exports.PartStates = PartStates = {}));
81
63
  ;
82
64
  function partStateToString(state) {
@@ -87,11 +69,14 @@ function partStateToString(state) {
87
69
  case PartStates.StartedPreWeighing: return "Started Pre-Weighing";
88
70
  case PartStates.PreWeighed: return "Pre-Weighed";
89
71
  case PartStates.StartedApplying: return "Started Applying";
90
- case PartStates.Applied: return "Applied";
72
+ case PartStates.LinerApplied: return "Liner Applied";
73
+ case PartStates.StartedLinerBrushing: return "Started Liner Brushing";
74
+ case PartStates.LinerBrushed: return "Liner Brushed";
91
75
  case PartStates.StartedPhotographing: return "Started Photographing";
92
76
  case PartStates.Photographed: return "Photographed";
93
77
  case PartStates.StartedPostWeighing: return "Started Post-Weighing";
94
78
  case PartStates.PostWeighed: return "Post-Weighed";
79
+ case PartStates.Scrapped: return "Scrapped";
95
80
  case PartStates.Failed: return "Failed";
96
81
  case PartStates.Passed: return "Passed";
97
82
  }
@@ -101,6 +86,7 @@ var PartValidationStates;
101
86
  PartValidationStates[PartValidationStates["NONE"] = 0] = "NONE";
102
87
  PartValidationStates[PartValidationStates["Scrapped_Generic"] = 1] = "Scrapped_Generic";
103
88
  PartValidationStates[PartValidationStates["Scrapped_LINER_APPLICATION_STARTED_BUT_NOT_FINISHED"] = 101] = "Scrapped_LINER_APPLICATION_STARTED_BUT_NOT_FINISHED";
89
+ PartValidationStates[PartValidationStates["Scrapped_LINER_BRUSHING_STARTED_BUT_NOT_FINISHED"] = 102] = "Scrapped_LINER_BRUSHING_STARTED_BUT_NOT_FINISHED";
104
90
  PartValidationStates[PartValidationStates["Scrapped_Failed_Weight_TOO_LIGHT"] = 701] = "Scrapped_Failed_Weight_TOO_LIGHT";
105
91
  PartValidationStates[PartValidationStates["Scrapped_Failed_Weight_TOO_HEAVY"] = 702] = "Scrapped_Failed_Weight_TOO_HEAVY";
106
92
  PartValidationStates[PartValidationStates["Scrapped_Failed_Image_Review_GENERAL"] = 800] = "Scrapped_Failed_Image_Review_GENERAL";
@@ -109,12 +95,13 @@ var PartValidationStates;
109
95
  PartValidationStates[PartValidationStates["PASSED"] = 1000] = "PASSED";
110
96
  })(PartValidationStates || (exports.PartValidationStates = PartValidationStates = {}));
111
97
  exports.initialPartValidationData = {
112
- valState: PartValidationStates.NONE,
98
+ weightSts: PartValidationStates.NONE,
99
+ visionSts: PartValidationStates.NONE,
100
+ timestampVision_sec: 0,
113
101
  statusMsg: "",
114
102
  preWeightKg: 0,
115
103
  postWeightKg: 0,
116
104
  linerWeightKg: 0,
117
- videoReviewSts: 0,
118
105
  };
119
106
  exports.initialPartData = {
120
107
  processSts: PartStates.Empty,
@@ -62,6 +62,7 @@ export interface RecipeData {
62
62
  cameraSpeed: number;
63
63
  usesBrushTool: boolean;
64
64
  brushToolSpeed_RPM: number;
65
+ robotSpeedWhileBrushing: number;
65
66
  }
66
67
  export declare enum CameraIds {
67
68
  NONE = 0,
@@ -152,6 +152,7 @@ exports.initialRecipe = {
152
152
  applicatorCollisionPayloadOffset: 0,
153
153
  usesBrushTool: false,
154
154
  brushToolSpeed_RPM: 0,
155
+ robotSpeedWhileBrushing: 0,
155
156
  cleanerId: Cleaners.NONE,
156
157
  cleanerString: exports.cleanerIdToStringMap.get(Cleaners.NONE) || "",
157
158
  weighingFingerId: WeighingFingers.NONE,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuriousdesign/machine-sdk",
3
- "version": "1.0.106",
3
+ "version": "1.0.108",
4
4
  "description": "Shared data types and helpers for machine-related repositories",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -167,7 +167,8 @@ export enum AxisMethods {
167
167
  ENFORCE_RAIL_BRAKES = 4,
168
168
  START_STREAM = 5,
169
169
  STOP = 6,
170
- SET_IS_HOMED = 7
170
+ SET_IS_HOMED = 7,
171
+ MOVE_REL_CMD = 8
171
172
  }
172
173
 
173
174
  export function axisMethodIdToString(method: AxisMethods): string {
@@ -188,6 +189,8 @@ export function axisMethodIdToString(method: AxisMethods): string {
188
189
  return "Stop";
189
190
  case AxisMethods.SET_IS_HOMED:
190
191
  return "Set isHomed";
192
+ case AxisMethods.MOVE_REL_CMD:
193
+ return "Move Relative Command";
191
194
 
192
195
  default:
193
196
  return "Unknown";
@@ -42,51 +42,33 @@ export function partLocationIdToString(locationId: PartLocationIds): string {
42
42
  return "Unknown";
43
43
  }
44
44
  }
45
- // TYPE PartStates :
46
- // (
47
- // Empty:=0,//no part present
48
- // //BadSensorEmpty:=1, //used if sensors give false positive
49
-
50
- // UnvalidatedRaw:=10, //used if registered by sensor, but not approved by operator
51
-
52
- // Raw:=20,
53
- // //BadSensorRaw:=21, //used if loaded by sensor didn't work
54
-
55
- // StartedPreWeighing:=29,
56
- // PreWeighed:=30,
57
-
58
- // StartedApplying:=31,
59
- // Applied:=40,
60
-
61
- // StartedPhotographing:=61,
62
- // Photographed:=70,
63
-
64
- // StartedPostWeighing:=71,
65
- // PostWeighed:=80,
66
-
67
- // Failed:=911,
68
- // Passed:=1000 //ProessingDone, back in fixture and waiting to be unloaded
69
-
70
-
71
- // );
72
- // END_TYPE
45
+
73
46
 
74
47
  export enum PartStates {
75
48
  Empty = 0,//no part present
76
- //BadSensorEmpty = 1, //used if sensors give false positive
77
49
  UnvalidatedRaw = 10, //used if registered by sensor, but not approved by operator
50
+
78
51
  Raw = 20,
79
- //BadSensorRaw = 21, //used if loaded by sensor didn't work
52
+
80
53
  StartedPreWeighing = 29,
81
54
  PreWeighed = 30,
55
+
82
56
  StartedApplying = 31,
83
- Applied = 40,
57
+ LinerApplied = 40,
58
+
59
+ StartedLinerBrushing = 41,
60
+ LinerBrushed = 50,
61
+
84
62
  StartedPhotographing = 61,
85
63
  Photographed = 70,
64
+
86
65
  StartedPostWeighing = 71,
87
66
  PostWeighed = 80,
67
+
68
+ Scrapped = 900,
88
69
  Failed = 911,
89
- Passed = 1000 //ProessingDone, back in fixture and waiting to be unloaded
70
+ Passed = 1000 //ProessingDone, back in fixture and waiting to be unloaded
71
+
90
72
  };
91
73
 
92
74
  export function partStateToString(state: PartStates): string {
@@ -97,11 +79,14 @@ export function partStateToString(state: PartStates): string {
97
79
  case PartStates.StartedPreWeighing: return "Started Pre-Weighing";
98
80
  case PartStates.PreWeighed: return "Pre-Weighed";
99
81
  case PartStates.StartedApplying: return "Started Applying";
100
- case PartStates.Applied: return "Applied";
82
+ case PartStates.LinerApplied: return "Liner Applied";
83
+ case PartStates.StartedLinerBrushing: return "Started Liner Brushing";
84
+ case PartStates.LinerBrushed: return "Liner Brushed";
101
85
  case PartStates.StartedPhotographing: return "Started Photographing";
102
86
  case PartStates.Photographed: return "Photographed";
103
87
  case PartStates.StartedPostWeighing: return "Started Post-Weighing";
104
88
  case PartStates.PostWeighed: return "Post-Weighed";
89
+ case PartStates.Scrapped: return "Scrapped";
105
90
  case PartStates.Failed: return "Failed";
106
91
  case PartStates.Passed: return "Passed";
107
92
  }
@@ -116,10 +101,13 @@ export interface PartData {
116
101
  inFixture: boolean; // CurrentLocation = FixtureLocationWhenLoaded
117
102
  }
118
103
 
104
+
105
+
119
106
  export enum PartValidationStates {
120
107
  NONE = 0,
121
108
  Scrapped_Generic = 1,
122
109
  Scrapped_LINER_APPLICATION_STARTED_BUT_NOT_FINISHED = 101,
110
+ Scrapped_LINER_BRUSHING_STARTED_BUT_NOT_FINISHED = 102,
123
111
  Scrapped_Failed_Weight_TOO_LIGHT = 701,
124
112
  Scrapped_Failed_Weight_TOO_HEAVY = 702,
125
113
  Scrapped_Failed_Image_Review_GENERAL = 800,
@@ -128,22 +116,25 @@ export enum PartValidationStates {
128
116
  PASSED = 1000
129
117
  }
130
118
 
119
+
131
120
  export interface PartValidationData {
132
- valState: PartValidationStates;
121
+ weightSts: PartValidationStates; //use PartValidationStates
122
+ visionSts: PartValidationStates; //use PartValidationStates
123
+ timestampVision_sec: number;
133
124
  statusMsg: string;
134
125
  preWeightKg: number;
135
126
  postWeightKg: number;
136
127
  linerWeightKg: number;
137
- videoReviewSts: number; //0: NOT REVIEWED, 911: FAILED, 1000: PASSED
138
128
  }
139
129
 
140
130
  export const initialPartValidationData: PartValidationData = {
141
- valState: PartValidationStates.NONE,
131
+ weightSts: PartValidationStates.NONE,
132
+ visionSts: PartValidationStates.NONE,
133
+ timestampVision_sec: 0,
142
134
  statusMsg: "",
143
135
  preWeightKg: 0,
144
136
  postWeightKg: 0,
145
137
  linerWeightKg: 0,
146
- videoReviewSts: 0,
147
138
  };
148
139
  export const initialPartData: PartData = {
149
140
  processSts: PartStates.Empty,
@@ -111,6 +111,7 @@ export interface RecipeData {
111
111
 
112
112
  usesBrushTool: boolean;
113
113
  brushToolSpeed_RPM: number;
114
+ robotSpeedWhileBrushing: number;
114
115
  }
115
116
 
116
117
  export enum CameraIds {
@@ -240,6 +241,7 @@ export const initialRecipe: RecipeData = {
240
241
  applicatorCollisionPayloadOffset: 0,
241
242
  usesBrushTool: false,
242
243
  brushToolSpeed_RPM: 0,
244
+ robotSpeedWhileBrushing: 0,
243
245
  cleanerId: Cleaners.NONE,
244
246
  cleanerString: cleanerIdToStringMap.get(Cleaners.NONE) || "",
245
247
  weighingFingerId: WeighingFingers.NONE,