--- pdfexport: true module: Electronics timetoread: True tutorial: deepdive alias: tutorials-scan-create-attach glightbox: True --- # Tutorial: Scan, Create and Attach Raw Material ## Objective Learn how to scan, create, and attach raw materials using barcode labels, both at: - Resource level (flexible mode) - Step level (BOM-driven production mode) --- ## Step 0: Validate Preconditions Before starting, ensure the following configurations are in place: - `/SMT/ManageRawMaterials/IsEnabled = True` - `/SMT/ManageRawMaterials/BarcodeRegExp` is defined - Example: - `^(?[^\/]+)\/(?[^\/]+)\/(?[^\/]+)$` - This configuration ensures the system can extract: - Product Name - Quantity - Material Name --- ## Scenario A: Resource-Based Mode (Resource Details) ### When to use - Preparing materials before production - Loading feeders manually - No BOM validation required --- ### Step 1: Open Resource - Select and open a **Resource** - Click **Create & Attach** --- ### Step 2: Scan Material Labels and Finish - Scan the barcode of each material - Confirm that the system extracts: - Material Name - Product Name - Quantity - Repeat for all required materials - Click **Finish** --- ## Scenario B: Production-Based Mode (Step View) ### When to use - During production - When materials must match the BOM - For controlled assembly execution --- ## Step 1: Prepare Production Context and Open Create & Attach - Select and open a **Step** and navigate to **Step View** ![Open Step View](images/pthinputstepview01.png) - Select a Material in the following conditions: - System State must be **In Process** - A **Current BOM Instance** is available - Click **Create & Attach** ![Create & Attach](images/pthinputstepview02.png) --- ## Step 2: Select BOM Product - The wizard displays required **BOM materials** - Select one product - Scan the label - Verify extracted data: - Material Scanned - Description - Quantity ![Scan Materials](images/pthinputstepview-scan.png) --- ## Step 3: Repeat for All Materials - Repeat scanning for all required BOM products - Click **Finish** --- ## Expected Result - Materials are created from scanned labels - Materials are validated against the BOM - Materials are attached to the production step - Assemble is now ready to be performed --- ## Frequent Configuration Questions ### Why is the barcode not being recognized? Validate that the `/SMT/ManageRawMaterials/BarcodeRegExp` configuration is correctly defined and matches the structure of the scanned barcode. ### Why can't I proceed with the assembly process? Ensure that all materials required by the Bill of Materials (BOM) have been provided and successfully identified. ### Why are materials not being created? Confirm that the feature is enabled by verifying the `IsEnabled` setting. ### Why are the extracted values (such as name or quantity) incorrect? Review the barcode structure and verify that the RegExp mapping is correctly configured to extract the expected information.