@kuriousdesign/machine-sdk 1.0.27 → 1.0.29

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,6 +1,6 @@
1
1
  import { Page } from "../enums";
2
2
  import { ButtonBar, StatusBar } from "./HMI";
3
- import { PartData } from "./PartData";
3
+ import { PartDataDeprecated } from "./Part";
4
4
  import { Device } from "./BaseDevice/Device";
5
5
  import { GlobalConstants } from "./GlobalConstants";
6
6
  import { RackData, RackHmiPbs, RecipeData, RecipeManagerPbs, SystemFaultData, TaskQueue, UserData, UserManagerFB, RobData } from ".";
@@ -35,7 +35,7 @@ export interface AppState {
35
35
  [NodeId.CNC]: Device;
36
36
  [NodeId.DBRR]: Device;
37
37
  [NodeId.WASH]: Device;
38
- [NodeId.PartData]: PartData;
38
+ [NodeId.PartData]: PartDataDeprecated;
39
39
  [NodeId.TaskQueue]: TaskQueue;
40
40
  [NodeId.GlobalConstants]: GlobalConstants;
41
41
  [NodeId.MachineUser]: UserData;
@@ -1,4 +1,5 @@
1
1
  import { ComponentAnimation } from ".";
2
+ import { PartData } from "./Part";
2
3
  export interface UserData {
3
4
  activeUser: number;
4
5
  hmiLoginBtn: ComponentAnimation;
@@ -12,6 +13,15 @@ export interface SystemFaultData {
12
13
  list: FaultCodeData[];
13
14
  present: boolean;
14
15
  }
16
+ export interface MachineCfg {
17
+ firmwareVersion: string;
18
+ cellType: string;
19
+ softwareMode: string;
20
+ allowAnonymousControl: boolean;
21
+ deviceIsBypassed: boolean[];
22
+ apiOpcuaDeviceId: number;
23
+ ethernetAdapterList: number[];
24
+ }
15
25
  export interface Machine {
16
26
  estopCircuit_OK: boolean;
17
27
  estopCircuitDelayed_OK: boolean;
@@ -21,4 +31,8 @@ export interface Machine {
21
31
  ethercatMaster_OK: boolean;
22
32
  ethercatSlaves_OK: boolean;
23
33
  supplyAir_OK: boolean;
34
+ cfg: MachineCfg;
35
+ parts: PartData[];
36
+ errors: SystemFaultData;
37
+ warnings: SystemFaultData;
24
38
  }
@@ -0,0 +1,25 @@
1
+ import { PartStateDeprecated as PartStateDeprecated } from "../enums";
2
+ export interface PartData {
3
+ processSts: number;
4
+ validation: PartValidationData;
5
+ loadedBadSensor: boolean;
6
+ fixtureLocationWhenLoaded: number;
7
+ currentLocation: number;
8
+ inFixture: boolean;
9
+ }
10
+ export interface PartValidationData {
11
+ state: number;
12
+ preWeightKg: number;
13
+ postWeightKg: number;
14
+ linerWeightKg: number;
15
+ }
16
+ export interface PartDataDeprecated {
17
+ cncPreOp: [PartStateDeprecated, PartStateDeprecated];
18
+ cnc: [PartStateDeprecated, PartStateDeprecated];
19
+ cncPostOp: [PartStateDeprecated, PartStateDeprecated];
20
+ doneShelf: PartStateDeprecated[];
21
+ rawShelf: PartStateDeprecated[];
22
+ robot: [PartStateDeprecated, PartStateDeprecated];
23
+ washer: [PartStateDeprecated, PartStateDeprecated];
24
+ hmiEditingAllowed: boolean;
25
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,24 +1,23 @@
1
- import { Priority, TaskId } from "..";
1
+ export declare enum Priorities {
2
+ NONE = 0,// do not remove or change this
3
+ LOAD_PARTS = 2,
4
+ START_UTILITIES = 10,
5
+ PRE_WEIGH_TUBES = 20,
6
+ APPLY_LINER = 30,
7
+ PHOTOGRAPH_TUBES = 40,
8
+ POST_WEIGH_TUBES = 50,
9
+ STOP_UTILITIES = 60,
10
+ UNLOAD_PARTS = 70
11
+ }
2
12
  export interface TaskQueue {
3
- topPriority: Priority;
4
- taskList: TaskId[];
13
+ topPriority: Priorities;
14
+ taskList: TaskData[];
5
15
  taskCnt: number;
6
16
  activeTaskIndex: number;
7
17
  }
8
18
  export interface TaskData {
9
- id: number;
10
- TaskString: string;
11
- T: number;
12
- TaskType: number;
13
- StartPositionId: number;
14
- EndPositionId: number;
15
- GateId: number;
16
- StationId: number;
17
- PartStatusStart: number[];
18
- PartStatusEnd: number[];
19
- PartId: number;
20
- OffsetUserFrameId: number;
21
- GripperPositionId: number;
22
- LeftGripperMustBeEmpty: boolean;
23
- isCurrentlyAllowed: boolean;
19
+ targetId: number;
20
+ taskId: number;
21
+ paramArray: number[];
22
+ state: number;
24
23
  }
@@ -1,2 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Priorities = void 0;
4
+ var Priorities;
5
+ (function (Priorities) {
6
+ Priorities[Priorities["NONE"] = 0] = "NONE";
7
+ Priorities[Priorities["LOAD_PARTS"] = 2] = "LOAD_PARTS";
8
+ Priorities[Priorities["START_UTILITIES"] = 10] = "START_UTILITIES";
9
+ Priorities[Priorities["PRE_WEIGH_TUBES"] = 20] = "PRE_WEIGH_TUBES";
10
+ Priorities[Priorities["APPLY_LINER"] = 30] = "APPLY_LINER";
11
+ Priorities[Priorities["PHOTOGRAPH_TUBES"] = 40] = "PHOTOGRAPH_TUBES";
12
+ Priorities[Priorities["POST_WEIGH_TUBES"] = 50] = "POST_WEIGH_TUBES";
13
+ Priorities[Priorities["STOP_UTILITIES"] = 60] = "STOP_UTILITIES";
14
+ Priorities[Priorities["UNLOAD_PARTS"] = 70] = "UNLOAD_PARTS";
15
+ })(Priorities || (exports.Priorities = Priorities = {}));
@@ -6,7 +6,7 @@ export declare enum DeviceId {
6
6
  CON = 4,
7
7
  DIAG = 5,
8
8
  RC = 6,
9
- LROB = 10,
9
+ ROB = 10,
10
10
  ABB = 11,
11
11
  EOAT = 12,
12
12
  VIS = 13,
@@ -42,7 +42,6 @@ export declare enum DeviceId {
42
42
  IBZ1 = 48,
43
43
  IBZ2 = 49,
44
44
  WASH = 50,
45
- ROB = 51,
46
45
  DBRR = 52,
47
46
  CNC = 53,
48
47
  RACK = 54
@@ -10,7 +10,7 @@ var DeviceId;
10
10
  DeviceId[DeviceId["CON"] = 4] = "CON";
11
11
  DeviceId[DeviceId["DIAG"] = 5] = "DIAG";
12
12
  DeviceId[DeviceId["RC"] = 6] = "RC";
13
- DeviceId[DeviceId["LROB"] = 10] = "LROB";
13
+ DeviceId[DeviceId["ROB"] = 10] = "ROB";
14
14
  DeviceId[DeviceId["ABB"] = 11] = "ABB";
15
15
  DeviceId[DeviceId["EOAT"] = 12] = "EOAT";
16
16
  DeviceId[DeviceId["VIS"] = 13] = "VIS";
@@ -46,7 +46,7 @@ var DeviceId;
46
46
  DeviceId[DeviceId["IBZ1"] = 48] = "IBZ1";
47
47
  DeviceId[DeviceId["IBZ2"] = 49] = "IBZ2";
48
48
  DeviceId[DeviceId["WASH"] = 50] = "WASH";
49
- DeviceId[DeviceId["ROB"] = 51] = "ROB";
49
+ //ROB = 51,
50
50
  DeviceId[DeviceId["DBRR"] = 52] = "DBRR";
51
51
  DeviceId[DeviceId["CNC"] = 53] = "CNC";
52
52
  DeviceId[DeviceId["RACK"] = 54] = "RACK";
@@ -26,7 +26,7 @@ export declare enum States {
26
26
  export declare function convertStateToString(state: States): "ABORTING" | "ERROR" | "KILLED" | "INACTIVE" | "RESETTING" | "IDLE" | "RUNNING" | "STOPPING" | "PAUSED" | "DONE" | "MANUAL" | "UNKNOWN";
27
27
  export declare function convertStateToColor(state: States): "text-darkred-500" | "text-red-500" | "text-gray-500" | "text-white" | "text-lightblue-500" | "text-blue-500" | "text-green-500" | "text-orange-500" | "text-purple-500" | "text-pink-500" | undefined;
28
28
  export declare function getStateFromStep(step: number): States;
29
- export declare enum PartState {
29
+ export declare enum PartStateDeprecated {
30
30
  Empty = 0,//no part present
31
31
  Raw = 10,
32
32
  DeburrBottomStarted = 11,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BannerMode = exports.StatusMsg = exports.TaskItemState = exports.PartState = exports.States = exports.VisibilityState = void 0;
3
+ exports.BannerMode = exports.StatusMsg = exports.TaskItemState = exports.PartStateDeprecated = exports.States = exports.VisibilityState = void 0;
4
4
  exports.convertStateToString = convertStateToString;
5
5
  exports.convertStateToColor = convertStateToColor;
6
6
  exports.getStateFromStep = getStateFromStep;
@@ -143,24 +143,24 @@ function getStateFromStep(step) {
143
143
  }
144
144
  return state;
145
145
  }
146
- var PartState;
147
- (function (PartState) {
148
- PartState[PartState["Empty"] = 0] = "Empty";
149
- PartState[PartState["Raw"] = 10] = "Raw";
150
- PartState[PartState["DeburrBottomStarted"] = 11] = "DeburrBottomStarted";
151
- PartState[PartState["DeburrBottomFinished"] = 12] = "DeburrBottomFinished";
152
- PartState[PartState["DeburrTopStarted"] = 15] = "DeburrTopStarted";
153
- PartState[PartState["Deburred"] = 20] = "Deburred";
154
- PartState[PartState["MachiningStarted"] = 45] = "MachiningStarted";
155
- PartState[PartState["Machined"] = 50] = "Machined";
156
- PartState[PartState["WashStarted"] = 55] = "WashStarted";
157
- PartState[PartState["Washed"] = 60] = "Washed";
158
- PartState[PartState["DryStarted"] = 65] = "DryStarted";
159
- PartState[PartState["Dryed"] = 70] = "Dryed";
160
- PartState[PartState["Finished"] = 100] = "Finished";
161
- PartState[PartState["Scrapped"] = 911] = "Scrapped";
162
- PartState[PartState["Error"] = 999] = "Error";
163
- })(PartState || (exports.PartState = PartState = {}));
146
+ var PartStateDeprecated;
147
+ (function (PartStateDeprecated) {
148
+ PartStateDeprecated[PartStateDeprecated["Empty"] = 0] = "Empty";
149
+ PartStateDeprecated[PartStateDeprecated["Raw"] = 10] = "Raw";
150
+ PartStateDeprecated[PartStateDeprecated["DeburrBottomStarted"] = 11] = "DeburrBottomStarted";
151
+ PartStateDeprecated[PartStateDeprecated["DeburrBottomFinished"] = 12] = "DeburrBottomFinished";
152
+ PartStateDeprecated[PartStateDeprecated["DeburrTopStarted"] = 15] = "DeburrTopStarted";
153
+ PartStateDeprecated[PartStateDeprecated["Deburred"] = 20] = "Deburred";
154
+ PartStateDeprecated[PartStateDeprecated["MachiningStarted"] = 45] = "MachiningStarted";
155
+ PartStateDeprecated[PartStateDeprecated["Machined"] = 50] = "Machined";
156
+ PartStateDeprecated[PartStateDeprecated["WashStarted"] = 55] = "WashStarted";
157
+ PartStateDeprecated[PartStateDeprecated["Washed"] = 60] = "Washed";
158
+ PartStateDeprecated[PartStateDeprecated["DryStarted"] = 65] = "DryStarted";
159
+ PartStateDeprecated[PartStateDeprecated["Dryed"] = 70] = "Dryed";
160
+ PartStateDeprecated[PartStateDeprecated["Finished"] = 100] = "Finished";
161
+ PartStateDeprecated[PartStateDeprecated["Scrapped"] = 911] = "Scrapped";
162
+ PartStateDeprecated[PartStateDeprecated["Error"] = 999] = "Error";
163
+ })(PartStateDeprecated || (exports.PartStateDeprecated = PartStateDeprecated = {}));
164
164
  var TaskItemState;
165
165
  (function (TaskItemState) {
166
166
  TaskItemState[TaskItemState["TaskDone"] = 48] = "TaskDone";
@@ -4,6 +4,5 @@ export * from "./OpcuaDatatype";
4
4
  export * from "./ExtrusionType";
5
5
  export * from "./DeviceId";
6
6
  export * from "./TaskId";
7
- export * from "./Priorities";
8
7
  export * from "./Pages";
9
8
  export * from "./RobPositions";
@@ -20,6 +20,5 @@ __exportStar(require("./OpcuaDatatype"), exports);
20
20
  __exportStar(require("./ExtrusionType"), exports);
21
21
  __exportStar(require("./DeviceId"), exports);
22
22
  __exportStar(require("./TaskId"), exports);
23
- __exportStar(require("./Priorities"), exports);
24
23
  __exportStar(require("./Pages"), exports);
25
24
  __exportStar(require("./RobPositions"), exports);
@@ -1,4 +1,4 @@
1
1
  import { Color } from "../enums/Colors";
2
- import { States, PartState } from "../enums/States";
2
+ import { States, PartStateDeprecated } from "../enums/States";
3
3
  export declare function deviceStateToColorMap(state: States): Color;
4
- export declare function partStateToColorMap(state: PartState): Color;
4
+ export declare function partStateToColorMap(state: PartStateDeprecated): Color;
@@ -23,21 +23,21 @@ function deviceStateToColorMap(state) {
23
23
  }
24
24
  function partStateToColorMap(state) {
25
25
  const colorMap = {
26
- [States_1.PartState.Empty]: Colors_1.Color.Empty,
27
- [States_1.PartState.Raw]: Colors_1.Color.Raw,
28
- [States_1.PartState.DeburrBottomStarted]: Colors_1.Color.Processing,
29
- [States_1.PartState.DeburrBottomFinished]: Colors_1.Color.DeburrBottomFinished,
30
- [States_1.PartState.DeburrTopStarted]: Colors_1.Color.Processing,
31
- [States_1.PartState.Deburred]: Colors_1.Color.Deburred,
32
- [States_1.PartState.MachiningStarted]: Colors_1.Color.Processing,
33
- [States_1.PartState.Machined]: Colors_1.Color.Machined,
34
- [States_1.PartState.WashStarted]: Colors_1.Color.Processing,
35
- [States_1.PartState.Washed]: Colors_1.Color.Processing,
36
- [States_1.PartState.DryStarted]: Colors_1.Color.Processing,
37
- [States_1.PartState.Dryed]: Colors_1.Color.Dryed,
38
- [States_1.PartState.Finished]: Colors_1.Color.Finished,
39
- [States_1.PartState.Scrapped]: Colors_1.Color.Scrapped,
40
- [States_1.PartState.Error]: Colors_1.Color.Error,
26
+ [States_1.PartStateDeprecated.Empty]: Colors_1.Color.Empty,
27
+ [States_1.PartStateDeprecated.Raw]: Colors_1.Color.Raw,
28
+ [States_1.PartStateDeprecated.DeburrBottomStarted]: Colors_1.Color.Processing,
29
+ [States_1.PartStateDeprecated.DeburrBottomFinished]: Colors_1.Color.DeburrBottomFinished,
30
+ [States_1.PartStateDeprecated.DeburrTopStarted]: Colors_1.Color.Processing,
31
+ [States_1.PartStateDeprecated.Deburred]: Colors_1.Color.Deburred,
32
+ [States_1.PartStateDeprecated.MachiningStarted]: Colors_1.Color.Processing,
33
+ [States_1.PartStateDeprecated.Machined]: Colors_1.Color.Machined,
34
+ [States_1.PartStateDeprecated.WashStarted]: Colors_1.Color.Processing,
35
+ [States_1.PartStateDeprecated.Washed]: Colors_1.Color.Processing,
36
+ [States_1.PartStateDeprecated.DryStarted]: Colors_1.Color.Processing,
37
+ [States_1.PartStateDeprecated.Dryed]: Colors_1.Color.Dryed,
38
+ [States_1.PartStateDeprecated.Finished]: Colors_1.Color.Finished,
39
+ [States_1.PartStateDeprecated.Scrapped]: Colors_1.Color.Scrapped,
40
+ [States_1.PartStateDeprecated.Error]: Colors_1.Color.Error,
41
41
  };
42
42
  return colorMap[state];
43
43
  }
@@ -9,6 +9,7 @@ export declare const MachineTags: {
9
9
  axisStsArray: string;
10
10
  HeartbeatPLC: string;
11
11
  HeartbeatHMI: string;
12
+ parts: string;
12
13
  };
13
14
  export declare const DeviceTags: {
14
15
  Cfg: string;
@@ -26,7 +26,8 @@ exports.MachineTags = {
26
26
  registeredDevices: 'RegisteredDevices',
27
27
  axisStsArray: 'AxisStsArray',
28
28
  HeartbeatPLC: 'HeartbeatPLC',
29
- HeartbeatHMI: 'HeartbeatHMI'
29
+ HeartbeatHMI: 'HeartbeatHMI',
30
+ parts: 'Parts',
30
31
  };
31
32
  exports.DeviceTags = {
32
33
  Cfg: 'Cfg',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuriousdesign/machine-sdk",
3
- "version": "1.0.27",
3
+ "version": "1.0.29",
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",
@@ -1,6 +1,6 @@
1
- import { PartState, Page } from "../enums";
1
+ import { PartStateDeprecated, Page } from "../enums";
2
2
  import { ButtonBar, StatusBar } from "./HMI";
3
- import { PartData } from "./PartData";
3
+ import { PartDataDeprecated } from "./Part";
4
4
  import { Device } from "./BaseDevice/Device";
5
5
  import { GlobalConstants } from "./GlobalConstants";
6
6
  import {
@@ -51,7 +51,7 @@ export interface AppState {
51
51
  [NodeId.CNC]: Device;
52
52
  [NodeId.DBRR]: Device;
53
53
  [NodeId.WASH]: Device;
54
- [NodeId.PartData]: PartData;
54
+ [NodeId.PartData]: PartDataDeprecated;
55
55
  [NodeId.TaskQueue]: TaskQueue;
56
56
  [NodeId.GlobalConstants]: GlobalConstants;
57
57
  [NodeId.MachineUser]: UserData;
@@ -1,4 +1,5 @@
1
1
  import { ComponentAnimation } from ".";
2
+ import { PartData } from "./Part";
2
3
 
3
4
  export interface UserData {
4
5
  activeUser: number;
@@ -16,11 +17,33 @@ export interface SystemFaultData {
16
17
  present: boolean;
17
18
  }
18
19
 
19
- // export interface Machine {
20
- // user: UserData;
21
- // errors: SystemFaultData;
22
- // warnings: SystemFaultData;
23
- // }
20
+
21
+ // TYPE MachineCfg :
22
+ // STRUCT
23
+ // FirmwareVersion: STRING;
24
+ // CellType: CellTypes;
25
+ // SoftwareMode: SoftwareModes;
26
+ // AllowAnonymousControl: BOOL;
27
+ // DeviceIsBypassed: ARRAY[0..(GCs.NUM_DEVICES-1)] OF BOOL; //used to set devices to be bypassed or not
28
+ // ApiOpcuaDeviceId:INT; //designates which device is using the opcua api
29
+ // EthernetAdapterList: ARRAY[0..4] OF INT;
30
+ // //SerialNumber: STRING(255); moved to ControllerInstanceData
31
+ // //Name: STRING; moved to ControllerInstanceData
32
+ // //Location: STRING; moved to ControllerInstanceData
33
+
34
+ // END_STRUCT
35
+ // END_TYPE
36
+
37
+
38
+ export interface MachineCfg {
39
+ firmwareVersion: string;
40
+ cellType: string;
41
+ softwareMode: string;
42
+ allowAnonymousControl: boolean;
43
+ deviceIsBypassed: boolean[];
44
+ apiOpcuaDeviceId: number;
45
+ ethernetAdapterList: number[];
46
+ }
24
47
 
25
48
  export interface Machine {
26
49
  estopCircuit_OK: boolean;
@@ -31,4 +54,9 @@ export interface Machine {
31
54
  ethercatMaster_OK: boolean;
32
55
  ethercatSlaves_OK: boolean;
33
56
  supplyAir_OK: boolean;
57
+ cfg: MachineCfg;
58
+ parts: PartData[];
59
+ errors: SystemFaultData;
60
+ warnings: SystemFaultData;
61
+ //taskList: MachineTask[];
34
62
  }
@@ -0,0 +1,57 @@
1
+ import { PartStateDeprecated as PartStateDeprecated } from "../enums";
2
+
3
+
4
+
5
+ // TYPE PartValidationData :
6
+ // STRUCT
7
+ // State:INT;
8
+ // PreWeightKg:LREAL;
9
+ // PostWeightKg:LREAL;
10
+ // LinerWeightKg:LREAL;
11
+ // END_STRUCT
12
+ // END_TYPE
13
+
14
+
15
+ // TYPE PartData :
16
+ // STRUCT
17
+ // ProcessSts:INT;//PartStates enum
18
+ // Validation:PartValidationData;
19
+ // LoadedBadSensor:BOOL; //marks if loaded into system with bad part present sensor
20
+ // FixtureLocationWhenLoaded:INT; //LocationIds enum, where this part was loaced
21
+ // CurrentLocation:INT; //LocationIds enum, this is also the same as the partIndex of the Machine.PartData[partIndex]
22
+ // InFixture:BOOL; //CurrentLocation = FixtureLocationWhenLoaded
23
+
24
+ // //RecipeData:PartRecipeData;
25
+ // END_STRUCT
26
+ // END_TYPE
27
+
28
+
29
+
30
+ export interface PartData {
31
+ processSts: number; // PartStates enum
32
+ validation: PartValidationData;
33
+ loadedBadSensor: boolean; // marks if loaded into system with bad part present sensor
34
+ fixtureLocationWhenLoaded: number; // LocationIds enum, where this part was loaced
35
+ currentLocation: number; // LocationIds enum, this is also the same as the partIndex of the Machine.PartData[partIndex]
36
+ inFixture: boolean; // CurrentLocation = FixtureLocationWhenLoaded
37
+ }
38
+
39
+ export interface PartValidationData {
40
+ state: number; // PartStates enum
41
+ preWeightKg: number; // LREAL
42
+ postWeightKg: number; // LREAL
43
+ linerWeightKg: number; // LREAL
44
+ }
45
+
46
+
47
+
48
+ export interface PartDataDeprecated {
49
+ cncPreOp: [PartStateDeprecated, PartStateDeprecated];
50
+ cnc: [PartStateDeprecated, PartStateDeprecated];
51
+ cncPostOp: [PartStateDeprecated, PartStateDeprecated];
52
+ doneShelf: PartStateDeprecated[];
53
+ rawShelf: PartStateDeprecated[];
54
+ robot: [PartStateDeprecated, PartStateDeprecated];
55
+ washer: [PartStateDeprecated, PartStateDeprecated];
56
+ hmiEditingAllowed: boolean;
57
+ }
@@ -1,31 +1,25 @@
1
- import { Priority, TaskId } from "..";
1
+ export enum Priorities {
2
+ NONE = 0, // do not remove or change this
3
+ LOAD_PARTS = 2,
4
+ START_UTILITIES = 10,
5
+ PRE_WEIGH_TUBES = 20,
6
+ APPLY_LINER = 30,
7
+ PHOTOGRAPH_TUBES = 40,
8
+ POST_WEIGH_TUBES = 50,
9
+ STOP_UTILITIES = 60,
10
+ UNLOAD_PARTS = 70
11
+ }
2
12
 
3
13
  export interface TaskQueue {
4
- topPriority: Priority;
5
- taskList: TaskId[];
14
+ topPriority: Priorities;
15
+ taskList: TaskData[];
6
16
  taskCnt: number;
7
17
  activeTaskIndex: number;
8
18
  }
9
19
 
10
20
  export interface TaskData {
11
- id: number;
12
- TaskString: string; //like a description
13
- T: number; // time in seconds to complete task
14
- TaskType: number; //Pick (state change ignored), Load (state change ignored), Move (state change ignored), Move with Process (state change used), Transform/Process (stage change used)
15
-
16
- StartPositionId: number; //starting position required before this task is allowed
17
- EndPositionId: number; //ending position after this task is finished
18
- GateId: number; //robot-cnc door, for example
19
-
20
- StationId: number; //used for transform processes
21
- PartStatusStart: number[];
22
- PartStatusEnd: number[];
23
- PartId: number; //used for pick and load moves
24
-
25
- OffsetUserFrameId: number; //90 Through 99, corresponds to our PRs 90-99 which correspdond to the user frame
26
-
27
- GripperPositionId: number; //0 for left, 1 for right, 2 for both (used for moves in and out of CNC, and to from washer)
28
- LeftGripperMustBeEmpty: boolean;
29
-
30
- isCurrentlyAllowed: boolean; //set this with logic, do not configure
31
- }
21
+ targetId: number;
22
+ taskId: number; // specific to the targetId
23
+ paramArray: number[]; // ARRAY[0..DeviceConstants.MAX_NUM_PARAMS-1] OF LREAL;
24
+ state: number; // DeviceStates: 0 (NONE), IDLE, RUNNING, PAUSED, ERROR, DONE
25
+ }
@@ -7,7 +7,7 @@ export enum DeviceId {
7
7
  DIAG = 5,
8
8
  RC = 6,
9
9
 
10
- LROB = 10,
10
+ ROB = 10,
11
11
  ABB = 11,
12
12
  EOAT = 12,
13
13
  VIS = 13,
@@ -48,7 +48,7 @@ export enum DeviceId {
48
48
  IBZ1 = 48,
49
49
  IBZ2 = 49,
50
50
  WASH = 50,
51
- ROB = 51,
51
+ //ROB = 51,
52
52
  DBRR = 52,
53
53
  CNC = 53,
54
54
  RACK = 54,
@@ -137,7 +137,7 @@ export function getStateFromStep(step:number): States {
137
137
  return state;
138
138
  }
139
139
 
140
- export enum PartState {
140
+ export enum PartStateDeprecated {
141
141
  Empty = 0, //no part present
142
142
  Raw = 10,
143
143
  DeburrBottomStarted = 11,
@@ -5,6 +5,6 @@ export * from "./ExtrusionType";
5
5
 
6
6
  export * from "./DeviceId";
7
7
  export * from "./TaskId";
8
- export * from "./Priorities";
8
+
9
9
  export * from "./Pages";
10
10
  export * from "./RobPositions";
@@ -1,5 +1,5 @@
1
1
  import { Color } from "../enums/Colors";
2
- import { States, PartState } from "../enums/States";
2
+ import { States, PartStateDeprecated } from "../enums/States";
3
3
 
4
4
  export function deviceStateToColorMap(state: States): Color {
5
5
  const colorMap: { [key in States]: Color } = {
@@ -20,23 +20,23 @@ export function deviceStateToColorMap(state: States): Color {
20
20
  return colorMap[state];
21
21
  }
22
22
 
23
- export function partStateToColorMap(state: PartState): Color {
24
- const colorMap: { [key in PartState]: Color } = {
25
- [PartState.Empty]: Color.Empty,
26
- [PartState.Raw]: Color.Raw,
27
- [PartState.DeburrBottomStarted]: Color.Processing,
28
- [PartState.DeburrBottomFinished]: Color.DeburrBottomFinished,
29
- [PartState.DeburrTopStarted]: Color.Processing,
30
- [PartState.Deburred]: Color.Deburred,
31
- [PartState.MachiningStarted]: Color.Processing,
32
- [PartState.Machined]: Color.Machined,
33
- [PartState.WashStarted]: Color.Processing,
34
- [PartState.Washed]: Color.Processing,
35
- [PartState.DryStarted]: Color.Processing,
36
- [PartState.Dryed]: Color.Dryed,
37
- [PartState.Finished]: Color.Finished,
38
- [PartState.Scrapped]: Color.Scrapped,
39
- [PartState.Error]: Color.Error,
23
+ export function partStateToColorMap(state: PartStateDeprecated): Color {
24
+ const colorMap: { [key in PartStateDeprecated]: Color } = {
25
+ [PartStateDeprecated.Empty]: Color.Empty,
26
+ [PartStateDeprecated.Raw]: Color.Raw,
27
+ [PartStateDeprecated.DeburrBottomStarted]: Color.Processing,
28
+ [PartStateDeprecated.DeburrBottomFinished]: Color.DeburrBottomFinished,
29
+ [PartStateDeprecated.DeburrTopStarted]: Color.Processing,
30
+ [PartStateDeprecated.Deburred]: Color.Deburred,
31
+ [PartStateDeprecated.MachiningStarted]: Color.Processing,
32
+ [PartStateDeprecated.Machined]: Color.Machined,
33
+ [PartStateDeprecated.WashStarted]: Color.Processing,
34
+ [PartStateDeprecated.Washed]: Color.Processing,
35
+ [PartStateDeprecated.DryStarted]: Color.Processing,
36
+ [PartStateDeprecated.Dryed]: Color.Dryed,
37
+ [PartStateDeprecated.Finished]: Color.Finished,
38
+ [PartStateDeprecated.Scrapped]: Color.Scrapped,
39
+ [PartStateDeprecated.Error]: Color.Error,
40
40
  };
41
41
 
42
42
  return colorMap[state];
@@ -10,7 +10,8 @@ export const MachineTags = {
10
10
  registeredDevices: 'RegisteredDevices',
11
11
  axisStsArray: 'AxisStsArray',
12
12
  HeartbeatPLC: 'HeartbeatPLC',
13
- HeartbeatHMI: 'HeartbeatHMI'
13
+ HeartbeatHMI: 'HeartbeatHMI',
14
+ parts: 'Parts',
14
15
  }
15
16
 
16
17
  export const DeviceTags = {
@@ -1,11 +0,0 @@
1
- import { PartState } from "../enums";
2
- export interface PartData {
3
- cncPreOp: [PartState, PartState];
4
- cnc: [PartState, PartState];
5
- cncPostOp: [PartState, PartState];
6
- doneShelf: PartState[];
7
- rawShelf: PartState[];
8
- robot: [PartState, PartState];
9
- washer: [PartState, PartState];
10
- hmiEditingAllowed: boolean;
11
- }
@@ -1,21 +0,0 @@
1
- export enum Priority {
2
- //TopPriorities must be ordered from most important (priority = 1) to least important
3
- NoPriority = 0, //no priorites were detected
4
- StartCnc = 1, //priority to start cnc (get robot out of cnc, close door and start that thing)
5
- DropoffMachinedParts = 2, //Dropoff machined parts in the post op (do this after cnc machining and before cnc loading)
6
- LoadCnc = 3, //Top priority to load the deburred parts into the cnc
7
- FinishPostOp = 4, //Top prioroity to finish parts after the cnc op
8
- UnloadCnc = 5, //Top priority to remove machined parts from cnc
9
- PrepParts = 6, //Top priority to get two parts deburred into the preop deadnest
10
- WaitToUnload = 7,
11
- CloseCncDoor = 8,
12
-
13
- //FillRobotWithTwoDeburredParts=11, //sub priority to loading cnc, robot needs to fill both grippers with deburred parts
14
- DeburrPart = 20, //sub priorty to loading cnc and robot needs deburred parts
15
- PickRawShelf = 21, //sub priority to pick raw shelf
16
- PickRawPartFromPreOp = 22, //sub priority to pick raw shelf
17
- LoadPreOpWithDeburred = 23,
18
- GatherDeburredPartsForCncLoad = 24, //Top priority to grab deburred parts and get in ready position to load cnc (do this before cnc loading)
19
- WashParts = 31,
20
- RejectScrap = 91, //priority to pick and reject a scrap part
21
- }