@kuriousdesign/machine-sdk 1.0.84 → 1.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/dist/custom-types/Machine.d.ts +4 -1
- package/dist/custom-types/Machine.js +3 -0
- package/dist/custom-types/Recipe.d.ts +11 -11
- package/dist/custom-types/Recipe.js +11 -11
- package/dist/custom-types/UserManagerFB.d.ts +5 -0
- package/dist/custom-types/UserManagerFB.js +17 -0
- package/dist/enums/DeviceId.d.ts +1 -1
- package/dist/enums/DeviceId.js +2 -2
- package/dist/plc-tags/index.d.ts +1 -0
- package/dist/plc-tags/index.js +1 -0
- package/package.json +1 -1
- package/src/custom-types/Machine.ts +7 -1
- package/src/custom-types/Recipe.ts +22 -22
- package/src/custom-types/UserManagerFB.ts +16 -0
- package/src/enums/DeviceId.ts +2 -2
- package/src/plc-tags/index.ts +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentAnimation, DebugLogData, DeviceRegistration, FaultData, JobData, RecipeStore, TaskQueue } from ".";
|
|
1
|
+
import { ComponentAnimation, DebugLogData, DeviceRegistration, FaultData, JobData, RecipeData, RecipeStore, TaskQueue } from ".";
|
|
2
2
|
import { PartDataStatus } from "./Part";
|
|
3
3
|
export interface UserData {
|
|
4
4
|
activeUser: number;
|
|
@@ -46,6 +46,9 @@ export interface Machine {
|
|
|
46
46
|
machineLog: LogRecordData;
|
|
47
47
|
recipeStore: RecipeStore;
|
|
48
48
|
job: JobData;
|
|
49
|
+
currentTimeMs: number;
|
|
50
|
+
activeUserId: number;
|
|
51
|
+
activeRecipe: RecipeData;
|
|
49
52
|
}
|
|
50
53
|
export interface LogRecordData {
|
|
51
54
|
list: DebugLogData[];
|
|
@@ -47,4 +47,7 @@ exports.initialMachine = ({
|
|
|
47
47
|
recipeStore: { ..._1.initialRecipeStore },
|
|
48
48
|
job: { ..._1.initialJobData },
|
|
49
49
|
//deviceLogs: Array(GCs.NUM_DEVICES).fill(null).map(() => ({ ...initialDeviceLogData })),
|
|
50
|
+
currentTimeMs: 0,
|
|
51
|
+
activeUserId: 0,
|
|
52
|
+
activeRecipe: { ..._1.initialRecipe },
|
|
50
53
|
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export interface JobData {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
activeRecipeIndex: number;
|
|
3
|
+
jobName: string;
|
|
4
|
+
lotQty: number;
|
|
5
|
+
goodCnt: number;
|
|
6
|
+
scrapCnt: number;
|
|
7
|
+
setupStartTime: bigint;
|
|
8
|
+
setupEndTime: bigint;
|
|
9
|
+
setupCompleted: boolean;
|
|
10
|
+
jobStartTime: bigint;
|
|
11
|
+
jobEndTime: bigint;
|
|
12
|
+
jobComplete: boolean;
|
|
13
13
|
}
|
|
14
14
|
export declare const initialJobData: JobData;
|
|
15
15
|
export interface ApplicatorSetpoint {
|
|
@@ -4,17 +4,17 @@ exports.initialRecipeStore = exports.initialRecipe = exports.weighingFingerStrin
|
|
|
4
4
|
exports.getTubeTypeString = getTubeTypeString;
|
|
5
5
|
const GlobalConstants_1 = require("./GlobalConstants");
|
|
6
6
|
exports.initialJobData = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
activeRecipeIndex: 0,
|
|
8
|
+
jobName: "",
|
|
9
|
+
lotQty: 0,
|
|
10
|
+
goodCnt: 0,
|
|
11
|
+
scrapCnt: 0,
|
|
12
|
+
setupStartTime: BigInt(0),
|
|
13
|
+
setupEndTime: BigInt(0),
|
|
14
|
+
setupCompleted: false,
|
|
15
|
+
jobStartTime: BigInt(0),
|
|
16
|
+
jobEndTime: BigInt(0),
|
|
17
|
+
jobComplete: false
|
|
18
18
|
};
|
|
19
19
|
exports.initialApplicatorSetpoint = {
|
|
20
20
|
speed: 0,
|
|
@@ -1,2 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Users = void 0;
|
|
4
|
+
exports.userIdToString = userIdToString;
|
|
5
|
+
var Users;
|
|
6
|
+
(function (Users) {
|
|
7
|
+
Users[Users["OPERATOR"] = 0] = "OPERATOR";
|
|
8
|
+
Users[Users["EXPERT"] = 1] = "EXPERT";
|
|
9
|
+
})(Users || (exports.Users = Users = {}));
|
|
10
|
+
function userIdToString(userId) {
|
|
11
|
+
switch (userId) {
|
|
12
|
+
case Users.OPERATOR:
|
|
13
|
+
return "Operator";
|
|
14
|
+
case Users.EXPERT:
|
|
15
|
+
return "Expert";
|
|
16
|
+
default:
|
|
17
|
+
return "Unknown";
|
|
18
|
+
}
|
|
19
|
+
}
|
package/dist/enums/DeviceId.d.ts
CHANGED
package/dist/enums/DeviceId.js
CHANGED
|
@@ -22,7 +22,7 @@ var DeviceId;
|
|
|
22
22
|
DeviceId[DeviceId["FLSB_T"] = 18] = "FLSB_T";
|
|
23
23
|
DeviceId[DeviceId["FLSB_S"] = 19] = "FLSB_S";
|
|
24
24
|
DeviceId[DeviceId["POT"] = 20] = "POT";
|
|
25
|
-
DeviceId[DeviceId["
|
|
25
|
+
DeviceId[DeviceId["SQUEE"] = 21] = "SQUEE";
|
|
26
26
|
DeviceId[DeviceId["GRIP"] = 22] = "GRIP";
|
|
27
27
|
DeviceId[DeviceId["WEIGH"] = 23] = "WEIGH";
|
|
28
28
|
DeviceId[DeviceId["LNR"] = 41] = "LNR";
|
|
@@ -76,7 +76,7 @@ function deviceIdToString(deviceId) {
|
|
|
76
76
|
case DeviceId.FLSB_T: return "FLSB_T";
|
|
77
77
|
case DeviceId.FLSB_S: return "FLSB_S";
|
|
78
78
|
case DeviceId.POT: return "POT";
|
|
79
|
-
case DeviceId.
|
|
79
|
+
case DeviceId.SQUEE: return "SQUEE";
|
|
80
80
|
case DeviceId.GRIP: return "GRIP";
|
|
81
81
|
case DeviceId.WEIGH: return "WEIGH";
|
|
82
82
|
case DeviceId.LNR: return "LNR";
|
package/dist/plc-tags/index.d.ts
CHANGED
package/dist/plc-tags/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentAnimation, DebugLogData, DeviceRegistration, FaultData, initialDebugLogData, initialFaultData, initialJobData, initialRecipeStore, initialTaskQueue, JobData, RecipeStore, TaskQueue } from ".";
|
|
1
|
+
import { ComponentAnimation, DebugLogData, DeviceRegistration, FaultData, initialDebugLogData, initialFaultData, initialJobData, initialRecipe, initialRecipeStore, initialTaskQueue, JobData, RecipeData, RecipeStore, TaskQueue } from ".";
|
|
2
2
|
import { initialPartDataStatus, PartDataStatus } from "./Part";
|
|
3
3
|
import { GCs } from "./GlobalConstants";
|
|
4
4
|
|
|
@@ -90,6 +90,9 @@ export interface Machine {
|
|
|
90
90
|
recipeStore: RecipeStore;
|
|
91
91
|
job: JobData;
|
|
92
92
|
//deviceLogs: DeviceLogData[]; //ARRAY[0..(GCs.NUM_DEVICES-1)] OF DeviceLogData;
|
|
93
|
+
currentTimeMs: number;
|
|
94
|
+
activeUserId: number;
|
|
95
|
+
activeRecipe: RecipeData;
|
|
93
96
|
}
|
|
94
97
|
|
|
95
98
|
// TYPE LogRecordData :
|
|
@@ -131,4 +134,7 @@ export const initialMachine: Machine = ({
|
|
|
131
134
|
recipeStore: { ...initialRecipeStore },
|
|
132
135
|
job: { ...initialJobData },
|
|
133
136
|
//deviceLogs: Array(GCs.NUM_DEVICES).fill(null).map(() => ({ ...initialDeviceLogData })),
|
|
137
|
+
currentTimeMs: 0,
|
|
138
|
+
activeUserId: 0,
|
|
139
|
+
activeRecipe: { ...initialRecipe},
|
|
134
140
|
});
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { GCs } from "./GlobalConstants";
|
|
2
2
|
|
|
3
3
|
export interface JobData {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
activeRecipeIndex: number;
|
|
5
|
+
jobName: string;
|
|
6
|
+
lotQty: number;
|
|
7
|
+
goodCnt: number;
|
|
8
|
+
scrapCnt: number;
|
|
9
|
+
setupStartTime: bigint;
|
|
10
|
+
setupEndTime: bigint;
|
|
11
|
+
setupCompleted: boolean;
|
|
12
|
+
jobStartTime: bigint;
|
|
13
|
+
jobEndTime: bigint;
|
|
14
|
+
jobComplete: boolean;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export const initialJobData: JobData = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
activeRecipeIndex: 0,
|
|
19
|
+
jobName: "",
|
|
20
|
+
lotQty: 0,
|
|
21
|
+
goodCnt: 0,
|
|
22
|
+
scrapCnt: 0,
|
|
23
|
+
setupStartTime: BigInt(0),
|
|
24
|
+
setupEndTime: BigInt(0),
|
|
25
|
+
setupCompleted: false,
|
|
26
|
+
jobStartTime: BigInt(0),
|
|
27
|
+
jobEndTime: BigInt(0),
|
|
28
|
+
jobComplete: false
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
export interface ApplicatorSetpoint {
|
|
@@ -5,4 +5,20 @@ export interface UserManagerFB {
|
|
|
5
5
|
logoutBtn: ComponentAnimation;
|
|
6
6
|
username: string;
|
|
7
7
|
password: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export enum Users {
|
|
11
|
+
OPERATOR = 0,
|
|
12
|
+
EXPERT = 1,
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function userIdToString(userId: number): string {
|
|
16
|
+
switch (userId) {
|
|
17
|
+
case Users.OPERATOR:
|
|
18
|
+
return "Operator";
|
|
19
|
+
case Users.EXPERT:
|
|
20
|
+
return "Expert";
|
|
21
|
+
default:
|
|
22
|
+
return "Unknown";
|
|
23
|
+
}
|
|
8
24
|
}
|
package/src/enums/DeviceId.ts
CHANGED
|
@@ -18,7 +18,7 @@ export enum DeviceId {
|
|
|
18
18
|
FLSB_T = 18,
|
|
19
19
|
FLSB_S = 19,
|
|
20
20
|
POT = 20,
|
|
21
|
-
|
|
21
|
+
SQUEE = 21,
|
|
22
22
|
GRIP = 22,
|
|
23
23
|
WEIGH = 23,
|
|
24
24
|
|
|
@@ -78,7 +78,7 @@ export function deviceIdToString(deviceId: DeviceId | number): string {
|
|
|
78
78
|
case DeviceId.FLSB_T: return "FLSB_T";
|
|
79
79
|
case DeviceId.FLSB_S: return "FLSB_S";
|
|
80
80
|
case DeviceId.POT: return "POT";
|
|
81
|
-
case DeviceId.
|
|
81
|
+
case DeviceId.SQUEE: return "SQUEE";
|
|
82
82
|
case DeviceId.GRIP: return "GRIP";
|
|
83
83
|
case DeviceId.WEIGH: return "WEIGH";
|
|
84
84
|
case DeviceId.LNR: return "LNR";
|
package/src/plc-tags/index.ts
CHANGED