@kuriousdesign/machine-sdk 1.0.64 → 1.0.69
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/.github/workflows/publish.yml +28 -0
- package/README.md +28 -51
- package/dist/custom-types/BaseDevice/Device.d.ts +1 -1
- package/dist/custom-types/BaseDevice/Device.js +1 -1
- package/dist/custom-types/BaseDevice/index.d.ts +1 -0
- package/dist/custom-types/BaseDevice/index.js +1 -0
- package/dist/custom-types/Devices/index.d.ts +0 -2
- package/dist/custom-types/Devices/index.js +0 -2
- package/dist/custom-types/Recipe.d.ts +2 -0
- package/dist/custom-types/Recipe.js +9 -1
- package/package.json +1 -1
- package/src/abb/enums/GCs.mod +44 -44
- package/src/abb/enums/PartLocationIds.mod +13 -13
- package/src/abb/enums/RobTasks.mod +18 -18
- package/src/abb/enums/States.mod +20 -20
- package/src/abb/procs/MainModule.mod +188 -188
- package/src/abb/records/DeviceDataTypes.mod +35 -35
- package/src/custom-types/AppState.ts +115 -115
- package/src/custom-types/BaseDevice/Actions.ts +45 -45
- package/src/custom-types/BaseDevice/ApiOpcua.ts +71 -71
- package/src/custom-types/BaseDevice/Device.ts +224 -224
- package/src/custom-types/BaseDevice/DeviceCmds.ts +45 -45
- package/src/custom-types/BaseDevice/DeviceConstants.ts +9 -9
- package/src/custom-types/{Devices → BaseDevice}/DeviceTypes.ts +60 -60
- package/src/custom-types/BaseDevice/Processes.ts +38 -38
- package/src/custom-types/BaseDevice/index.ts +7 -6
- package/src/custom-types/Bridge.ts +8 -8
- package/src/custom-types/Com.ts +19 -19
- package/src/custom-types/Devices/Axis.ts +222 -222
- package/src/custom-types/Devices/Conductor.ts +14 -14
- package/src/custom-types/Devices/Pot.ts +24 -24
- package/src/custom-types/Devices/Robot.ts +208 -208
- package/src/custom-types/Devices/index.ts +3 -4
- package/src/custom-types/GlobalConstants.ts +98 -98
- package/src/custom-types/HMI.ts +52 -52
- package/src/custom-types/Machine.ts +130 -130
- package/src/custom-types/Part.ts +238 -238
- package/src/custom-types/RackData.ts +22 -22
- package/src/custom-types/Recipe.ts +250 -240
- package/src/custom-types/RecipeManagerFB.ts +10 -10
- package/src/custom-types/TaskQueue.ts +86 -86
- package/src/custom-types/UserManagerFB.ts +7 -7
- package/src/custom-types/index.ts +14 -14
- package/src/enums/Colors.ts +79 -79
- package/src/enums/DeviceId.ts +116 -116
- package/src/enums/ExtrusionType.ts +5 -5
- package/src/enums/OpcuaDatatype.ts +27 -27
- package/src/enums/Pages.ts +21 -21
- package/src/enums/States.ts +173 -173
- package/src/enums/TaskId.ts +37 -37
- package/src/enums/index.ts +9 -9
- package/src/functions/colorMapping.ts +43 -43
- package/src/functions/index.ts +2 -2
- package/src/functions/mqtt-helpers.ts +20 -20
- package/src/functions/topicMapping.ts +6 -6
- package/src/index.ts +3 -3
- package/src/plc-tags/index.ts +38 -38
- package/src/plc-tags/mqtt.ts +9 -9
- package/src/plc-tags/opcua.ts +3 -3
- package/src/styles/animations.css +15 -15
- package/tsconfig.json +13 -13
- package/dist/custom-types/Devices/Device.d.ts +0 -111
- package/dist/custom-types/Devices/Device.js +0 -108
- package/dist/custom-types/PartData.d.ts +0 -11
- package/dist/custom-types/PartData.js +0 -2
- package/dist/custom-types/RecipeData.d.ts +0 -7
- package/dist/custom-types/RecipeData.js +0 -2
- package/dist/enums/Errors.d.ts +0 -6
- package/dist/enums/Errors.js +0 -28
- package/dist/enums/Priorities.d.ts +0 -18
- package/dist/enums/Priorities.js +0 -24
- package/dist/enums/RobPositions.d.ts +0 -12
- package/dist/enums/RobPositions.js +0 -16
- package/dist/enums/Warnings.d.ts +0 -6
- package/dist/enums/Warnings.js +0 -18
- /package/dist/custom-types/{Devices → BaseDevice}/DeviceTypes.d.ts +0 -0
- /package/dist/custom-types/{Devices → BaseDevice}/DeviceTypes.js +0 -0
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
// {attribute 'qualified_only'}
|
|
2
|
-
// {attribute 'strict'}
|
|
3
|
-
// TYPE DeviceTypes :
|
|
4
|
-
// (
|
|
5
|
-
// Base := 0,
|
|
6
|
-
// Axis := 1,
|
|
7
|
-
// BoschAxis:=2,
|
|
8
|
-
// DualAxis:=3,
|
|
9
|
-
// Gantry:=4,
|
|
10
|
-
// System:=5,
|
|
11
|
-
// Bridge:=6,
|
|
12
|
-
// Conductor:=7,
|
|
13
|
-
// Rob:=8,
|
|
14
|
-
// Eoat:=9,
|
|
15
|
-
// Vision:=10
|
|
16
|
-
// );
|
|
17
|
-
// END_TYPE
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export enum DeviceTypes {
|
|
22
|
-
Base = 0,
|
|
23
|
-
Axis = 1,
|
|
24
|
-
BoschAxis = 2,
|
|
25
|
-
DualAxis = 3,
|
|
26
|
-
Gantry = 4,
|
|
27
|
-
Bridge = 6,
|
|
28
|
-
Machine = 7,
|
|
29
|
-
Robot = 8,
|
|
30
|
-
Vision = 10,
|
|
31
|
-
TwoPos = 11,
|
|
32
|
-
TwoPosGantry = 12
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export function deviceTypeToString(deviceType: DeviceTypes): string {
|
|
36
|
-
switch (deviceType) {
|
|
37
|
-
case DeviceTypes.Base:
|
|
38
|
-
return 'Base';
|
|
39
|
-
case DeviceTypes.Axis:
|
|
40
|
-
return 'Axis';
|
|
41
|
-
case DeviceTypes.BoschAxis:
|
|
42
|
-
return 'Bosch Axis';
|
|
43
|
-
case DeviceTypes.DualAxis:
|
|
44
|
-
return 'Dual Axis';
|
|
45
|
-
case DeviceTypes.Gantry:
|
|
46
|
-
return 'Gantry';
|
|
47
|
-
case DeviceTypes.Bridge:
|
|
48
|
-
return 'Bridge';
|
|
49
|
-
case DeviceTypes.Machine:
|
|
50
|
-
return 'Machine';
|
|
51
|
-
case DeviceTypes.Robot:
|
|
52
|
-
return 'Robot';
|
|
53
|
-
case DeviceTypes.Vision:
|
|
54
|
-
return 'Vision';
|
|
55
|
-
case DeviceTypes.TwoPos:
|
|
56
|
-
return 'Two Position';
|
|
57
|
-
case DeviceTypes.TwoPosGantry:
|
|
58
|
-
default:
|
|
59
|
-
return 'Unknown';
|
|
60
|
-
}
|
|
1
|
+
// {attribute 'qualified_only'}
|
|
2
|
+
// {attribute 'strict'}
|
|
3
|
+
// TYPE DeviceTypes :
|
|
4
|
+
// (
|
|
5
|
+
// Base := 0,
|
|
6
|
+
// Axis := 1,
|
|
7
|
+
// BoschAxis:=2,
|
|
8
|
+
// DualAxis:=3,
|
|
9
|
+
// Gantry:=4,
|
|
10
|
+
// System:=5,
|
|
11
|
+
// Bridge:=6,
|
|
12
|
+
// Conductor:=7,
|
|
13
|
+
// Rob:=8,
|
|
14
|
+
// Eoat:=9,
|
|
15
|
+
// Vision:=10
|
|
16
|
+
// );
|
|
17
|
+
// END_TYPE
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export enum DeviceTypes {
|
|
22
|
+
Base = 0,
|
|
23
|
+
Axis = 1,
|
|
24
|
+
BoschAxis = 2,
|
|
25
|
+
DualAxis = 3,
|
|
26
|
+
Gantry = 4,
|
|
27
|
+
Bridge = 6,
|
|
28
|
+
Machine = 7,
|
|
29
|
+
Robot = 8,
|
|
30
|
+
Vision = 10,
|
|
31
|
+
TwoPos = 11,
|
|
32
|
+
TwoPosGantry = 12
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function deviceTypeToString(deviceType: DeviceTypes): string {
|
|
36
|
+
switch (deviceType) {
|
|
37
|
+
case DeviceTypes.Base:
|
|
38
|
+
return 'Base';
|
|
39
|
+
case DeviceTypes.Axis:
|
|
40
|
+
return 'Axis';
|
|
41
|
+
case DeviceTypes.BoschAxis:
|
|
42
|
+
return 'Bosch Axis';
|
|
43
|
+
case DeviceTypes.DualAxis:
|
|
44
|
+
return 'Dual Axis';
|
|
45
|
+
case DeviceTypes.Gantry:
|
|
46
|
+
return 'Gantry';
|
|
47
|
+
case DeviceTypes.Bridge:
|
|
48
|
+
return 'Bridge';
|
|
49
|
+
case DeviceTypes.Machine:
|
|
50
|
+
return 'Machine';
|
|
51
|
+
case DeviceTypes.Robot:
|
|
52
|
+
return 'Robot';
|
|
53
|
+
case DeviceTypes.Vision:
|
|
54
|
+
return 'Vision';
|
|
55
|
+
case DeviceTypes.TwoPos:
|
|
56
|
+
return 'Two Position';
|
|
57
|
+
case DeviceTypes.TwoPosGantry:
|
|
58
|
+
default:
|
|
59
|
+
return 'Unknown';
|
|
60
|
+
}
|
|
61
61
|
};
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
export interface ProcessData {
|
|
2
|
-
// THESE PARAMETERS MUST ONLY BE WRITTEN OUTSIDE THIS FB BY method: SendProcessRequest()
|
|
3
|
-
requestId: number; // processId that is being requested
|
|
4
|
-
requestParamArray: number[]; // passable parameter for the RPC Call (MAX_NUM_PARAMS length)
|
|
5
|
-
senderId: number; // use DeviceIds enum
|
|
6
|
-
|
|
7
|
-
// THESE PARAMETERS ARE SET INTERNALLY
|
|
8
|
-
activeId: number; // active right now and not already DONE
|
|
9
|
-
activeName: string;
|
|
10
|
-
lastId: number; // last id to be active (it could have ended successfully or with error)
|
|
11
|
-
firstScan: boolean;
|
|
12
|
-
isStepNum: number; // read-only
|
|
13
|
-
stepDescription: string;
|
|
14
|
-
isDone: boolean;
|
|
15
|
-
isError: boolean;
|
|
16
|
-
nextStepNum: number;
|
|
17
|
-
deviceStateThatCalled: number;
|
|
18
|
-
deviceStepThatCalled: number; // the step number that called the process, which determines where the process returns to after completion
|
|
19
|
-
paramArray: number[]; // passable parameter for the RPC Call (MAX_NUM_PARAMS length)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const initialProcessData: ProcessData = {
|
|
23
|
-
requestId: 0,
|
|
24
|
-
requestParamArray: new Array(10).fill(0),
|
|
25
|
-
senderId: 0,
|
|
26
|
-
activeId: 0,
|
|
27
|
-
activeName: '',
|
|
28
|
-
lastId: 0,
|
|
29
|
-
firstScan: false,
|
|
30
|
-
isStepNum: 0,
|
|
31
|
-
stepDescription: '',
|
|
32
|
-
isDone: false,
|
|
33
|
-
isError: false,
|
|
34
|
-
nextStepNum: 0,
|
|
35
|
-
deviceStateThatCalled: 0,
|
|
36
|
-
deviceStepThatCalled: 0,
|
|
37
|
-
paramArray: new Array(10).fill(0)
|
|
38
|
-
};
|
|
1
|
+
export interface ProcessData {
|
|
2
|
+
// THESE PARAMETERS MUST ONLY BE WRITTEN OUTSIDE THIS FB BY method: SendProcessRequest()
|
|
3
|
+
requestId: number; // processId that is being requested
|
|
4
|
+
requestParamArray: number[]; // passable parameter for the RPC Call (MAX_NUM_PARAMS length)
|
|
5
|
+
senderId: number; // use DeviceIds enum
|
|
6
|
+
|
|
7
|
+
// THESE PARAMETERS ARE SET INTERNALLY
|
|
8
|
+
activeId: number; // active right now and not already DONE
|
|
9
|
+
activeName: string;
|
|
10
|
+
lastId: number; // last id to be active (it could have ended successfully or with error)
|
|
11
|
+
firstScan: boolean;
|
|
12
|
+
isStepNum: number; // read-only
|
|
13
|
+
stepDescription: string;
|
|
14
|
+
isDone: boolean;
|
|
15
|
+
isError: boolean;
|
|
16
|
+
nextStepNum: number;
|
|
17
|
+
deviceStateThatCalled: number;
|
|
18
|
+
deviceStepThatCalled: number; // the step number that called the process, which determines where the process returns to after completion
|
|
19
|
+
paramArray: number[]; // passable parameter for the RPC Call (MAX_NUM_PARAMS length)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const initialProcessData: ProcessData = {
|
|
23
|
+
requestId: 0,
|
|
24
|
+
requestParamArray: new Array(10).fill(0),
|
|
25
|
+
senderId: 0,
|
|
26
|
+
activeId: 0,
|
|
27
|
+
activeName: '',
|
|
28
|
+
lastId: 0,
|
|
29
|
+
firstScan: false,
|
|
30
|
+
isStepNum: 0,
|
|
31
|
+
stepDescription: '',
|
|
32
|
+
isDone: false,
|
|
33
|
+
isError: false,
|
|
34
|
+
nextStepNum: 0,
|
|
35
|
+
deviceStateThatCalled: 0,
|
|
36
|
+
deviceStepThatCalled: 0,
|
|
37
|
+
paramArray: new Array(10).fill(0)
|
|
38
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export * from "./Actions";
|
|
2
|
-
export * from "./ApiOpcua";
|
|
3
|
-
export * from "./Device";
|
|
4
|
-
export * from "./DeviceConstants";
|
|
5
|
-
export * from "./Processes";
|
|
6
|
-
export * from "./DeviceCmds";
|
|
1
|
+
export * from "./Actions";
|
|
2
|
+
export * from "./ApiOpcua";
|
|
3
|
+
export * from "./Device";
|
|
4
|
+
export * from "./DeviceConstants";
|
|
5
|
+
export * from "./Processes";
|
|
6
|
+
export * from "./DeviceCmds";
|
|
7
|
+
export * from "./DeviceTypes";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export enum BridgeCmds {
|
|
2
|
-
NONE = 1,
|
|
3
|
-
CONNECT = 2,
|
|
4
|
-
DISCONNECT = 3
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface BridgeData {
|
|
8
|
-
connectedClients: number[];
|
|
1
|
+
export enum BridgeCmds {
|
|
2
|
+
NONE = 1,
|
|
3
|
+
CONNECT = 2,
|
|
4
|
+
DISCONNECT = 3
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface BridgeData {
|
|
8
|
+
connectedClients: number[];
|
|
9
9
|
}
|
package/src/custom-types/Com.ts
CHANGED
|
@@ -1,19 +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
|
-
}
|
|
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
|
+
}
|