Skip to main content
Version: Next

Inbound Initialize

Introduction​

InboundInitializeActivity is a MES-specific inbound initialization node used to initialize various state variables and verify the validity of the product code when a product enters the station. This node is the starting point of the inbound flow, responsible for setting key information such as inbound results and work types, and initializing the recipe applied to the current process.

Configuration Items​

This node is configured and outputs via flow context variables, no direct property configuration is needed.

Input Variables​

Variable NameConstantTypeDescription
SerialNumberFlowItemCollection.SerialNumberstringProduct Serial Number/Product Code
TrayCodeAssociationDescriptionValueFlowItemCollection.TrayCodeAssociationDescriptionValuestringTray Code Association Query Description
MaterialCodeAssociationDescriptionValueFlowItemCollection.MaterialCodeAssociationDescriptionValuestringMaterial Code Association Query Description

Output Variables​

Variable NameConstantTypeDescription
Inbound_ResultVariable_ValueFlowItemCollection.InboundResultValuestringInbound Result
Inbound_Description_ValueFlowItemCollection.InboundDescriptionValuestringInbound Exception Description
Inbound_WorkType_ValueFlowItemCollection.InboundWorkTypeValueintWork Type
Inbound_Completed_SignalFlowItemCollection.InboundCompletedSignalintInbound Completed Signal
FormulaApplyModelFlowItemCollection.FormulaApplyModelFormulaApplyModelRecipe Applied to Current Process

Business Logic​

Execution Flow​

┌─────────────────────────────────────────────────────────────┐
│ InboundInitializeActivity │
├─────────────────────────────────────────────────────────────┤
│ EnterAsync - Initialization Phase │
│ ├─ Init Tray Code Association Desc = "Not Initialized" │
│ ├─ Init Material Code Association Desc = "Not Initialized" │
│ ├─ Clear Inbound Description │
│ ├─ Set Inbound Result = "Not Initialized" │
│ ├─ Set Work Type = Reset │
│ └─ Set Inbound Completed Signal = 1 │
├─────────────────────────────────────────────────────────────┤
│ ProcessAsync - Processing Phase │
│ ├─ Check if product code is empty │
│ │ ├─ Tray code association failed → Set corresponding error│
│ │ ├─ Material code association failed → Set corresponding error│
│ │ └─ No product code → Set no product entry error │
│ ├─ Set Inbound Result = OK │
│ └─ Initialize Recipe Application Info (based on config) │
└─────────────────────────────────────────────────────────────┘

Product Code Verification​

When the product code is empty, the system determines the error type based on the association description:

ConditionInbound ResultDescription
Tray code association desc initializedTrayCodeNotBoundProductCodeTray code not bound to product code
Material code association desc initializedMaterialCodeNotBoundProductCodeMaterial code not bound to product code
Other casesNoProductEntryNo product entry

Recipe Initialization​

Decides whether to initialize the recipe based on system configuration:

Configuration ConditionBehavior
FormulaDistributionMode = 2Distribute recipe when process identifies product, requires initialization
PluginState = 0Order management plugin disabled, requires initialization
Other casesDo not initialize recipe in this node

Usage Example​

Typical Inbound Flow​

┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Scan/Read Code │────▶│InboundInitialize │────▶│DuplicateCodeDetection│
│ │ │ Inbound Init │ │ Duplicate Check │
└──────────────────┘ └──────────────────┘ └──────────────────┘

Inbound Result Configuration​

Result NameConstantDescription
OKEntryResultConfig.OKInbound Success
NoProductEntryEntryResultConfig.NoProductEntryNo Product Entry
TrayCodeNotBoundProductCodeEntryResultConfig.TrayCodeNotBoundProductCodeTray Code Not Bound to Product Code
MaterialCodeNotBoundProductCodeEntryResultConfig.MaterialCodeNotBoundProductCodeMaterial Code Not Bound to Product Code
NGEntryResultConfig.NGInbound Failed (Recipe not found, etc.)

Notes​

  1. Flow Start: This node is usually the first business node in the inbound flow.
  2. Product Code Required: If product code is empty, an error result is set, subsequent nodes should check the inbound result.
  3. Recipe Initialization: Decides whether to initialize recipe here based on system configuration.
  4. State Reset: Resets relevant state variables on every inbound.