@kuriousdesign/machine-sdk 1.0.31 → 1.0.33
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 +2 -2
- package/dist/custom-types/Machine.js +3 -2
- package/dist/custom-types/Part.d.ts +28 -0
- package/dist/custom-types/Part.js +41 -0
- 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 +4 -4
- package/src/custom-types/Part.ts +102 -0
- package/src/plc-tags/index.ts +1 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentAnimation, DeviceRegistration, TaskQueue } from ".";
|
|
2
|
-
import {
|
|
2
|
+
import { PartDataStatus } from "./Part";
|
|
3
3
|
export interface UserData {
|
|
4
4
|
activeUser: number;
|
|
5
5
|
hmiLoginBtn: ComponentAnimation;
|
|
@@ -35,7 +35,7 @@ export interface Machine {
|
|
|
35
35
|
ethercatSlaves_OK: boolean;
|
|
36
36
|
supplyAir_OK: boolean;
|
|
37
37
|
cfg: MachineCfg;
|
|
38
|
-
|
|
38
|
+
pdmSts: PartDataStatus;
|
|
39
39
|
errors: SystemFaultData;
|
|
40
40
|
warnings: SystemFaultData;
|
|
41
41
|
taskQueue: TaskQueue;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.initialMachine = exports.initialMachineCfg = exports.initialSystemFaultData = exports.initialFaultCodeData = void 0;
|
|
4
4
|
const _1 = require(".");
|
|
5
|
+
const Part_1 = require("./Part");
|
|
5
6
|
exports.initialFaultCodeData = {
|
|
6
7
|
deviceId: 0,
|
|
7
8
|
code: 0,
|
|
@@ -29,9 +30,9 @@ exports.initialMachine = ({
|
|
|
29
30
|
ethercatSlaves_OK: false,
|
|
30
31
|
supplyAir_OK: false,
|
|
31
32
|
cfg: { ...exports.initialMachineCfg },
|
|
32
|
-
|
|
33
|
+
pdmSts: Part_1.initialPartDataStatus,
|
|
33
34
|
errors: { ...exports.initialSystemFaultData },
|
|
34
35
|
warnings: { ...exports.initialSystemFaultData },
|
|
35
36
|
taskQueue: { ..._1.initialTaskQueue },
|
|
36
|
-
registeredDevices:
|
|
37
|
+
registeredDevices: [],
|
|
37
38
|
});
|
|
@@ -13,6 +13,34 @@ export interface PartValidationData {
|
|
|
13
13
|
postWeightKg: number;
|
|
14
14
|
linerWeightKg: number;
|
|
15
15
|
}
|
|
16
|
+
export declare const initialPartValidationData: PartValidationData;
|
|
17
|
+
export declare const initialPartData: PartData;
|
|
18
|
+
export interface PartDataStatus {
|
|
19
|
+
parts: PartData[];
|
|
20
|
+
allStationsAreEmpty: boolean;
|
|
21
|
+
rawShelfIsEmpty: boolean;
|
|
22
|
+
doneShelfIsEmpty: boolean;
|
|
23
|
+
doneShelfIsFull: boolean;
|
|
24
|
+
doneShelfSpacesLeftCnt: number;
|
|
25
|
+
rawShelfPartsLeftCnt: number;
|
|
26
|
+
allFixturesAreEmpty: boolean;
|
|
27
|
+
leftFixtureIsEmpty: boolean;
|
|
28
|
+
rightFixtureIsEmpty: boolean;
|
|
29
|
+
robotIsEmpty: boolean;
|
|
30
|
+
robotHasNoPostOpParts: boolean;
|
|
31
|
+
robotHasMachinedParts: boolean;
|
|
32
|
+
robotHasOnePreTopDeburring: boolean;
|
|
33
|
+
robotHasOnePreMachining: boolean;
|
|
34
|
+
robotHasTwoPreMachining: boolean;
|
|
35
|
+
robotHasOneRaw: boolean;
|
|
36
|
+
oneOrMoreRejectPartsInCell: boolean;
|
|
37
|
+
oneOrMoreRejectPartsInRobot: boolean;
|
|
38
|
+
robotHasOneFinishedPart: boolean;
|
|
39
|
+
finishedCnt: number;
|
|
40
|
+
activeCnt: number;
|
|
41
|
+
batchCntFlag: boolean;
|
|
42
|
+
}
|
|
43
|
+
export declare const initialPartDataStatus: PartDataStatus;
|
|
16
44
|
export interface PartDataDeprecated {
|
|
17
45
|
cncPreOp: [PartStateDeprecated, PartStateDeprecated];
|
|
18
46
|
cnc: [PartStateDeprecated, PartStateDeprecated];
|
|
@@ -1,2 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initialPartDataStatus = exports.initialPartData = exports.initialPartValidationData = void 0;
|
|
4
|
+
const GlobalConstants_1 = require("./GlobalConstants");
|
|
5
|
+
exports.initialPartValidationData = {
|
|
6
|
+
state: -1,
|
|
7
|
+
preWeightKg: -1,
|
|
8
|
+
postWeightKg: -1,
|
|
9
|
+
linerWeightKg: -1,
|
|
10
|
+
};
|
|
11
|
+
exports.initialPartData = {
|
|
12
|
+
processSts: -1,
|
|
13
|
+
validation: { ...exports.initialPartValidationData },
|
|
14
|
+
loadedBadSensor: false,
|
|
15
|
+
fixtureLocationWhenLoaded: -1,
|
|
16
|
+
currentLocation: -1,
|
|
17
|
+
inFixture: false,
|
|
18
|
+
};
|
|
19
|
+
exports.initialPartDataStatus = {
|
|
20
|
+
parts: Array(GlobalConstants_1.GCs.PARTDATA_COUNT).fill(null).map(() => ({ ...exports.initialPartData })),
|
|
21
|
+
allStationsAreEmpty: false,
|
|
22
|
+
rawShelfIsEmpty: false,
|
|
23
|
+
doneShelfIsEmpty: false,
|
|
24
|
+
doneShelfIsFull: false,
|
|
25
|
+
doneShelfSpacesLeftCnt: 0,
|
|
26
|
+
rawShelfPartsLeftCnt: 0,
|
|
27
|
+
allFixturesAreEmpty: false,
|
|
28
|
+
leftFixtureIsEmpty: false,
|
|
29
|
+
rightFixtureIsEmpty: false,
|
|
30
|
+
robotIsEmpty: false,
|
|
31
|
+
robotHasNoPostOpParts: false,
|
|
32
|
+
robotHasMachinedParts: false,
|
|
33
|
+
robotHasOnePreTopDeburring: false,
|
|
34
|
+
robotHasOnePreMachining: false,
|
|
35
|
+
robotHasTwoPreMachining: false,
|
|
36
|
+
robotHasOneRaw: false,
|
|
37
|
+
oneOrMoreRejectPartsInCell: false,
|
|
38
|
+
oneOrMoreRejectPartsInRobot: false,
|
|
39
|
+
robotHasOneFinishedPart: false,
|
|
40
|
+
finishedCnt: 0,
|
|
41
|
+
activeCnt: 0,
|
|
42
|
+
batchCntFlag: false,
|
|
43
|
+
};
|
package/dist/plc-tags/index.d.ts
CHANGED
package/dist/plc-tags/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentAnimation, DeviceConstants, DeviceRegistration, GCs, initialDeviceRegistration, initialTaskQueue, TaskQueue } from ".";
|
|
2
|
-
import { PartData } from "./Part";
|
|
2
|
+
import { initialPartDataStatus, PartData, PartDataStatus } from "./Part";
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
export interface UserData {
|
|
@@ -77,7 +77,7 @@ export interface Machine {
|
|
|
77
77
|
ethercatSlaves_OK: boolean;
|
|
78
78
|
supplyAir_OK: boolean;
|
|
79
79
|
cfg: MachineCfg;
|
|
80
|
-
|
|
80
|
+
pdmSts: PartDataStatus;
|
|
81
81
|
errors: SystemFaultData;
|
|
82
82
|
warnings: SystemFaultData;
|
|
83
83
|
taskQueue: TaskQueue;
|
|
@@ -94,10 +94,10 @@ export const initialMachine: Machine = ({
|
|
|
94
94
|
ethercatSlaves_OK: false,
|
|
95
95
|
supplyAir_OK: false,
|
|
96
96
|
cfg: { ...initialMachineCfg },
|
|
97
|
-
|
|
97
|
+
pdmSts: initialPartDataStatus,
|
|
98
98
|
errors: { ...initialSystemFaultData },
|
|
99
99
|
warnings: { ...initialSystemFaultData },
|
|
100
100
|
taskQueue: { ...initialTaskQueue },
|
|
101
|
-
registeredDevices:
|
|
101
|
+
registeredDevices: [],
|
|
102
102
|
|
|
103
103
|
});
|
package/src/custom-types/Part.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PartStateDeprecated as PartStateDeprecated } from "../enums";
|
|
2
|
+
import { GCs } from "./GlobalConstants";
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
|
|
@@ -43,7 +44,108 @@ export interface PartValidationData {
|
|
|
43
44
|
linerWeightKg: number; // LREAL
|
|
44
45
|
}
|
|
45
46
|
|
|
47
|
+
export const initialPartValidationData: PartValidationData = {
|
|
48
|
+
state: -1,
|
|
49
|
+
preWeightKg: -1,
|
|
50
|
+
postWeightKg: -1,
|
|
51
|
+
linerWeightKg: -1,
|
|
52
|
+
};
|
|
53
|
+
export const initialPartData: PartData = {
|
|
54
|
+
processSts: -1,
|
|
55
|
+
validation: { ...initialPartValidationData },
|
|
56
|
+
loadedBadSensor: false,
|
|
57
|
+
fixtureLocationWhenLoaded: -1,
|
|
58
|
+
currentLocation: -1,
|
|
59
|
+
inFixture: false,
|
|
60
|
+
};
|
|
46
61
|
|
|
62
|
+
// TYPE PartDataStatus :
|
|
63
|
+
// STRUCT
|
|
64
|
+
// Parts: ARRAY[0..GCs.PARTDATA_COUNT-1] OF PartData; //uses PartLocationIds, but lost parts get added to the end of known locations
|
|
65
|
+
// AllStationsAreEmpty:BOOL;
|
|
66
|
+
// RawShelfIsEmpty:BOOL;
|
|
67
|
+
// DoneShelfIsEmpty:BOOL;
|
|
68
|
+
// DoneShelfIsFull:BOOL;
|
|
69
|
+
// DoneShelfSpacesLeftCnt:INT;
|
|
70
|
+
// RawShelfPartsLeftCnt:INT;
|
|
71
|
+
// AllFixturesAreEmpty:BOOL;
|
|
72
|
+
// LeftFixtureIsEmpty:BOOL;
|
|
73
|
+
// RightFixtureIsEmpty:BOOL;
|
|
74
|
+
|
|
75
|
+
// RobotIsEmpty:BOOL;
|
|
76
|
+
// RobotHasNoPostOpParts:BOOL; //robot isn't holding any parts that are machined or washing/dryed or finished
|
|
77
|
+
// RobotHasMachinedParts:BOOL; //robot is holding at least one machined part
|
|
78
|
+
// RobotHasOnePreTopDeburring:BOOL;
|
|
79
|
+
// RobotHasOnePreMachining:BOOL;
|
|
80
|
+
// RobotHasTwoPreMachining:BOOL;
|
|
81
|
+
// RobotHasOneRaw:BOOL;
|
|
82
|
+
|
|
83
|
+
// OneOrMoreRejectPartsInCell:BOOL;// there is a reject part in the robot, preop OR post op (doesn't look at cnc)
|
|
84
|
+
// OneOrMoreRejectPartsInRobot:BOOL;
|
|
85
|
+
|
|
86
|
+
// RobotHasOneFinishedPart:BOOL;
|
|
87
|
+
// FinishedCnt:INT;//amount of finished parts either in post op or in robot
|
|
88
|
+
// ActiveCnt:INT;//how many active parts are in the cell, cnc or robot (does not include raw or done rack)
|
|
89
|
+
// BatchCntFlag:BOOL; //prevent more parts from being picked by raw
|
|
90
|
+
// END_STRUCT
|
|
91
|
+
// END_TYPE
|
|
92
|
+
export interface PartDataStatus {
|
|
93
|
+
parts: PartData[];
|
|
94
|
+
allStationsAreEmpty: boolean;
|
|
95
|
+
rawShelfIsEmpty: boolean;
|
|
96
|
+
doneShelfIsEmpty: boolean;
|
|
97
|
+
doneShelfIsFull: boolean;
|
|
98
|
+
doneShelfSpacesLeftCnt: number;
|
|
99
|
+
rawShelfPartsLeftCnt: number;
|
|
100
|
+
allFixturesAreEmpty: boolean;
|
|
101
|
+
leftFixtureIsEmpty: boolean;
|
|
102
|
+
rightFixtureIsEmpty: boolean;
|
|
103
|
+
|
|
104
|
+
robotIsEmpty: boolean;
|
|
105
|
+
robotHasNoPostOpParts: boolean; //robot isn't holding any parts that are machined or washing/dryed or finished
|
|
106
|
+
robotHasMachinedParts: boolean; //robot is holding at least one machined part
|
|
107
|
+
robotHasOnePreTopDeburring: boolean;
|
|
108
|
+
robotHasOnePreMachining: boolean;
|
|
109
|
+
robotHasTwoPreMachining: boolean;
|
|
110
|
+
robotHasOneRaw: boolean;
|
|
111
|
+
|
|
112
|
+
oneOrMoreRejectPartsInCell: boolean;// there is a reject part in the robot, preop OR post op (doesn't look at cnc)
|
|
113
|
+
oneOrMoreRejectPartsInRobot: boolean;
|
|
114
|
+
|
|
115
|
+
robotHasOneFinishedPart: boolean;
|
|
116
|
+
finishedCnt: number;//amount of finished parts either in post op or in robot
|
|
117
|
+
activeCnt: number;//how many active parts are in the cell, cnc or robot (does not include raw or done rack)
|
|
118
|
+
batchCntFlag: boolean; //prevent more parts from being picked by raw
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export const initialPartDataStatus: PartDataStatus = {
|
|
122
|
+
parts: Array(GCs.PARTDATA_COUNT).fill(null).map(() => ({ ...initialPartData })),
|
|
123
|
+
allStationsAreEmpty: false,
|
|
124
|
+
rawShelfIsEmpty: false,
|
|
125
|
+
doneShelfIsEmpty: false,
|
|
126
|
+
doneShelfIsFull: false,
|
|
127
|
+
doneShelfSpacesLeftCnt: 0,
|
|
128
|
+
rawShelfPartsLeftCnt: 0,
|
|
129
|
+
allFixturesAreEmpty: false,
|
|
130
|
+
leftFixtureIsEmpty: false,
|
|
131
|
+
rightFixtureIsEmpty: false,
|
|
132
|
+
|
|
133
|
+
robotIsEmpty: false,
|
|
134
|
+
robotHasNoPostOpParts: false,
|
|
135
|
+
robotHasMachinedParts: false,
|
|
136
|
+
robotHasOnePreTopDeburring: false,
|
|
137
|
+
robotHasOnePreMachining: false,
|
|
138
|
+
robotHasTwoPreMachining: false,
|
|
139
|
+
robotHasOneRaw: false,
|
|
140
|
+
|
|
141
|
+
oneOrMoreRejectPartsInCell: false,
|
|
142
|
+
oneOrMoreRejectPartsInRobot: false,
|
|
143
|
+
|
|
144
|
+
robotHasOneFinishedPart: false,
|
|
145
|
+
finishedCnt: 0,
|
|
146
|
+
activeCnt: 0,
|
|
147
|
+
batchCntFlag: false,
|
|
148
|
+
};
|
|
47
149
|
|
|
48
150
|
export interface PartDataDeprecated {
|
|
49
151
|
cncPreOp: [PartStateDeprecated, PartStateDeprecated];
|