@kuriousdesign/machine-sdk 1.0.0 → 1.0.1

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.
Files changed (91) hide show
  1. package/dist/custom-types/AppState.d.ts +92 -0
  2. package/dist/custom-types/AppState.js +70 -0
  3. package/dist/custom-types/Com.d.ts +16 -0
  4. package/dist/custom-types/Com.js +2 -0
  5. package/dist/custom-types/Devices/BaseDevice.d.ts +34 -0
  6. package/dist/custom-types/Devices/BaseDevice.js +2 -0
  7. package/dist/custom-types/GlobalConstants.d.ts +4 -0
  8. package/dist/custom-types/GlobalConstants.js +2 -0
  9. package/dist/custom-types/HMI.d.ts +46 -0
  10. package/dist/custom-types/HMI.js +2 -0
  11. package/dist/custom-types/Machine.d.ts +14 -0
  12. package/dist/custom-types/Machine.js +7 -0
  13. package/dist/custom-types/PartData.d.ts +11 -0
  14. package/dist/custom-types/PartData.js +2 -0
  15. package/dist/custom-types/RackData.d.ts +18 -0
  16. package/dist/custom-types/RackData.js +2 -0
  17. package/dist/custom-types/RecipeData.d.ts +7 -0
  18. package/dist/custom-types/RecipeData.js +2 -0
  19. package/dist/custom-types/RecipeManagerFB.d.ts +10 -0
  20. package/dist/custom-types/RecipeManagerFB.js +2 -0
  21. package/dist/custom-types/RobData.d.ts +24 -0
  22. package/dist/custom-types/RobData.js +2 -0
  23. package/dist/custom-types/TaskQueue.d.ts +24 -0
  24. package/dist/custom-types/TaskQueue.js +2 -0
  25. package/dist/custom-types/UserManagerFB.d.ts +7 -0
  26. package/dist/custom-types/UserManagerFB.js +2 -0
  27. package/dist/custom-types/index.d.ts +12 -0
  28. package/dist/custom-types/index.js +28 -0
  29. package/dist/enums/Colors.d.ts +62 -0
  30. package/dist/enums/Colors.js +76 -0
  31. package/dist/enums/DeviceId.d.ts +10 -0
  32. package/dist/enums/DeviceId.js +14 -0
  33. package/dist/enums/Errors.d.ts +6 -0
  34. package/dist/enums/Errors.js +28 -0
  35. package/dist/enums/ExtrusionType.d.ts +4 -0
  36. package/dist/enums/ExtrusionType.js +9 -0
  37. package/dist/enums/OpcuaDatatype.d.ts +28 -0
  38. package/dist/enums/OpcuaDatatype.js +32 -0
  39. package/dist/enums/Pages.d.ts +18 -0
  40. package/dist/enums/Pages.js +22 -0
  41. package/dist/enums/Priorities.d.ts +18 -0
  42. package/dist/enums/Priorities.js +24 -0
  43. package/dist/enums/RobPositions.d.ts +12 -0
  44. package/dist/enums/RobPositions.js +16 -0
  45. package/dist/enums/States.d.ts +54 -0
  46. package/dist/enums/States.js +63 -0
  47. package/dist/enums/TaskId.d.ts +35 -0
  48. package/dist/enums/TaskId.js +40 -0
  49. package/dist/enums/Warnings.d.ts +6 -0
  50. package/dist/enums/Warnings.js +18 -0
  51. package/dist/enums/index.d.ts +11 -0
  52. package/dist/enums/index.js +27 -0
  53. package/dist/functions/colorMapping.d.ts +4 -0
  54. package/dist/functions/colorMapping.js +42 -0
  55. package/dist/functions/index.d.ts +2 -0
  56. package/dist/functions/index.js +18 -0
  57. package/dist/functions/topicMapping.d.ts +1 -0
  58. package/dist/functions/topicMapping.js +9 -0
  59. package/dist/index.d.ts +3 -16
  60. package/dist/index.js +17 -21
  61. package/package.json +8 -3
  62. package/src/custom-types/AppState.ts +116 -0
  63. package/src/custom-types/Com.ts +19 -0
  64. package/src/custom-types/Devices/BaseDevice.ts +41 -0
  65. package/src/custom-types/GlobalConstants.ts +4 -0
  66. package/src/custom-types/HMI.ts +52 -0
  67. package/src/custom-types/Machine.ts +23 -0
  68. package/src/custom-types/PartData.ts +11 -0
  69. package/src/custom-types/RackData.ts +21 -0
  70. package/src/custom-types/RecipeData.ts +7 -0
  71. package/src/custom-types/RecipeManagerFB.ts +11 -0
  72. package/src/custom-types/RobData.ts +27 -0
  73. package/src/custom-types/TaskQueue.ts +31 -0
  74. package/src/custom-types/UserManagerFB.ts +8 -0
  75. package/src/custom-types/index.ts +12 -0
  76. package/src/enums/Colors.ts +79 -0
  77. package/src/enums/DeviceId.ts +10 -0
  78. package/src/enums/Errors.ts +30 -0
  79. package/src/enums/ExtrusionType.ts +5 -0
  80. package/src/enums/OpcuaDatatype.ts +28 -0
  81. package/src/enums/Pages.ts +21 -0
  82. package/src/enums/Priorities.ts +21 -0
  83. package/src/enums/RobPositions.ts +12 -0
  84. package/src/enums/States.ts +59 -0
  85. package/src/enums/TaskId.ts +37 -0
  86. package/src/enums/Warnings.ts +20 -0
  87. package/src/enums/index.ts +11 -0
  88. package/src/functions/colorMapping.ts +42 -0
  89. package/src/functions/index.ts +2 -0
  90. package/src/functions/topicMapping.ts +6 -0
  91. package/src/index.ts +3 -34
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuriousdesign/machine-sdk",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
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",
@@ -8,7 +8,12 @@
8
8
  "build": "tsc",
9
9
  "test": "echo \"Error: no test specified\" && exit 1"
10
10
  },
11
- "keywords": ["machine", "sdk", "data-types", "helpers"],
11
+ "keywords": [
12
+ "machine",
13
+ "sdk",
14
+ "data-types",
15
+ "helpers"
16
+ ],
12
17
  "author": "kuriousdesign (https://github.com/kuriousDesign)",
13
18
  "license": "MIT",
14
19
  "devDependencies": {
@@ -22,4 +27,4 @@
22
27
  "url": "https://github.com/kuriousDesign/machine-sdk/issues"
23
28
  },
24
29
  "homepage": "https://github.com/kuriousDesign/machine-sdk#readme"
25
- }
30
+ }
@@ -0,0 +1,116 @@
1
+ import { PartState, Page } from "../enums";
2
+ import { ButtonBar, StatusBar } from "./HMI";
3
+ import { PartData } from "./PartData";
4
+ import { Device } from "./Devices/BaseDevice";
5
+ import { GlobalConstants } from "./GlobalConstants";
6
+ import {
7
+ RackData,
8
+ RackHmiPbs,
9
+ RecipeData,
10
+ RecipeManagerPbs,
11
+ RobPositionData,
12
+ SystemFaultData,
13
+ TaskQueue,
14
+ UserData,
15
+ UserManagerFB,
16
+ RobData,
17
+ } from ".";
18
+
19
+ export enum NodeId {
20
+ // new node ids
21
+ ButtonBar = "Main.HMI.ButtonBar",
22
+ StatusBar = "Main.HMI.StatusBar",
23
+ RackPbs = "Main.HMI.RackPbs",
24
+ ROB = "Main.ROB",
25
+ CNC = "Main.CNC",
26
+ DBRR = "Main.DBRR",
27
+ WASH = "Main.WASH",
28
+ PartData = "Main.PartData",
29
+ TaskQueue = "Main.TaskQueue",
30
+ GlobalConstants = "GlobalConstants", // TODO: add this to monitored items
31
+ MachineUser = "Machine.User",
32
+ MachineErrors = "Machine.Errors",
33
+ MachineWarnings = "Machine.Warnings",
34
+ RackData = "Main.RackData",
35
+ RecipeData = "Main.RecipeData",
36
+ ActiveJobRecipe = "Main.Job.ActiveRecipe",
37
+ RecipeManagerState = "Main.RecipeManagerFB.State",
38
+ RecipeManagerPbs = "Main.RecipeManagerFB.Pbs",
39
+ RemoteControlPage = "Main.HMI.RemoteControlPage",
40
+ RobData = "Main.RobData",
41
+
42
+ // TODO: add following to montored items, correctly
43
+ UserManagerFB = "Main.UserManagerFB",
44
+ }
45
+
46
+ export interface AppState {
47
+ [NodeId.StatusBar]: StatusBar;
48
+ [NodeId.ButtonBar]: ButtonBar;
49
+ [NodeId.RackPbs]: RackHmiPbs;
50
+ [NodeId.ROB]: Device;
51
+ [NodeId.CNC]: Device;
52
+ [NodeId.DBRR]: Device;
53
+ [NodeId.WASH]: Device;
54
+ [NodeId.PartData]: PartData;
55
+ [NodeId.TaskQueue]: TaskQueue;
56
+ [NodeId.GlobalConstants]: GlobalConstants;
57
+ [NodeId.MachineUser]: UserData;
58
+ [NodeId.MachineErrors]: SystemFaultData;
59
+ [NodeId.MachineWarnings]: SystemFaultData;
60
+ [NodeId.RackData]: RackData;
61
+ [NodeId.RecipeData]: RecipeData[];
62
+ [NodeId.ActiveJobRecipe]: RecipeData;
63
+ [NodeId.RecipeManagerState]: number;
64
+ [NodeId.RecipeManagerPbs]: RecipeManagerPbs;
65
+ [NodeId.UserManagerFB]: UserManagerFB;
66
+ [NodeId.RemoteControlPage]: Page;
67
+ [NodeId.RobData]: RobData;
68
+ }
69
+
70
+ export enum InputNodeId {
71
+ ButtonBarStopBtnClick = "Main.HMI.ButtonBar.StopBtn.wasClicked",
72
+ ButtonBarUnloadbtnClick = "Main.HMI.ButtonBar.UnloadBtn.wasClicked",
73
+ ButtonBarUnlockbtnClick = "Main.HMI.ButtonBar.UnlockBtn.wasClicked",
74
+ ButtonBarEnergizebtnClick = "Main.HMI.ButtonBar.EnergizeBtn.wasClicked",
75
+ ButtonBarStartbtnClick = "Main.HMI.ButtonBar.StartBtn.wasClicked",
76
+ ButtonBarLockbtnClick = "Main.HMI.ButtonBar.LockBtn.wasClicked",
77
+ ButtonBarResetbtnClick = "Main.HMI.ButtonBar.ResetBtn.wasClicked",
78
+ ButtonBarJobchangeBtnClick = "Main.HMI.ButtonBar.JobChangeBtn.wasClicked",
79
+ ButtonBarClearFaultsBtnClick = "Main.HMI.ButtonBar.ClearFaultsBtn.wasClicked",
80
+
81
+ PartDataDoneShelf = "Main.PartData.DoneShelf",
82
+ PartDataRawShelf = "Main.PartData.RawShelf",
83
+
84
+ Username = "Machine.User.Username",
85
+ Password = "Machine.User.Password",
86
+ LoginBtnBlick = "Machine.User.HmiLoginBtn.wasClicked",
87
+ LogoutBtnBlick = "Machine.User.HmiLogoutBtn.wasClicked",
88
+
89
+ EditRawShelfBtnClick = "Main.HMI.RackPbs.EditRawShelfBtn.wasClicked",
90
+ EditDoneShelfBtnClick = "Main.HMI.RackPbs.EditDoneShelfBtn.wasClicked",
91
+ ShelfCancelBtnClick = "Main.HMI.RackPbs.CancelBtn.wasClicked",
92
+ ShelfSaveBtnClick = "Main.HMI.RackPbs.SaveBtn.wasClicked",
93
+
94
+ RecipeManagerEditBtnClick = "Main.recipeManagerFB.pbs.EditBtn.wasClicked",
95
+ RecipeManagerChangeBtnClick = "Main.recipeManagerFB.pbs.ChangeBtn.wasClicked",
96
+ RecipeManagerJobSetupBtnClick = "Main.recipeManagerFB.pbs.JobSetupBtn.wasClicked",
97
+ RecipeManagerActivateBtnClick = "Main.recipeManagerFB.pbs.ActivateBtn",
98
+ RecipeManagerCancelBtnClick = "Main.recipeManagerFB.pbs.CancelBtn",
99
+ RecipeManagerStartSetupBtnClick = "Main.recipeManagerFB.pbs.StartSetupBtn",
100
+ RecipeManagerFinishSetupBtnClick = "Main.recipeManagerFB.pbs.FinishSetupBtn",
101
+
102
+ RecipeData = "Main.RecipeData",
103
+ ActiveJobRecipe = "Machine.Job.ActiveRecipe",
104
+ JobBatchQuantity = "Machine.Job.BatchQty",
105
+
106
+ ActivePage = "Main.HMI.ActivePage",
107
+
108
+ CncPart1 = "Main.PartData.Cnc[0]",
109
+ CncPart2 = "Main.PartData.Cnc[1]",
110
+ PreOpPart1 = "Main.PartData.CncPreOp[0]",
111
+ PreOpPart2 = "Main.PartData.CncPreOp[1]",
112
+ PostOpPart1 = "Main.PartData.CncPostOp[0]",
113
+ PostOpPart2 = "Main.PartData.CncPostOp[1]",
114
+ RobotPart1 = "Main.PartData.Robot[0]",
115
+ RobotPart2 = "Main.PartData.Robot[1]",
116
+ }
@@ -0,0 +1,19 @@
1
+ export interface NewValue {
2
+ nodeId: string;
3
+ value: any
4
+ }
5
+
6
+ export interface UserInput {
7
+ nodeId: string;
8
+ nodeDataType: any;
9
+ value: any
10
+ }
11
+
12
+ export interface LoginInput {
13
+ username: string,
14
+ password: string,
15
+ }
16
+
17
+ export interface RecipeDeleteInput {
18
+ index: number,
19
+ }
@@ -0,0 +1,41 @@
1
+ export interface DeviceCfg {
2
+ mnemonic: string; //short hand notation for the device, e.g. ROB for Robot
3
+ id: number; //calculation using ChildId and Parent Id, where Id = (100*ParentId + LocalId)
4
+ childId: number;
5
+ parentId: number;
6
+ }
7
+
8
+ export interface DeviceFaultData {
9
+ list: number[];
10
+ present: boolean; //status
11
+ }
12
+
13
+ export interface DeviceInputs {
14
+ instantKill_ON: boolean
15
+ }
16
+
17
+ export interface DeviceParentCmds {
18
+ reset: boolean;
19
+ stop: boolean;
20
+ clearFlts: boolean;
21
+ start: boolean;
22
+ abort: boolean;
23
+ kill: boolean;
24
+ }
25
+
26
+ export interface DeviceStatus {
27
+ state: number;
28
+ //Faulted: BOOL;
29
+ //HasWarnings: BOOL;
30
+ stepNum: number;
31
+ colorCode: number; //color to indicate the current status
32
+ }
33
+
34
+ export interface Device {
35
+ cfg: DeviceCfg;
36
+ is: DeviceStatus;
37
+ cmds: DeviceParentCmds;
38
+ errors: DeviceFaultData;
39
+ warnings: DeviceFaultData;
40
+ i: DeviceInputs;
41
+ }
@@ -0,0 +1,4 @@
1
+ export interface GlobalConstants {
2
+ HIDE_LEFT_TWO_COLUMNS: boolean;
3
+ HIDE_RIGHT_COLUMN: boolean;
4
+ }
@@ -0,0 +1,52 @@
1
+ import { FaultCodeData } from "./Machine";
2
+ import { BannerMode, Color, DeviceState, VisibilityState } from "..";
3
+
4
+
5
+ export interface ComponentAnimation {
6
+ visibility: VisibilityState; //enum
7
+ needsExpertUser: boolean; //requires expert user to be active user in order to function
8
+ backgroundColor: Color; //enum
9
+ accentColor: Color; //enum
10
+ fontColor: Color; //enum
11
+ wasClicked: boolean; //this is set by the UI and reset by the PLC
12
+ }
13
+
14
+ export interface ButtonBar {
15
+ stopBtn: ComponentAnimation;
16
+ unloadBtn: ComponentAnimation;
17
+ loadBtn: ComponentAnimation;
18
+ unlockBtn: ComponentAnimation;
19
+ startBtn: ComponentAnimation;
20
+ lockBtn: ComponentAnimation;
21
+ resetBtn: ComponentAnimation;
22
+ jobChangeBtn: ComponentAnimation;
23
+ clearFaultsBtn: ComponentAnimation;
24
+ energizeBtn: ComponentAnimation;
25
+ }
26
+
27
+ export interface StatusBar {
28
+ jobName: string;
29
+ statusMsg: DeviceState;
30
+ status: number;
31
+ cncTimeLeft: number[]; // get the second element in the array
32
+ goodCnt: number;
33
+ batchQty: number;
34
+ dateAndTime: string; //format : 1970-01-01T00:00:00.000Z
35
+ bannerMode: BannerMode;
36
+ faultCodeData: FaultCodeData;
37
+ }
38
+
39
+ export interface RackHmiPbs {
40
+ editRawShelfBtn: ComponentAnimation;
41
+ editDoneShelfBtn: ComponentAnimation;
42
+ cancelBtn: ComponentAnimation;
43
+ saveBtn: ComponentAnimation;
44
+ }
45
+
46
+ export interface HmiData {
47
+ buttonBar: ButtonBar;
48
+ statusBar: StatusBar;
49
+ rackPbs: RackHmiPbs;
50
+ heartbeatPLC: number;
51
+ heartbeatHMI: number;
52
+ }
@@ -0,0 +1,23 @@
1
+ import { ComponentAnimation } from ".";
2
+
3
+ export interface UserData {
4
+ activeUser: number;
5
+ hmiLoginBtn: ComponentAnimation;
6
+ hmiLogoutBtn: ComponentAnimation;
7
+ }
8
+
9
+ export interface FaultCodeData {
10
+ deviceId: number;
11
+ code: number;
12
+ }
13
+
14
+ export interface SystemFaultData {
15
+ list: FaultCodeData[];
16
+ present: boolean;
17
+ }
18
+
19
+ // export interface Machine {
20
+ // user: UserData;
21
+ // errors: SystemFaultData;
22
+ // warnings: SystemFaultData;
23
+ // }
@@ -0,0 +1,11 @@
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
+ }
@@ -0,0 +1,21 @@
1
+ import { RobPositionData } from "..";
2
+
3
+ export interface ShelfPartPositionData {
4
+ index: number;
5
+ colNum: number;
6
+ posLetter: number;
7
+ offest: RobPositionData;
8
+ }
9
+
10
+ export interface RackShelfData {
11
+ nextPart: ShelfPartPositionData;
12
+ lastPart: ShelfPartPositionData;
13
+ isEmpty: boolean;
14
+ isFull: boolean;
15
+ isEditMode: boolean;
16
+ }
17
+
18
+ export interface RackData {
19
+ raw: RackShelfData;
20
+ done: RackShelfData;
21
+ }
@@ -0,0 +1,7 @@
1
+ export interface RecipeData {
2
+ partName: string;
3
+ extrusionType: number;
4
+ extrusionLength_mm: number;
5
+ ncProgramNumber: number;
6
+ partWeight_kg: number;
7
+ }
@@ -0,0 +1,11 @@
1
+ import { ComponentAnimation } from ".";
2
+
3
+ export interface RecipeManagerPbs {
4
+ editBtn: ComponentAnimation;
5
+ changeBtn: ComponentAnimation;
6
+ jobSetupBtn: ComponentAnimation;
7
+ activateBtn: boolean;
8
+ startSetupBtn: boolean;
9
+ finishSetupBtn: boolean;
10
+ cancelBtn: boolean;
11
+ }
@@ -0,0 +1,27 @@
1
+ import { TaskData, RobPositions, TaskId } from "..";
2
+
3
+ export interface RobData {
4
+ zone: RobZoneData;
5
+ pos: RobPositions;
6
+ dest: RobPositions;
7
+ cartesian: RobPositionData;
8
+ taskReq: TaskId; //incoming task request
9
+ taskData: TaskData;
10
+ recipeOffsets: RobPositionData[];
11
+ }
12
+
13
+ export interface RobPositionData {
14
+ x: number;
15
+ y: number;
16
+ z: number;
17
+ wdeg: number;
18
+ pdeg: number;
19
+ rdeg: number;
20
+ }
21
+
22
+ export interface RobZoneData {
23
+ cncHorzShuttle: boolean;
24
+ waypointShuttle: boolean; //Joint moves, wrist is holding parts upright and at a distance that allows robot to rotate about J1 without fear of collision, basically just moving J1
25
+ dcsNoGo: boolean;
26
+ outsideOfCnc: boolean;
27
+ }
@@ -0,0 +1,31 @@
1
+ import { Priority, TaskId } from "..";
2
+
3
+ export interface TaskQueue {
4
+ topPriority: Priority;
5
+ taskList: TaskId[];
6
+ taskCnt: number;
7
+ activeTaskIndex: number;
8
+ }
9
+
10
+ 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
+ }
@@ -0,0 +1,8 @@
1
+ import { ComponentAnimation } from "./HMI";
2
+
3
+ export interface UserManagerFB {
4
+ loginBtn: ComponentAnimation;
5
+ logoutBtn: ComponentAnimation;
6
+ username: string;
7
+ password: string;
8
+ }
@@ -0,0 +1,12 @@
1
+ export * from "./Com";
2
+ export * from "./AppState";
3
+ export * from "./HMI";
4
+ export * from "./Devices/BaseDevice";
5
+ export * from "./Machine";
6
+ export * from "./RackData";
7
+ export * from "./GlobalConstants";
8
+ export * from "./RecipeData";
9
+ export * from "./RecipeManagerFB";
10
+ export * from "./UserManagerFB";
11
+ export * from "./TaskQueue";
12
+ export * from "./RobData";
@@ -0,0 +1,79 @@
1
+ export enum Color {
2
+ Transparent = -1,
3
+ //uses ROYGBIV FOR 1-7
4
+ Black = 0, //#000000,
5
+ Red = 1,
6
+ Orange = 2,
7
+ Yellow = 3, //#FFFF00,
8
+ Green = 4,
9
+ Blue = 5,
10
+ Indigo = 6,
11
+ Violet = 7,
12
+ Gray = 8, //#F2F2F2,
13
+ White = 9,
14
+ //Light Colors
15
+ LightBlack = 10,
16
+ LightRed = 11, //#FF6B6B
17
+ LightOrange = 12,
18
+ LightYellow = 13,
19
+ LightGreen = 14,
20
+ LightBlue = 15,
21
+ LightIndigo = 16,
22
+ LightViolet = 17,
23
+ LightGray = 18,
24
+ LightWhite = 19, //#7F7F7F,
25
+ //Dark Colors
26
+ DarkRed = 201, //#D20000
27
+ DarkYellow = 203, //#F0EA00
28
+ DarkGray = 208,
29
+
30
+ //Bg Colors
31
+ Light = 1001,
32
+ Dark = 1002,
33
+
34
+ //Action Push Button Background Colors
35
+ ActionBtn1 = 21, //#F7A143,
36
+ ActionBtn2 = 22, //#8FAADC,
37
+ ActionBtn3 = 23, //#FF0000, red
38
+ ActionBtn4 = 24,
39
+ ActionBtn5 = 25,
40
+ ActionBtn6 = 26,
41
+
42
+ //General status
43
+ Good = 31,
44
+ Warn = 32, //#FFFF00,
45
+ Error = 33, //#FF0000,
46
+
47
+ //Device states
48
+ Killed = 40,
49
+ Inactive = 41,
50
+ Resetting = 42,
51
+ Idle = 43, //#D9D9D9,
52
+ Running = 44, //#5CEE82,
53
+ Done = 45,
54
+ Aborting = 46,
55
+ Manual = 47,
56
+ Paused = 48,
57
+ Faulted = 49,
58
+ Stopping = 440,
59
+
60
+ //Task List Status
61
+ TaskDone = 50, //#C5E0B4,
62
+ TaskActive = 51, //#8FAADC,
63
+ TaskFuture = 52, //#D9D9D9, same as Idle
64
+
65
+ // Mfg-specific colors
66
+ FanucYellow = 60, //#FFFF00,
67
+
68
+ //Part Status
69
+ Empty = 100, //#373737,
70
+ Processing = 101, //#ED7D31,
71
+ Raw = 102, //#A6A6A6,
72
+ Deburred = 103, //rgba(0,112,192,0.4),
73
+ Machined = 104, //rgba(0,112,192,0.6),
74
+ Washed = 105, //rgba(0,112,192,0.8),
75
+ Dryed = 106, //rgba(0,112,192,1.0),
76
+ Scrapped = 109, //#FF0000, same as Error
77
+ Finished = 110, //#5CEE82, same as Running
78
+ DeburrBottomFinished = 111, //rgba(0,112,192,0.2),
79
+ }
@@ -0,0 +1,10 @@
1
+ export enum DeviceId {
2
+ SYS = 0,
3
+ CON = 1,
4
+ CNC = 2,
5
+ ROB = 3,
6
+ DBRR = 4,
7
+ SFTY = 5,
8
+ RACK = 6,
9
+ WASH = 7,
10
+ }
@@ -0,0 +1,30 @@
1
+ import { DeviceId } from "./DeviceId";
2
+
3
+ export const ErrorsMap: {
4
+ [key in DeviceId]: {
5
+ [key: number]: string;
6
+ };
7
+ } = {
8
+ [DeviceId.SFTY]: {
9
+ 0: "NoError",
10
+ 1: "EstopDumpValveCh1Off",
11
+ 2: "EstopDumpValveCh2Off",
12
+ 3: "EstopDumpValveCh1On",
13
+ 4: "EstopDumpValveCh2On",
14
+ 5: "FenceDumpValveCh1Off",
15
+ 6: "FenceDumpValveCh2Off",
16
+ 7: "FenceDumpValveCh1On",
17
+ 8: "FenceDumpValveCh2On",
18
+ },
19
+ [DeviceId.CNC]: {},
20
+ [DeviceId.CON]: {},
21
+ [DeviceId.DBRR]: {},
22
+ [DeviceId.ROB]: {
23
+ 0: "NoError",
24
+ 1: "ControllerFault",
25
+ 2: "RobotStartedWrongTask",
26
+ },
27
+ [DeviceId.SYS]: {},
28
+ [DeviceId.WASH]: {},
29
+ [DeviceId.RACK]: {},
30
+ };
@@ -0,0 +1,5 @@
1
+ export enum ExtrusionType {
2
+ //FORMATTING CUSTOMERNAME_PARTNO, please use all caps
3
+ ARMY_1703429 = 1,
4
+ ARMY_1801183 = 2,
5
+ }
@@ -0,0 +1,28 @@
1
+ export enum OpcuaDatatype {
2
+ Null = 0,
3
+ Boolean = 1,
4
+ SByte = 2,
5
+ Byte = 3,
6
+ Int16 = 4,
7
+ UInt16 = 5,
8
+ Int32 = 6,
9
+ UInt32 = 7,
10
+ Int64 = 8,
11
+ UInt64 = 9,
12
+ Float = 10,
13
+ Double = 11,
14
+ String = 12,
15
+ DateTime = 13,
16
+ Guid = 14,
17
+ ByteString = 15,
18
+ XmlElement = 16,
19
+ NodeId = 17,
20
+ ExpandedNodeId = 18,
21
+ StatusCode = 19,
22
+ QualifiedName = 20,
23
+ LocalizedText = 21,
24
+ ExtensionObject = 22,
25
+ DataValue = 23,
26
+ Variant = 24,
27
+ DiagnosticInfo = 25
28
+ }
@@ -0,0 +1,21 @@
1
+ export enum Page {
2
+ UNCONTROLLED = 0,
3
+ LOGIN = 1,
4
+ OPERATION = 2,
5
+ HOME = 3,
6
+ SETTINGS = 4,
7
+
8
+ RAW_SHELF = 5,
9
+ EDIT_RAW_SHELF = 6,
10
+ DONE_SHELF = 7,
11
+ EDIT_DONE_SHELF = 8,
12
+
13
+ RECIPES = 9,
14
+ EDIT_RECIPES = 10,
15
+ CHANGE_RECIPE = 11,
16
+ JOB_SETUP = 13,
17
+
18
+ ERRORS = 14,
19
+ WARNINGS = 15,
20
+ ROBOT = 16,
21
+ }
@@ -0,0 +1,21 @@
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
+ }
@@ -0,0 +1,12 @@
1
+ export enum RobPositions {
2
+ AnyPosition = -1, //used when configuring tasks, this is used for start position id for pure moves
3
+ Lost = 0,
4
+ Home = 1,
5
+ WashPerch = 2,
6
+ RackPerch = 3, //used for shelf picking and reject
7
+ DeadNestPerch = 4, //used for preop and postop tasks
8
+ CncPerch = 5, //standby position outside of cnc door with wrist rotated so parts are horizontal
9
+ DeburrPerch = 6,
10
+ CncWaypoint = 7,
11
+ CncHover = 8,
12
+ }