Skip to main content

Overview

The Machine Configuration module manages all industrial equipment across the production facility. Each machine represents a physical asset that can be tracked, monitored, and assigned to work orders.

Machine Data Model

The Machine interface defines the structure of machine records:
id
string
required
Unique identifier for the machine
code
string
required
Machine serial number or asset code (e.g., “IMP-01”, “TRQ-05”)
name
string
required
Display name of the machine (e.g., “SUPERPRINT 1”, “PLANA 3”)
type
string
required
Machine category. Valid values:
  • Impresión - Printing equipment
  • Troquelado - Die-cutting equipment
  • Acabado - Finishing equipment
area
string
required
Physical location/production area (e.g., “Nave A”, “Nave B”, “Nave C”, “Nave D”)
status
string
required
Current operational status:
  • Operativa - Machine is operational and available
  • Mantenimiento - Under maintenance
  • Detenida - Stopped/offline
  • Sin Operador - No operator assigned
active
boolean
required
Whether the machine is active in the system (true = active, false = retired)

Machine Types

Impresión (Printing)

Flexographic and digital printing equipment:
// Source: state.service.ts:70-78
{ id: 'p1', code: 'IMP-01', name: 'SUPERPRINT 1', 
  type: 'Impresión', area: 'Nave A', status: 'Operativa', active: true },
{ id: 'p2', code: 'IMP-02', name: 'SUPERPRINT 2', 
  type: 'Impresión', area: 'Nave A', status: 'Operativa', active: true },
{ id: 'p5', code: 'IMP-05', name: 'MARK ANDY 4120', 
  type: 'Impresión', area: 'Nave B', status: 'Operativa', active: true }

Printing Equipment

Fleet: 9 printing machines across Nave A and Nave BModels: SUPERPRINT, SUPERFLEX, MARK ANDY, EVOLUTION, REINAFLEXIcon: print (blue color scheme)

Troquelado (Die-Cutting)

Die-cutting and finishing equipment:
// Source: state.service.ts:80-92
{ id: 'd1', code: 'TRQ-01', name: 'PLANA 1', 
  type: 'Troquelado', area: 'Nave C', status: 'Operativa', active: true },
{ id: 'd7', code: 'TRQ-07', name: 'MARK ANDY 830-1', 
  type: 'Troquelado', area: 'Nave C', status: 'Operativa', active: true }

Die-Cutting Equipment

Fleet: 12 die-cutting machines in Nave CModels: PLANA (1-6), MARK ANDY 830, FOCUS, MASTER, DK-320, MAQUIFLEXIcon: content_cut (purple color scheme)

Acabado (Finishing)

Rewinding and finishing equipment:
// Source: state.service.ts:93-106
{ id: 'r1', code: 'RBB-01', name: 'REBOBINADORA 1', 
  type: 'Acabado', area: 'Nave D', status: 'Operativa', active: true },
{ id: 'r9', code: 'RBB-09', name: 'ROTOFLEX', 
  type: 'Acabado', area: 'Nave D', status: 'Operativa', active: true }

Finishing Equipment

Fleet: 13 finishing machines in Nave DModels: REBOBINADORA (1-8), ROTOFLEX, REB EVO, BGM, BLISTER (1-2)Icon: sync (orange color scheme)

Machine Operations

Adding a Machine

Create new machine records using addMachine():
// Source: admin.service.ts:61-73
addMachine(machine: Partial<Machine>) {
  const newMachine: Machine = {
    id: Math.random().toString(36).substr(2, 9),
    code: machine.code || '',
    name: machine.name || '',
    type: machine.type || 'Impresión',
    area: machine.area || '',
    status: machine.status || 'Operativa',
    active: machine.active ?? true
  };
  this.state.adminMachines.update(machines => [...machines, newMachine]);
  this.audit.log(this.state.userName(), this.state.userRole(), 'ADMIN', 
    'Crear Máquina', `Máquina registrada: ${newMachine.name}`);
}
1

Open Machine Modal

Click “Nueva Máquina” or the add placeholder card
2

Enter Machine Details

Fill in required information:
  • Name: Machine model/identifier (e.g., “SUPERPRINT 3”)
  • Serial Number: Asset code (e.g., “IMP-10”)
  • Area: Physical location (e.g., “Nave A”)
  • Type: Select from Impresión, Troquelado, or Acabado
3

Configure IoT Parameters (Optional)

Enable sensor monitoring:
  • Thermal sensors for temperature monitoring
  • Load sensors for capacity tracking
4

Save Machine

Click “Registrar Máquina” to add to the system

Updating Machine Status

Modify machine information using updateMachine():
// Source: admin.service.ts:75-78
updateMachine(updatedMachine: Machine) {
  this.state.adminMachines.update(machines => 
    machines.map(m => m.id === updatedMachine.id ? updatedMachine : m)
  );
  this.audit.log(this.state.userName(), this.state.userRole(), 'ADMIN', 
    'Actualizar Máquina', 
    `Máquina actualizada: ${updatedMachine.name} - Estado: ${updatedMachine.status}`);
}
Common updates include:
  • Changing machine status (Operativa → Mantenimiento)
  • Updating physical location
  • Modifying machine name
  • Adjusting IoT sensor configuration

Deleting a Machine

Remove machine records using deleteMachine():
// Source: admin.service.ts:80-84
deleteMachine(id: string) {
  const machine = this.state.adminMachines().find(m => m.id === id);
  this.state.adminMachines.update(machines => machines.filter(m => m.id !== id));
  this.audit.log(this.state.userName(), this.state.userRole(), 'ADMIN', 
    'Eliminar Máquina', `Máquina eliminada: ${machine?.name || id}`);
}
Deleting a machine removes it from work order assignments. Consider setting status to “Detenida” instead of deletion.

Machine Status Management

Machines can have different operational states:
Machine is fully functional and available for productionVisual: Green pulsing indicatorCode: status: 'Operativa'
Machine is undergoing scheduled or corrective maintenanceVisual: Yellow indicatorCode: status: 'Mantenimiento'
Machine is stopped due to breakdown or other issuesVisual: Red indicatorCode: status: 'Detenida'
Machine is operational but no operator is assignedVisual: Gray indicatorCode: status: 'Sin Operador'

Status Color Coding

// Source: admin-machines.component.ts:223-233
getMachineStatusColor(status: string) {
  if(status === 'Operativa') return 'bg-neon-green shadow-neon-green animate-pulse';
  if(status === 'Mantenimiento') return 'bg-neon-yellow shadow-neon-yellow';
  return 'bg-neon-red shadow-neon-red';
}

getMachineStatusTextColor(status: string) {
  if(status === 'Operativa') return 'text-neon-green';
  if(status === 'Mantenimiento') return 'text-neon-yellow';
  return 'text-neon-red';
}

Machine Icon System

Each machine type has a unique icon:
// Source: admin-machines.component.ts:205-221
getMachineIcon(type: string) {
  switch(type) {
    case 'Impresión': return 'print';
    case 'Troquelado': return 'content_cut';
    case 'Acabado': return 'sync';
    default: return 'precision_manufacturing';
  }
}

getMachineIconColor(type: string) {
  switch(type) {
    case 'Impresión': return 'text-blue-400';
    case 'Troquelado': return 'text-purple-400';
    case 'Acabado': return 'text-industrial-orange';
    default: return 'text-slate-400';
  }
}

IoT Monitoring

Machines support IoT sensor integration for real-time monitoring:

Thermal Sensors

Monitor critical temperature levelsDisplay: Real-time temperature in °CAlerts: Automatic warnings for overheating

Load Sensors

Track machine capacity utilizationDisplay: Current load percentageMetrics: Production efficiency tracking

Production Areas

Machines are organized by physical location:
AreaMachine TypesCount
Nave AImpresión4 machines
Nave BImpresión5 machines
Nave CTroquelado12 machines
Nave DAcabado13 machines

Audit Logging

All machine operations are tracked:
ActionModuleDetails
Create MachineADMINMachine name
Update MachineADMINMachine name and new status
Delete MachineADMINMachine name
Status ChangeOPERACIONESMachine name and status transition

Best Practices

Machine Management Guidelines

Asset Codes: Use consistent naming conventions (e.g., IMP-01, TRQ-01, RBB-01)Status Updates: Update machine status immediately when changes occurMaintenance Tracking: Set status to “Mantenimiento” during scheduled maintenanceArea Organization: Group machines by physical location for easy operator accessIoT Integration: Enable sensor monitoring for critical production equipmentRegular Audits: Periodically verify machine records match physical assets

Code Reference

Key source files:
  • Data Model: src/services/state.service.ts:17-25
  • Service Methods: src/features/admin/services/admin.service.ts:57-84
  • UI Component: src/features/admin/components/admin-machines.component.ts
  • Machine List: src/services/state.service.ts:68-106

Build docs developers (and LLMs) love