This example showcases a solution built with the MCP for Designer, with a focus on the visual layer. Solution for download: BytePizzaSBaT.dbsln |
BytePizzaSBaT is a simulating a fast-food pizza restaurant operation. It demonstrates real-time order processing, inventory management, machine state simulation, alarm monitoring, trend visualization, and revenue tracking — all built with FrameworX and AI-assisted engineering via MCP.
The solution showcases how FrameworX can model a complete operational workflow: a customer places an order, production machines process each item through realistic state sequences, inventory is consumed, revenue is accumulated, and operators can monitor all KPIs through a polished multi-page HMI.
Module | Objects | Description |
|---|---|---|
UNS (Tags) | 26 tags, 1 UserType | Full restaurant data model: Inventory, Machines, Orders, Revenue |
Alarms | 6 items, 3 groups | Low inventory warnings (threshold: 5 units) |
Historian | 7 tags logged | All inventory levels + revenue |
Scripts | 5 tasks, 2 classes | Machine state cycler + built-in startup/shutdown |
Datasets | 4 DBs, 1 query | AlarmHistorian, Retentive, RuntimeUsers, TagHistorian |
Displays | 10 pages, 1 layout | Full HMI with order interface, inventory, trends, alarms |
Security | 5 users | admin, Operator, User, Customer, Guest |
All tags are organized under the Restaurant/ root hierarchy with clear separation between server-side shared data and client-side UI state.
Inventory (Integer)
Tag Path | Description |
|---|---|
| Restaurant/Inventory/Pizza/DoughInventory | Pizza dough inventory count |
Restaurant/Inventory/Pizza/SauceInventory | Pizza sauce inventory count |
Restaurant/Inventory/Pizza/BoxInventory | Pizza box inventory count |
Restaurant/Inventory/Breadsticks/DoughSticksInventory | Breadsticks dough sticks inventory count |
Restaurant/Inventory/Soda/CupInventory | Soda cup inventory count |
Restaurant/Inventory/Soda/LidInventory | Soda lid inventory count |
Machines
Tag Path | Type | Description |
|---|---|---|
Restaurant/Machines/Pizza/Active | Digital | Pizza machine active state |
Restaurant/Machines/Pizza/State | Text | Current production step (e.g., "Stretching Dough", "Pizza Ready") |
Restaurant/Machines/Pizza/TickCounter | Integer | Internal tick counter for state timing |
Restaurant/Machines/Breadsticks/Active | Digital | Breadsticks machine active state |
Restaurant/Machines/Breadsticks/State | Text | Current production step |
Restaurant/Machines/Breadsticks/TickCounter | Integer | Internal tick counter |
Restaurant/Machines/Soda/Active | Digital | Soda machine active state |
Restaurant/Machines/Soda/State | Text | Current production step |
Restaurant/Machines/Soda/TickCounter | Integer | Internal tick counter |
Revenue
Tag Path | Type | Description |
|---|---|---|
Restaurant/Revenue/TotalRevenue | Double | Accumulated revenue from all completed orders |
Client Tags (Per-Session UI State)
Tag Path | Type | Description |
|---|---|---|
Restaurant/Order/QtyPizza | Integer | Pizza quantity for current order |
Restaurant/Order/QtyBreadsticks | Integer | Breadsticks quantity for current order |
Restaurant/Order/QtySoda | Integer | Soda quantity for current order |
Restaurant/Order/OrderTotal | Double | Computed order total ($7 pizza, $4 breadsticks, $3 soda) |
Restaurant/Order/OrderStarted | Digital | Flag: order is being processed |
Restaurant/Order/AllReady | Digital | Flag: all ordered items are ready |
Restaurant/Order/PizzaReady | Digital | Flag: pizza machine reached "Pizza Ready" |
Restaurant/Order/BreadsticksReady | Digital | Flag: breadsticks machine reached "Breadsticks Ready" |
Restaurant/Order/SodaReady | Digital | Flag: soda machine reached "Soda Ready" |
MachineStateCycler (Server Task): The core simulation engine. Runs cyclically on the server and advances each machine through its preparation states every 3 ticks when the machine's Active flag is set to 1.
Pizza Machine States: Stretching Dough → Spreading Sauce → Mozzarella → Pepperoni → Oven → Baking → Slicing → Boxing → Pizza Ready
Breadsticks Machine States: Preparing Dough Sticks → Oven → Baking → Garlic Butter → Breadsticks Ready
Soda Machine States: Placing Cup → Adding Ice → Dispensing Soda → Placing Lid → Soda Ready
CodeBehind — OrderInterface Display
Client-side logic embedded in the OrderInterface display handles the full order lifecycle:
DisplayOpening(): Resets all order quantities, totals, and flags to zero
DisplayIsOpen(): Cyclically recalculates order total and checks machine readiness
BtnStartOrder_Click(): Activates machines for ordered items
BtnLetsEat_Click(): Finalizes order — adds to revenue, subtracts inventory, resets machines
CodeBehind — InventoryManagement Display
ResetAll_Click(): Resets all 6 inventory items to 50 units
ResetRevenue_Click(): Resets total revenue to $0
All alarm items are configured as Low (Lo) condition alarms in the Warning group with a threshold of 5 units.
Monitored Tag | Condition | Limit | Message |
|---|---|---|---|
Pizza/DoughInventory | Lo | 5 | Pizza Dough Inventory Low — Below 5 units |
Pizza/SauceInventory | Lo | 5 | Pizza Sauce Inventory Low — Below 5 units |
Pizza/BoxInventory | Lo | 5 | Pizza Box Inventory Low — Below 5 units |
Breadsticks/DoughSticksInventory | Lo | 5 | Breadsticks Dough Sticks Inventory Low — Below 5 units |
Soda/CupInventory | Lo | 5 | Soda Cup Inventory Low — Below 5 units |
Soda/LidInventory | Lo | 5 | Soda Lid Inventory Low — Below 5 units |
Alarm Groups: AuditTrail, Critical (requires acknowledgment), Warning (no ack required).
7 tags are logged to Table1 for historical trending:
All 6 inventory tags (DoughInventory, SauceInventory, BoxInventory, DoughSticksInventory, CupInventory, LidInventory)
TotalRevenue
All content pages follow a unified light theme design language:
Light gray background (#FFF0F2F5)
Dark header bar (#FF1A1A2E) with red accent line (#FFE63946) and "BYTEPIZZA" branding
White content cards (#FFFFFFFF) with light borders and colored accent strips per category
Color coding: Gold for Pizza, Brown for Breadsticks, Blue for Soda, Red for critical actions, Green for success/trends
Page List
Display | Type | Description |
|---|---|---|
MainPage | Canvas | Project home page / landing |
OrderInterface | Canvas | Full order workflow: menu cards (Pizza $7, Breadsticks $4, Soda $3), order summary, production line status with real-time machine states, and "Let's Eat" completion button |
InventoryManagement | Canvas | 6 inventory cards (3×2 grid) with live values, editable TextBoxes, color-coded status bars, total revenue display, and reset actions |
TrendPage | Canvas | Full-screen TrendChart with 6 pens tracking all inventory levels (5-minute duration, auto-scale, legend panel) |
AlarmPage | Canvas | Full-screen AlarmViewer with comprehensive column set (Ack, ActiveTime, TagName, Group, Value, Priority, State, Message, etc.) |
Header | Canvas | Persistent navigation header with page buttons |
HeaderMobile | Canvas | Mobile-optimized header |
HeaderPad | Canvas | Tablet-optimized header |
LogOn | Canvas | Security login/logout interface |
SelectPage | Canvas | Page navigation selector |
FillColorDynamic: Inventory status bars change color based on stock level (red/yellow/green thresholds at 0/5/10)
VisibilityDynamic: Production progress bars visible only when machine is active
ActionDynamic: Add-to-order buttons use RunExpressions to increment quantities; Start Order and Let's Eat buttons use RunScript to trigger CodeBehind methods
SecurityDynamic: "Let's Eat" button disabled until all ordered items reach Ready state
User | Role |
|---|---|
admin | Administrator |
Operator | Operator |
User | Standard User |
Customer | Customer |
Guest | Guest |
Open the solution in FrameworX Designer
Start Runtime
Navigate to OrderInterface to place an order
Add items (Pizza, Breadsticks, Soda) using the + buttons
Click START ORDER to activate production machines
Watch machines cycle through states in the Production Line panel
When all machines show "Ready", click LET'S EAT! to complete the order
Check InventoryManagement to see updated stock levels
Monitor TrendPage for inventory consumption over time
View AlarmPage when inventory drops below 5 units