Skip to main content
Version: Next

Creating Data Tables

This guide covers how to create and configure all types of data tables in AI SCADA.


Create a Tag Archiving Table

Tag Archiving tables collect data from tags based on trigger conditions.

Step 1: Create the Table

  1. Navigate to Data Management
  2. Click AddTag Archiving
  3. Enter a table name (e.g., Production_Data, Equipment_Status)
  4. Click Confirm

📷 [Screenshot: Create Tag Archiving Table dialog]

Step 2: Configure Fields

Fields define what data is recorded in each row.

Add a Field:

  1. In the Configuration Panel, click Add Field
  2. Enter a field name (e.g., Temperature, Cycle_Time, Operator_ID)
  3. Select a field type:
    • Numeric: For numbers (temperature, pressure, count)
    • Text: For strings (status, operator name, product code)
    • Date: For timestamps (start time, end time)
  4. Configure the field source:
    • Link to Tag: Select a tag to record its current value
    • Calculation Formula: Enter a formula to process data
  5. Click Confirm

📷 [Screenshot: Add Field dialog showing tag selection and formula editor]

Default Fields:

  • Every table includes a Record Time field (timestamp when the record was created)
  • You cannot create another field named "Record Time"

Field Configuration Examples:

Field NameTypeSourceDescription
Oven_TemperatureNumericLink to Tag: Oven_TempCurrent oven temperature
Product_CodeTextLink to Tag: Product_IDCurrent product being manufactured
Cycle_TimeNumericFormula: [End_Time] - [Start_Time]Calculated cycle duration
ShiftTextLink to Tag: System_ShiftCurrent shift name

Step 3: Configure Storage Settings

  1. Click Storage Settings
  2. Enable Auto Cleanup
  3. Set the Retention Period (e.g., 6 months, 1 year)
  4. (Optional) Enable Auto Backup Before Cleanup
  5. Set the Backup Path (local or network share)
  6. Click Confirm

📷 [Screenshot: Storage Settings dialog]

Retention Guidelines:

Archiving FrequencyRecommended Retention
Every second3-6 months
Every minute1-2 years
Hourly3-5 years
Daily5-10 years

Step 4: Enable the Data Service

  1. Click Run Settings in the toolbar
  2. Click Start Data Service
  3. The table begins archiving data based on trigger conditions

⚠️ Caution: The Data Service is disabled by default during configuration. Remember to enable it before deployment.


Create a Data Aggregation Table

Data Aggregation tables summarize data from another table (the "source table").

Step 1: Create the Table

  1. Navigate to Data Management
  2. Click AddData Aggregation
  3. Enter a table name (e.g., Hourly_Production, Daily_Energy)
  4. Select the Source Table (must be an existing table)
  5. Click Confirm

📷 [Screenshot: Create Data Aggregation Table dialog with source table selection]

⚠️ Caution: The source table cannot be changed after creation. Plan your aggregation structure carefully.

Step 2: Configure Fields

Aggregation fields define how data is grouped and summarized.

Add a Field:

  1. Click Add Field
  2. Enter a field name
  3. Select a field type (Numeric, Text, or Date)
  4. Configure the field source:
    • Link to Field: Select a field from the source table
    • Calculation Formula: Enter a formula to process data
  5. If linking to a field, set the Processing Rule:
    • Grouping: Group records by this field
    • Aggregation: Summarize records using this field
  6. Click Confirm

📷 [Screenshot: Add Aggregation Field dialog]

Grouping Rules

Numeric/Text Fields:

  • Same Value: Group records with identical values

Date Fields:

  • By Year/Quarter/Month/Week/Day/Hour/Minute: Group by time dimension
  • Same Value: Group by exact timestamp

Aggregation Rules

Numeric Fields:

  • Sum: Total of all values
  • Average: Mean of all values
  • Maximum: Highest value
  • Minimum: Lowest value
  • Distinct Count: Number of unique values
  • Count: Number of records

Text Fields:

  • Distinct Count: Number of unique values
  • Count: Number of records

Date Fields:

  • Earliest: First timestamp
  • Latest: Last timestamp

💡 Tip: Every aggregation table must have at least one grouping field and one aggregation field.

Example Configuration

Scenario: Calculate hourly production by product code.

Field NameSource FieldProcessing Rule
HourRecord TimeGroup by Hour
Product_CodeProduct_CodeGroup by Same Value
Total_PartsPart_CountSum
Avg_Cycle_TimeCycle_TimeAverage

Result: One record per hour per product showing total parts and average cycle time.

Step 3: Configure Aggregation Trigger

  1. Click Trigger Configuration
  2. Choose a trigger type:
    • Real-time Update: Aggregate whenever the source table updates
    • Scheduled Trigger: Aggregate at specific times (e.g., daily at midnight)
  3. Click Confirm

⚠️ Caution: Real-time updates consume more system resources. Use scheduled triggers for large tables.


Create a Base Data Table

Base Data tables store custom business data not directly linked to tags.

Step 1: Create the Table

  1. Navigate to Data Management
  2. Click AddBase Data
  3. Enter a table name (e.g., Work_Orders, Personnel_Skills)
  4. Click Confirm

Step 2: Configure Fields

  1. Click Add Field
  2. Enter a field name
  3. Select a field type (Numeric, Text, or Date)
  4. Configure field properties:
    • Unique: Values must be unique (e.g., Employee ID)
    • Not Null: Field must have a value
    • Default Value: Value to use if not specified
  5. Click Confirm

Example: Work Order Table

Field NameTypeUniqueNot NullDefault Value
Order_IDText-
Product_CodeText--
QuantityNumeric-0
Start_DateDate-TODAY()
StatusText-"Pending"

Step 3: Manage Data

Add a Record:

  1. Select the table
  2. Click Add Record in the Data Preview area
  3. Enter field values
  4. Click Save

Import Data:

  1. Click Import in the toolbar
  2. Select an Excel file
  3. Map columns to fields
  4. Click Import

Export Data:

  1. Click Export in the toolbar
  2. Select a save location

💡 Tip: Use Scripts (Event-Action system) to automatically manage Base Data records.


Display Data on Views

Create a Data Table Component

  1. Open a view in the View Editor
  2. Drag a Table component to the canvas
  3. Configure data source:
    • Data Source: Data Management
    • Data Table: Select your data table
  4. Configure columns to display
  5. Add filters and export buttons

📷 [Screenshot: Table component showing archived data]

Create a Chart Component

  1. Drag a Chart component (Bar, Line, Pie) to the canvas
  2. Configure data source:
    • Data Source: Data Management
    • Data Table: Select your data table
  3. Configure:
    • Dimension: Field to group by (e.g., Hour, Product_Code)
    • Metric: Field to aggregate (e.g., Total_Parts - Sum)
  4. Style the chart

📷 [Screenshot: Bar chart showing hourly production]


Best Practices

Table Design

  • Use descriptive names: Production_Hourly not Table1
  • Include time dimension: Energy_Daily, Alarms_By_Shift
  • Keep tables focused on a single purpose
  • Avoid overly wide tables (> 50 fields)

Archiving Frequency

FrequencyUse CaseStorage Impact
Every secondCritical parametersHigh
Every 5-10 secondsStandard monitoringMedium
Every minuteSlow processesLow
On eventPart completionVery Low

Aggregation Strategy

  • Use Real-time Update for critical dashboards (< 1000 records/hour)
  • Use Scheduled Trigger for large tables
  • Schedule aggregations during low system activity

Next Steps