Validating your NC code
Final safety check before execution
Validation is the final and most important step before sending an NC program to the real machine.
In Shopfloor Assistant, validation is performed by a Virtual Controller, which simulates the machining process using real machine limits, axis constraints, and collision geometry.This ensures that the program is safe, reachable, and ready for execution — before a single chip is cut.
What does the Validate Program do?
- Collision Detection - ensures the tool doesn’t collide with the workpiece, fixtures, or machine components.
- Reachability Analysis - verifies that all points in the NC program are within the machine’s movement limits.
- Syntax & Structure Review - Detects formatting errors, missing values, or unsupported commands.
📘How to Run Validation
⚠️ Before You Begin
The NC program must be saved - validation always uses the last saved version of the program. Unsaved edits will not be included in the validation process.
- Step 1: Click “Validate Program”
Open the Validation Setup Window from the left-side panel of the Shopfloor Assistant interface.
- Step 2: Fill in the required fields
Before starting the validation, you’ll need to provide a few key details. These ensure the Virtual Controller has the right context to simulate your NC program accurately.
- Folder Location - This is the directory from where the validation engine will get the project data (the cenpkg file) – this is filled automatically, but it can be changed.
- Host Name - Hostname or IP address of the machine running the validation service. This can also be set in the Installation window or in the Launch Application window Settings
- Fixture Configuration – (Fixture area and Fixture code) - If your NC program includes fixture data, Shopfloor Assistant will automatically detect and load it.
💡 Tip: The Validate program button becomes active if all the fields are filled
- Step 3: Start the virtual controller validation by pressing the Validate program button
The system will start validation on the virtual controller of the NC program and highlight any issues.
During validation, the Shopfloor Assistant user interface becomes temporarily disabled (grayed out), preventing any interaction until the process is complete.
Once validation finishes, status notifications appear in the bottom-left corner of the validation window, clearly informing the operator whether the validation was successful or if any errors were detected.
You may see one of the following indicators:
- - Validation failed with error code - Displayed when the Virtual Controller detects errors or cannot complete the simulation.
Error exit codes:
-
0 - E2 closed normally from the X button
-
1 - E2 closed unexpectedly
-
2 – Unexpected Errors (Communication Error or Bad Request)
-
3 – Shopfloor assistant internal error
-
200 - License validation failed
-
4001 - Automatic Program Validation failed (timeout)
-
4002 - Automatic Program Validation generic error
-
- Validation completed successfully - Displayed when the validation engine returns exit code 4000.
- Validation completed successfully - Displayed when the validation engine returns exit code 4000.
🎯 Operator insights
- Always save the NC program before validation. Only saved changes are used by the Virtual Controller.
- Double-check Folder Location, Host Name, and Fixture Area / Code before starting.
- Avoid interacting with the UI during validation. Do not change selections, edit points, or switch panels.
- Run validation after major edits to ensure safety.