UNPKG

@kuriousdesign/machine-sdk

Version:

Shared data types and helpers for machine-related repositories

78 lines (77 loc) 2.51 kB
import { PartStateDeprecated as PartStateDeprecated } from "../enums"; export declare enum PartLocationIds { None = 0, LeftFixture_P1 = 1, RightFixture_P9, RobotGripper, Lost } export declare function partLocationIdToString(locationId: PartLocationIds): string; export declare enum PartStates { Empty = 0,//no part present UnvalidatedRaw = 10,//used if registered by sensor, but not approved by operator Raw = 20, StartedPreWeighing = 29, PreWeighed = 30, StartedApplying = 31, Applied = 40, StartedPhotographing = 61, Photographed = 70, StartedPostWeighing = 71, PostWeighed = 80, Failed = 911, Passed = 1000 } export declare function partStateToString(state: PartStates): string; export interface PartData { processSts: PartStates; validation: PartValidationData; loadedBadSensor: boolean; fixtureLocationWhenLoaded: number; currentLocation: number; inFixture: boolean; } export interface PartValidationData { state: number; preWeightKg: number; postWeightKg: number; linerWeightKg: number; } export declare const initialPartValidationData: PartValidationData; export declare const initialPartData: PartData; export interface PartDataStatus { parts: PartData[]; allStationsAreEmpty: boolean; rawShelfIsEmpty: boolean; doneShelfIsEmpty: boolean; doneShelfIsFull: boolean; doneShelfSpacesLeftCnt: number; rawShelfPartsLeftCnt: number; allFixturesAreEmpty: boolean; leftFixtureIsEmpty: boolean; rightFixtureIsEmpty: boolean; robotIsEmpty: boolean; robotHasNoPostOpParts: boolean; robotHasMachinedParts: boolean; robotHasOnePreTopDeburring: boolean; robotHasOnePreMachining: boolean; robotHasTwoPreMachining: boolean; robotHasOneRaw: boolean; oneOrMoreRejectPartsInCell: boolean; oneOrMoreRejectPartsInRobot: boolean; robotHasOneFinishedPart: boolean; finishedCnt: number; activeCnt: number; batchCntFlag: boolean; } export declare const initialPartDataStatus: PartDataStatus; export interface PartDataDeprecated { cncPreOp: [PartStateDeprecated, PartStateDeprecated]; cnc: [PartStateDeprecated, PartStateDeprecated]; cncPostOp: [PartStateDeprecated, PartStateDeprecated]; doneShelf: PartStateDeprecated[]; rawShelf: PartStateDeprecated[]; robot: [PartStateDeprecated, PartStateDeprecated]; washer: [PartStateDeprecated, PartStateDeprecated]; hmiEditingAllowed: boolean; }