@kuriousdesign/machine-sdk 1.0.30 → 1.0.31
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/GlobalConstants.d.ts +30 -0
- package/dist/custom-types/GlobalConstants.js +81 -0
- package/dist/custom-types/Machine.d.ts +2 -1
- package/dist/custom-types/Machine.js +7 -6
- package/package.json +1 -1
- package/src/custom-types/GlobalConstants.ts +92 -1
- package/src/custom-types/Machine.ts +20 -16
|
@@ -2,3 +2,33 @@ export interface GlobalConstants {
|
|
|
2
2
|
HIDE_LEFT_TWO_COLUMNS: boolean;
|
|
3
3
|
HIDE_RIGHT_COLUMN: boolean;
|
|
4
4
|
}
|
|
5
|
+
export declare const GCs: {
|
|
6
|
+
NUM_AXES: number;
|
|
7
|
+
MAX_NUM_NAUTILUS_AXES: number;
|
|
8
|
+
NUM_DEVICES: number;
|
|
9
|
+
MOMENTARY_PB: number;
|
|
10
|
+
ROBOT_PART_COUNT: number;
|
|
11
|
+
RECIPE_COUNT_MAX: number;
|
|
12
|
+
HIDE_LEFT_TWO_COLUMNS: boolean;
|
|
13
|
+
HIDE_RIGHT_COLUMN: boolean;
|
|
14
|
+
HIDE_LEFT_ONE_COLUMN: boolean;
|
|
15
|
+
SHELF_PART_COUNT: number;
|
|
16
|
+
NUM_OF_COLS: number;
|
|
17
|
+
PARTS_IN_COL: number;
|
|
18
|
+
MACHINE_FAULTCODEARRAY_LEN: number;
|
|
19
|
+
MAX_NUM_INPUTS: number;
|
|
20
|
+
NUM_PARTS_XFER: number;
|
|
21
|
+
NUM_PARTS_IB: number;
|
|
22
|
+
NUM_LOG_ENTRIES: number;
|
|
23
|
+
TASK_LIST_LEN: number;
|
|
24
|
+
TASK_STORE_LEN: number;
|
|
25
|
+
TASK_LOG_LEN: number;
|
|
26
|
+
STATION_COUNT: number;
|
|
27
|
+
TOP_PRIORITY_COUNT: number;
|
|
28
|
+
DEFAULT_TASK_DURATION_SEC: number;
|
|
29
|
+
PARTDATA_COUNT: number;
|
|
30
|
+
USERFRAME_COUNT: number;
|
|
31
|
+
SYSTIME_TO_UTC_SCALAR: number;
|
|
32
|
+
NUM_PARTS_PER_FIXTURE: number;
|
|
33
|
+
MAX_NUM_HW_CARDS: number;
|
|
34
|
+
};
|
|
@@ -1,2 +1,83 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GCs = void 0;
|
|
4
|
+
// {attribute 'qualified_only'}
|
|
5
|
+
// VAR_GLOBAL CONSTANT
|
|
6
|
+
// NUM_AXES:INT:=20;
|
|
7
|
+
// MAX_NUM_NAUTILUS_AXES:INT:=20;
|
|
8
|
+
// NUM_DEVICES:INT:=50; //get this from DeviceIds
|
|
9
|
+
// //STEP_TIMEOUT: TIME := T#5000MS;
|
|
10
|
+
// //TIMEOUT_ERROR_CODE_SHIFT: INT:= 10000;
|
|
11
|
+
// //DEVICE_FAULTCODEARRAY_LEN:INT:=3;
|
|
12
|
+
// MOMENTARY_PB: TIME:= T#250MS;
|
|
13
|
+
// ROBOT_PART_COUNT: INT:=2;
|
|
14
|
+
// //CNC_PART_COUNT: INT:=2;
|
|
15
|
+
// RECIPE_COUNT_MAX:INT :=20;
|
|
16
|
+
// HIDE_LEFT_TWO_COLUMNS:BOOL:=TRUE;//if true, the robot will pick/load the last two columns of the raw/done shelves
|
|
17
|
+
// HIDE_RIGHT_COLUMN:BOOL:=TRUE;
|
|
18
|
+
// HIDE_LEFT_ONE_COLUMN:BOOL:=FALSE;//this must be false if hide left two is true
|
|
19
|
+
// SHELF_PART_COUNT: INT:=100;
|
|
20
|
+
// NUM_OF_COLS:INT:=20; //total columns on shelf
|
|
21
|
+
// PARTS_IN_COL:INT:=5; //total parts in a column
|
|
22
|
+
// //DIAGONAL_PATTERN: BOOL:=TRUE;//is shelf picking/loading is diagonal pattern, otherwise its column picking/loading
|
|
23
|
+
// //WASHER_PART_COUNT: INT:=2;
|
|
24
|
+
// MACHINE_FAULTCODEARRAY_LEN: INT:=50;
|
|
25
|
+
// MAX_NUM_INPUTS: INT :=50;
|
|
26
|
+
// NUM_PARTS_XFER:INT:=10;
|
|
27
|
+
// NUM_PARTS_IB:INT:=51;
|
|
28
|
+
// NUM_LOG_ENTRIES:INT:=25;
|
|
29
|
+
// TASK_LIST_LEN:INT:=25;
|
|
30
|
+
// TASK_STORE_LEN:INT:=100 + TASK_LIST_LEN; //length of the array of stored (configured) tasks, the range of index 100 and greater are reserved for waypoints
|
|
31
|
+
// TASK_LOG_LEN:INT:=25;
|
|
32
|
+
// STATION_COUNT:INT:=6; //total number of designated areas that can hold parts: robot, raw shelf, preop, cnc, postop and done shelf
|
|
33
|
+
// TOP_PRIORITY_COUNT:INT:=7; //total number of top priorities in the Priorities ENUM
|
|
34
|
+
// //DEBUG_LOG_LEN:INT:=10;
|
|
35
|
+
// DEFAULT_TASK_DURATION_SEC:INT:=5;
|
|
36
|
+
// PARTDATA_COUNT:INT:= 25;//total count of parts contained in PartData struct
|
|
37
|
+
// USERFRAME_COUNT:INT:=10;
|
|
38
|
+
// //DEVICE_CHILDREN_ARRAY_LEN:INT:=10;
|
|
39
|
+
// SYSTIME_TO_UTC_SCALAR:ULINT := LREAL_TO_ULINT(10E6);
|
|
40
|
+
// NUM_PARTS_PER_FIXTURE:INT:=8;
|
|
41
|
+
// //TASKQUEUE_LEN:INT:=100;
|
|
42
|
+
// // HW SIDE
|
|
43
|
+
// MAX_NUM_HW_CARDS:INT:=16;
|
|
44
|
+
// END_VAR
|
|
45
|
+
exports.GCs = {
|
|
46
|
+
NUM_AXES: 20,
|
|
47
|
+
MAX_NUM_NAUTILUS_AXES: 20,
|
|
48
|
+
NUM_DEVICES: 50, //get this from DeviceIds
|
|
49
|
+
//STEP_TIMEOUT: TIME := T#5000MS;
|
|
50
|
+
//TIMEOUT_ERROR_CODE_SHIFT: INT:= 10000;
|
|
51
|
+
MOMENTARY_PB: 250, // TIME:= T#250MS;
|
|
52
|
+
ROBOT_PART_COUNT: 2,
|
|
53
|
+
//CNC_PART_COUNT: INT:=2;
|
|
54
|
+
RECIPE_COUNT_MAX: 20,
|
|
55
|
+
HIDE_LEFT_TWO_COLUMNS: true, //if true, the robot will pick/load the last two columns of the raw/done shelves
|
|
56
|
+
HIDE_RIGHT_COLUMN: true,
|
|
57
|
+
HIDE_LEFT_ONE_COLUMN: false, //this must be false if hide left two is true
|
|
58
|
+
SHELF_PART_COUNT: 100,
|
|
59
|
+
NUM_OF_COLS: 20, //total columns on shelf
|
|
60
|
+
PARTS_IN_COL: 5, //total parts in a column
|
|
61
|
+
//DIAGONAL_PATTERN: BOOL:=TRUE;//is shelf picking/loading is diagonal pattern, otherwise its column picking/loading
|
|
62
|
+
//WASHER_PART_COUNT: INT:=2;
|
|
63
|
+
MACHINE_FAULTCODEARRAY_LEN: 50,
|
|
64
|
+
MAX_NUM_INPUTS: 50,
|
|
65
|
+
NUM_PARTS_XFER: 10,
|
|
66
|
+
NUM_PARTS_IB: 51,
|
|
67
|
+
NUM_LOG_ENTRIES: 25,
|
|
68
|
+
TASK_LIST_LEN: 25,
|
|
69
|
+
TASK_STORE_LEN: 125, //length of the array of stored (configured) tasks, the range of index 100 and greater are reserved for waypoints
|
|
70
|
+
TASK_LOG_LEN: 25,
|
|
71
|
+
STATION_COUNT: 6, //total number of designated areas that can hold parts: robot, raw shelf, preop, cnc, postop and done shelf
|
|
72
|
+
TOP_PRIORITY_COUNT: 7, //total number of top priorities in the Priorities ENUM
|
|
73
|
+
//DEBUG_LOG_LEN:INT:=10;
|
|
74
|
+
DEFAULT_TASK_DURATION_SEC: 5,
|
|
75
|
+
PARTDATA_COUNT: 25, //total count of parts contained in PartData struct
|
|
76
|
+
USERFRAME_COUNT: 10,
|
|
77
|
+
//DEVICE_CHILDREN_ARRAY_LEN:INT:=10;
|
|
78
|
+
SYSTIME_TO_UTC_SCALAR: 10E6, //ULINT := LREAL_TO_ULINT(10E6);
|
|
79
|
+
NUM_PARTS_PER_FIXTURE: 8,
|
|
80
|
+
//TASKQUEUE_LEN:INT:=100;
|
|
81
|
+
// HW SIDE
|
|
82
|
+
MAX_NUM_HW_CARDS: 16,
|
|
83
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentAnimation, TaskQueue } from ".";
|
|
1
|
+
import { ComponentAnimation, DeviceRegistration, TaskQueue } from ".";
|
|
2
2
|
import { PartData } from "./Part";
|
|
3
3
|
export interface UserData {
|
|
4
4
|
activeUser: number;
|
|
@@ -39,5 +39,6 @@ export interface Machine {
|
|
|
39
39
|
errors: SystemFaultData;
|
|
40
40
|
warnings: SystemFaultData;
|
|
41
41
|
taskQueue: TaskQueue;
|
|
42
|
+
registeredDevices: DeviceRegistration[];
|
|
42
43
|
}
|
|
43
44
|
export declare const initialMachine: Machine;
|
|
@@ -19,7 +19,7 @@ exports.initialMachineCfg = {
|
|
|
19
19
|
apiOpcuaDeviceId: -1,
|
|
20
20
|
ethernetAdapterList: [],
|
|
21
21
|
};
|
|
22
|
-
exports.initialMachine = {
|
|
22
|
+
exports.initialMachine = ({
|
|
23
23
|
estopCircuit_OK: false,
|
|
24
24
|
estopCircuitDelayed_OK: false,
|
|
25
25
|
fenceCircuit_OK: false,
|
|
@@ -28,9 +28,10 @@ exports.initialMachine = {
|
|
|
28
28
|
ethercatMaster_OK: false,
|
|
29
29
|
ethercatSlaves_OK: false,
|
|
30
30
|
supplyAir_OK: false,
|
|
31
|
-
cfg: exports.initialMachineCfg,
|
|
31
|
+
cfg: { ...exports.initialMachineCfg },
|
|
32
32
|
parts: [],
|
|
33
|
-
errors: exports.initialSystemFaultData,
|
|
34
|
-
warnings: exports.initialSystemFaultData,
|
|
35
|
-
taskQueue: _1.initialTaskQueue,
|
|
36
|
-
}
|
|
33
|
+
errors: { ...exports.initialSystemFaultData },
|
|
34
|
+
warnings: { ...exports.initialSystemFaultData },
|
|
35
|
+
taskQueue: { ..._1.initialTaskQueue },
|
|
36
|
+
registeredDevices: Array(_1.GCs.NUM_DEVICES).fill(null).map(() => ({ ..._1.initialDeviceRegistration }))
|
|
37
|
+
});
|
package/package.json
CHANGED
|
@@ -1,4 +1,95 @@
|
|
|
1
1
|
export interface GlobalConstants {
|
|
2
2
|
HIDE_LEFT_TWO_COLUMNS: boolean;
|
|
3
3
|
HIDE_RIGHT_COLUMN: boolean;
|
|
4
|
-
}
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
// {attribute 'qualified_only'}
|
|
7
|
+
// VAR_GLOBAL CONSTANT
|
|
8
|
+
// NUM_AXES:INT:=20;
|
|
9
|
+
// MAX_NUM_NAUTILUS_AXES:INT:=20;
|
|
10
|
+
// NUM_DEVICES:INT:=50; //get this from DeviceIds
|
|
11
|
+
// //STEP_TIMEOUT: TIME := T#5000MS;
|
|
12
|
+
// //TIMEOUT_ERROR_CODE_SHIFT: INT:= 10000;
|
|
13
|
+
// //DEVICE_FAULTCODEARRAY_LEN:INT:=3;
|
|
14
|
+
|
|
15
|
+
// MOMENTARY_PB: TIME:= T#250MS;
|
|
16
|
+
// ROBOT_PART_COUNT: INT:=2;
|
|
17
|
+
// //CNC_PART_COUNT: INT:=2;
|
|
18
|
+
// RECIPE_COUNT_MAX:INT :=20;
|
|
19
|
+
// HIDE_LEFT_TWO_COLUMNS:BOOL:=TRUE;//if true, the robot will pick/load the last two columns of the raw/done shelves
|
|
20
|
+
// HIDE_RIGHT_COLUMN:BOOL:=TRUE;
|
|
21
|
+
// HIDE_LEFT_ONE_COLUMN:BOOL:=FALSE;//this must be false if hide left two is true
|
|
22
|
+
// SHELF_PART_COUNT: INT:=100;
|
|
23
|
+
// NUM_OF_COLS:INT:=20; //total columns on shelf
|
|
24
|
+
// PARTS_IN_COL:INT:=5; //total parts in a column
|
|
25
|
+
// //DIAGONAL_PATTERN: BOOL:=TRUE;//is shelf picking/loading is diagonal pattern, otherwise its column picking/loading
|
|
26
|
+
// //WASHER_PART_COUNT: INT:=2;
|
|
27
|
+
// MACHINE_FAULTCODEARRAY_LEN: INT:=50;
|
|
28
|
+
// MAX_NUM_INPUTS: INT :=50;
|
|
29
|
+
|
|
30
|
+
// NUM_PARTS_XFER:INT:=10;
|
|
31
|
+
// NUM_PARTS_IB:INT:=51;
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
// NUM_LOG_ENTRIES:INT:=25;
|
|
35
|
+
// TASK_LIST_LEN:INT:=25;
|
|
36
|
+
// TASK_STORE_LEN:INT:=100 + TASK_LIST_LEN; //length of the array of stored (configured) tasks, the range of index 100 and greater are reserved for waypoints
|
|
37
|
+
// TASK_LOG_LEN:INT:=25;
|
|
38
|
+
// STATION_COUNT:INT:=6; //total number of designated areas that can hold parts: robot, raw shelf, preop, cnc, postop and done shelf
|
|
39
|
+
// TOP_PRIORITY_COUNT:INT:=7; //total number of top priorities in the Priorities ENUM
|
|
40
|
+
|
|
41
|
+
// //DEBUG_LOG_LEN:INT:=10;
|
|
42
|
+
// DEFAULT_TASK_DURATION_SEC:INT:=5;
|
|
43
|
+
// PARTDATA_COUNT:INT:= 25;//total count of parts contained in PartData struct
|
|
44
|
+
|
|
45
|
+
// USERFRAME_COUNT:INT:=10;
|
|
46
|
+
// //DEVICE_CHILDREN_ARRAY_LEN:INT:=10;
|
|
47
|
+
// SYSTIME_TO_UTC_SCALAR:ULINT := LREAL_TO_ULINT(10E6);
|
|
48
|
+
// NUM_PARTS_PER_FIXTURE:INT:=8;
|
|
49
|
+
// //TASKQUEUE_LEN:INT:=100;
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
// // HW SIDE
|
|
53
|
+
// MAX_NUM_HW_CARDS:INT:=16;
|
|
54
|
+
// END_VAR
|
|
55
|
+
|
|
56
|
+
export const GCs = {
|
|
57
|
+
|
|
58
|
+
NUM_AXES: 20,
|
|
59
|
+
MAX_NUM_NAUTILUS_AXES: 20,
|
|
60
|
+
NUM_DEVICES: 50, //get this from DeviceIds
|
|
61
|
+
//STEP_TIMEOUT: TIME := T#5000MS;
|
|
62
|
+
//TIMEOUT_ERROR_CODE_SHIFT: INT:= 10000;
|
|
63
|
+
MOMENTARY_PB: 250, // TIME:= T#250MS;
|
|
64
|
+
ROBOT_PART_COUNT: 2,
|
|
65
|
+
//CNC_PART_COUNT: INT:=2;
|
|
66
|
+
RECIPE_COUNT_MAX: 20,
|
|
67
|
+
HIDE_LEFT_TWO_COLUMNS: true, //if true, the robot will pick/load the last two columns of the raw/done shelves
|
|
68
|
+
HIDE_RIGHT_COLUMN: true,
|
|
69
|
+
HIDE_LEFT_ONE_COLUMN: false, //this must be false if hide left two is true
|
|
70
|
+
SHELF_PART_COUNT: 100,
|
|
71
|
+
NUM_OF_COLS: 20, //total columns on shelf
|
|
72
|
+
PARTS_IN_COL: 5, //total parts in a column
|
|
73
|
+
//DIAGONAL_PATTERN: BOOL:=TRUE;//is shelf picking/loading is diagonal pattern, otherwise its column picking/loading
|
|
74
|
+
//WASHER_PART_COUNT: INT:=2;
|
|
75
|
+
MACHINE_FAULTCODEARRAY_LEN: 50,
|
|
76
|
+
MAX_NUM_INPUTS: 50,
|
|
77
|
+
NUM_PARTS_XFER: 10,
|
|
78
|
+
NUM_PARTS_IB: 51,
|
|
79
|
+
NUM_LOG_ENTRIES: 25,
|
|
80
|
+
TASK_LIST_LEN: 25,
|
|
81
|
+
TASK_STORE_LEN: 125, //length of the array of stored (configured) tasks, the range of index 100 and greater are reserved for waypoints
|
|
82
|
+
TASK_LOG_LEN: 25,
|
|
83
|
+
STATION_COUNT: 6, //total number of designated areas that can hold parts: robot, raw shelf, preop, cnc, postop and done shelf
|
|
84
|
+
TOP_PRIORITY_COUNT: 7, //total number of top priorities in the Priorities ENUM
|
|
85
|
+
//DEBUG_LOG_LEN:INT:=10;
|
|
86
|
+
DEFAULT_TASK_DURATION_SEC: 5,
|
|
87
|
+
PARTDATA_COUNT: 25, //total count of parts contained in PartData struct
|
|
88
|
+
USERFRAME_COUNT: 10,
|
|
89
|
+
//DEVICE_CHILDREN_ARRAY_LEN:INT:=10;
|
|
90
|
+
SYSTIME_TO_UTC_SCALAR: 10E6, //ULINT := LREAL_TO_ULINT(10E6);
|
|
91
|
+
NUM_PARTS_PER_FIXTURE: 8,
|
|
92
|
+
//TASKQUEUE_LEN:INT:=100;
|
|
93
|
+
// HW SIDE
|
|
94
|
+
MAX_NUM_HW_CARDS: 16,
|
|
95
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ComponentAnimation, DeviceConstants, initialTaskQueue, TaskQueue } from ".";
|
|
1
|
+
import { ComponentAnimation, DeviceConstants, DeviceRegistration, GCs, initialDeviceRegistration, initialTaskQueue, TaskQueue } from ".";
|
|
2
2
|
import { PartData } from "./Part";
|
|
3
3
|
|
|
4
|
+
|
|
4
5
|
export interface UserData {
|
|
5
6
|
activeUser: number;
|
|
6
7
|
hmiLoginBtn: ComponentAnimation;
|
|
@@ -80,20 +81,23 @@ export interface Machine {
|
|
|
80
81
|
errors: SystemFaultData;
|
|
81
82
|
warnings: SystemFaultData;
|
|
82
83
|
taskQueue: TaskQueue;
|
|
84
|
+
registeredDevices: DeviceRegistration[];
|
|
83
85
|
}
|
|
84
86
|
|
|
85
|
-
export const initialMachine: Machine = {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
87
|
+
export const initialMachine: Machine = ({
|
|
88
|
+
estopCircuit_OK: false,
|
|
89
|
+
estopCircuitDelayed_OK: false,
|
|
90
|
+
fenceCircuit_OK: false,
|
|
91
|
+
guardDoors_LOCKED: false,
|
|
92
|
+
networkHealth_OK: false,
|
|
93
|
+
ethercatMaster_OK: false,
|
|
94
|
+
ethercatSlaves_OK: false,
|
|
95
|
+
supplyAir_OK: false,
|
|
96
|
+
cfg: { ...initialMachineCfg },
|
|
97
|
+
parts: [],
|
|
98
|
+
errors: { ...initialSystemFaultData },
|
|
99
|
+
warnings: { ...initialSystemFaultData },
|
|
100
|
+
taskQueue: { ...initialTaskQueue },
|
|
101
|
+
registeredDevices: Array(GCs.NUM_DEVICES).fill(null).map(() => ({ ...initialDeviceRegistration }))
|
|
102
|
+
|
|
103
|
+
});
|