@kuriousdesign/machine-sdk 1.0.36 → 1.0.38
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.
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { PartStateDeprecated as PartStateDeprecated } from "../enums";
|
|
2
|
+
export declare enum PartLocationIds {
|
|
3
|
+
None = 0,
|
|
4
|
+
RobotGripper = 1,
|
|
5
|
+
LeftFixture_P1 = 2,
|
|
6
|
+
RightFixture_P1,
|
|
7
|
+
Lost
|
|
8
|
+
}
|
|
9
|
+
export declare function partLocationIdToString(locationId: PartLocationIds): string;
|
|
2
10
|
export declare enum PartStates {
|
|
3
11
|
Empty = 0,//no part present
|
|
4
12
|
UnvalidatedRaw = 10,//used if registered by sensor, but not approved by operator
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.initialPartDataStatus = exports.initialPartData = exports.initialPartValidationData = exports.PartStates = void 0;
|
|
3
|
+
exports.initialPartDataStatus = exports.initialPartData = exports.initialPartValidationData = exports.PartStates = exports.PartLocationIds = void 0;
|
|
4
|
+
exports.partLocationIdToString = partLocationIdToString;
|
|
4
5
|
exports.partStateToString = partStateToString;
|
|
5
6
|
const GlobalConstants_1 = require("./GlobalConstants");
|
|
6
7
|
// TYPE PartValidationData :
|
|
@@ -44,6 +45,36 @@ const GlobalConstants_1 = require("./GlobalConstants");
|
|
|
44
45
|
// Passed:=1000 //ProessingDone, back in fixture and waiting to be unloaded
|
|
45
46
|
// );
|
|
46
47
|
// END_TYPE
|
|
48
|
+
// {attribute 'qualified_only'}
|
|
49
|
+
// //{attribute 'strict'}
|
|
50
|
+
// TYPE PartLocationIds :
|
|
51
|
+
// (
|
|
52
|
+
// None:=0,
|
|
53
|
+
// RobotGripper:=1,
|
|
54
|
+
// LeftFixture_P1 :=2,
|
|
55
|
+
// RightFixture_P1:=LeftFixture_P1 + GCs.NUM_PARTS_PER_FIXTURE,
|
|
56
|
+
// Lost:=RightFixture_P1 + GCs.NUM_PARTS_PER_FIXTURE
|
|
57
|
+
// );
|
|
58
|
+
// END_TYPE
|
|
59
|
+
var PartLocationIds;
|
|
60
|
+
(function (PartLocationIds) {
|
|
61
|
+
PartLocationIds[PartLocationIds["None"] = 0] = "None";
|
|
62
|
+
PartLocationIds[PartLocationIds["RobotGripper"] = 1] = "RobotGripper";
|
|
63
|
+
PartLocationIds[PartLocationIds["LeftFixture_P1"] = 2] = "LeftFixture_P1";
|
|
64
|
+
PartLocationIds[PartLocationIds["RightFixture_P1"] = PartLocationIds.LeftFixture_P1 + GlobalConstants_1.GCs.NUM_PARTS_PER_FIXTURE] = "RightFixture_P1";
|
|
65
|
+
PartLocationIds[PartLocationIds["Lost"] = PartLocationIds.RightFixture_P1 + GlobalConstants_1.GCs.NUM_PARTS_PER_FIXTURE] = "Lost";
|
|
66
|
+
})(PartLocationIds || (exports.PartLocationIds = PartLocationIds = {}));
|
|
67
|
+
;
|
|
68
|
+
function partLocationIdToString(locationId) {
|
|
69
|
+
switch (locationId) {
|
|
70
|
+
case PartLocationIds.None: return "None";
|
|
71
|
+
case PartLocationIds.RobotGripper: return "Robot Gripper";
|
|
72
|
+
case PartLocationIds.LeftFixture_P1: return "Left Fixture P1";
|
|
73
|
+
case PartLocationIds.RightFixture_P1: return "Right Fixture P1";
|
|
74
|
+
case PartLocationIds.Lost: return "Lost";
|
|
75
|
+
default: return "Unknown";
|
|
76
|
+
}
|
|
77
|
+
}
|
|
47
78
|
var PartStates;
|
|
48
79
|
(function (PartStates) {
|
|
49
80
|
PartStates[PartStates["Empty"] = 0] = "Empty";
|
|
@@ -9,7 +9,9 @@ export declare enum Priorities {
|
|
|
9
9
|
STOP_UTILITIES = 60,
|
|
10
10
|
UNLOAD_PARTS = 70
|
|
11
11
|
}
|
|
12
|
+
export declare function priorityToString(priority: Priorities): string;
|
|
12
13
|
export interface TaskData {
|
|
14
|
+
description: string;
|
|
13
15
|
targetId: number;
|
|
14
16
|
taskId: number;
|
|
15
17
|
paramArray: number[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.initialTaskQueue = exports.initialTaskData = exports.Priorities = void 0;
|
|
4
|
+
exports.priorityToString = priorityToString;
|
|
4
5
|
const BaseDevice_1 = require("./BaseDevice");
|
|
5
6
|
var Priorities;
|
|
6
7
|
(function (Priorities) {
|
|
@@ -14,7 +15,32 @@ var Priorities;
|
|
|
14
15
|
Priorities[Priorities["STOP_UTILITIES"] = 60] = "STOP_UTILITIES";
|
|
15
16
|
Priorities[Priorities["UNLOAD_PARTS"] = 70] = "UNLOAD_PARTS";
|
|
16
17
|
})(Priorities || (exports.Priorities = Priorities = {}));
|
|
18
|
+
function priorityToString(priority) {
|
|
19
|
+
switch (priority) {
|
|
20
|
+
case Priorities.NONE:
|
|
21
|
+
return "None";
|
|
22
|
+
case Priorities.LOAD_PARTS:
|
|
23
|
+
return "Load Parts";
|
|
24
|
+
case Priorities.START_UTILITIES:
|
|
25
|
+
return "Start Utilities";
|
|
26
|
+
case Priorities.PRE_WEIGH_TUBES:
|
|
27
|
+
return "Pre Weigh Tubes";
|
|
28
|
+
case Priorities.APPLY_LINER:
|
|
29
|
+
return "Apply Liner";
|
|
30
|
+
case Priorities.PHOTOGRAPH_TUBES:
|
|
31
|
+
return "Photograph Tubes";
|
|
32
|
+
case Priorities.POST_WEIGH_TUBES:
|
|
33
|
+
return "Post Weigh Tubes";
|
|
34
|
+
case Priorities.STOP_UTILITIES:
|
|
35
|
+
return "Stop Utilities";
|
|
36
|
+
case Priorities.UNLOAD_PARTS:
|
|
37
|
+
return "Unload Parts";
|
|
38
|
+
default:
|
|
39
|
+
return "Unknown";
|
|
40
|
+
}
|
|
41
|
+
}
|
|
17
42
|
exports.initialTaskData = {
|
|
43
|
+
description: "",
|
|
18
44
|
targetId: 0,
|
|
19
45
|
taskId: 0,
|
|
20
46
|
paramArray: Array(BaseDevice_1.DeviceConstants.MAX_NUM_PARAMS).fill(0),
|
package/package.json
CHANGED
package/src/custom-types/Part.ts
CHANGED
|
@@ -58,6 +58,38 @@ import { GCs } from "./GlobalConstants";
|
|
|
58
58
|
// );
|
|
59
59
|
// END_TYPE
|
|
60
60
|
|
|
61
|
+
|
|
62
|
+
// {attribute 'qualified_only'}
|
|
63
|
+
// //{attribute 'strict'}
|
|
64
|
+
// TYPE PartLocationIds :
|
|
65
|
+
// (
|
|
66
|
+
// None:=0,
|
|
67
|
+
// RobotGripper:=1,
|
|
68
|
+
// LeftFixture_P1 :=2,
|
|
69
|
+
// RightFixture_P1:=LeftFixture_P1 + GCs.NUM_PARTS_PER_FIXTURE,
|
|
70
|
+
// Lost:=RightFixture_P1 + GCs.NUM_PARTS_PER_FIXTURE
|
|
71
|
+
// );
|
|
72
|
+
// END_TYPE
|
|
73
|
+
|
|
74
|
+
export enum PartLocationIds {
|
|
75
|
+
None = 0,
|
|
76
|
+
RobotGripper = 1,
|
|
77
|
+
LeftFixture_P1 = 2,
|
|
78
|
+
RightFixture_P1 = LeftFixture_P1 + GCs.NUM_PARTS_PER_FIXTURE,
|
|
79
|
+
Lost = RightFixture_P1 + GCs.NUM_PARTS_PER_FIXTURE
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export function partLocationIdToString(locationId: PartLocationIds): string {
|
|
83
|
+
switch (locationId) {
|
|
84
|
+
case PartLocationIds.None: return "None";
|
|
85
|
+
case PartLocationIds.RobotGripper: return "Robot Gripper";
|
|
86
|
+
case PartLocationIds.LeftFixture_P1: return "Left Fixture P1";
|
|
87
|
+
case PartLocationIds.RightFixture_P1: return "Right Fixture P1";
|
|
88
|
+
case PartLocationIds.Lost: return "Lost";
|
|
89
|
+
default: return "Unknown";
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
61
93
|
export enum PartStates {
|
|
62
94
|
Empty = 0,//no part present
|
|
63
95
|
//BadSensorEmpty = 1, //used if sensors give false positive
|
|
@@ -12,9 +12,33 @@ export enum Priorities {
|
|
|
12
12
|
UNLOAD_PARTS = 70
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
export function priorityToString(priority: Priorities): string {
|
|
16
|
+
switch (priority) {
|
|
17
|
+
case Priorities.NONE:
|
|
18
|
+
return "None";
|
|
19
|
+
case Priorities.LOAD_PARTS:
|
|
20
|
+
return "Load Parts";
|
|
21
|
+
case Priorities.START_UTILITIES:
|
|
22
|
+
return "Start Utilities";
|
|
23
|
+
case Priorities.PRE_WEIGH_TUBES:
|
|
24
|
+
return "Pre Weigh Tubes";
|
|
25
|
+
case Priorities.APPLY_LINER:
|
|
26
|
+
return "Apply Liner";
|
|
27
|
+
case Priorities.PHOTOGRAPH_TUBES:
|
|
28
|
+
return "Photograph Tubes";
|
|
29
|
+
case Priorities.POST_WEIGH_TUBES:
|
|
30
|
+
return "Post Weigh Tubes";
|
|
31
|
+
case Priorities.STOP_UTILITIES:
|
|
32
|
+
return "Stop Utilities";
|
|
33
|
+
case Priorities.UNLOAD_PARTS:
|
|
34
|
+
return "Unload Parts";
|
|
35
|
+
default:
|
|
36
|
+
return "Unknown";
|
|
37
|
+
}
|
|
38
|
+
}
|
|
16
39
|
|
|
17
40
|
export interface TaskData {
|
|
41
|
+
description:string;
|
|
18
42
|
targetId: number;
|
|
19
43
|
taskId: number; // specific to the targetId
|
|
20
44
|
paramArray: number[]; // ARRAY[0..DeviceConstants.MAX_NUM_PARAMS-1] OF LREAL;
|
|
@@ -22,6 +46,7 @@ export interface TaskData {
|
|
|
22
46
|
}
|
|
23
47
|
|
|
24
48
|
export const initialTaskData: TaskData = {
|
|
49
|
+
description: "",
|
|
25
50
|
targetId: 0,
|
|
26
51
|
taskId: 0,
|
|
27
52
|
paramArray: Array(DeviceConstants.MAX_NUM_PARAMS).fill(0),
|