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
- Navigate to Data Management
- Click Add → Tag Archiving
- Enter a table name (e.g.,
Production_Data,Equipment_Status) - Click Confirm
📷 [Screenshot: Create Tag Archiving Table dialog]
Step 2: Configure Fields
Fields define what data is recorded in each row.
Add a Field:
- In the Configuration Panel, click Add Field
- Enter a field name (e.g.,
Temperature,Cycle_Time,Operator_ID) - 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)
- Configure the field source:
- Link to Tag: Select a tag to record its current value
- Calculation Formula: Enter a formula to process data
- 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 Name | Type | Source | Description |
|---|---|---|---|
Oven_Temperature | Numeric | Link to Tag: Oven_Temp | Current oven temperature |
Product_Code | Text | Link to Tag: Product_ID | Current product being manufactured |
Cycle_Time | Numeric | Formula: [End_Time] - [Start_Time] | Calculated cycle duration |
Shift | Text | Link to Tag: System_Shift | Current shift name |
Step 3: Configure Storage Settings
- Click Storage Settings
- Enable Auto Cleanup
- Set the Retention Period (e.g., 6 months, 1 year)
- (Optional) Enable Auto Backup Before Cleanup
- Set the Backup Path (local or network share)
- Click Confirm
📷 [Screenshot: Storage Settings dialog]
Retention Guidelines:
| Archiving Frequency | Recommended Retention |
|---|---|
| Every second | 3-6 months |
| Every minute | 1-2 years |
| Hourly | 3-5 years |
| Daily | 5-10 years |
Step 4: Enable the Data Service
- Click Run Settings in the toolbar
- Click Start Data Service
- 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
- Navigate to Data Management
- Click Add → Data Aggregation
- Enter a table name (e.g.,
Hourly_Production,Daily_Energy) - Select the Source Table (must be an existing table)
- 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:
- Click Add Field
- Enter a field name
- Select a field type (Numeric, Text, or Date)
- Configure the field source:
- Link to Field: Select a field from the source table
- Calculation Formula: Enter a formula to process data
- If linking to a field, set the Processing Rule:
- Grouping: Group records by this field
- Aggregation: Summarize records using this field
- 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 Name | Source Field | Processing Rule |
|---|---|---|
Hour | Record Time | Group by Hour |
Product_Code | Product_Code | Group by Same Value |
Total_Parts | Part_Count | Sum |
Avg_Cycle_Time | Cycle_Time | Average |
Result: One record per hour per product showing total parts and average cycle time.
Step 3: Configure Aggregation Trigger
- Click Trigger Configuration
- Choose a trigger type:
- Real-time Update: Aggregate whenever the source table updates
- Scheduled Trigger: Aggregate at specific times (e.g., daily at midnight)
- 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
- Navigate to Data Management
- Click Add → Base Data
- Enter a table name (e.g.,
Work_Orders,Personnel_Skills) - Click Confirm
Step 2: Configure Fields
- Click Add Field
- Enter a field name
- Select a field type (Numeric, Text, or Date)
- 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
- Click Confirm
Example: Work Order Table
| Field Name | Type | Unique | Not Null | Default Value |
|---|---|---|---|---|
Order_ID | Text | ✓ | ✓ | - |
Product_Code | Text | - | ✓ | - |
Quantity | Numeric | - | ✓ | 0 |
Start_Date | Date | - | ✓ | TODAY() |
Status | Text | - | ✓ | "Pending" |
Step 3: Manage Data
Add a Record:
- Select the table
- Click Add Record in the Data Preview area
- Enter field values
- Click Save
Import Data:
- Click Import in the toolbar
- Select an Excel file
- Map columns to fields
- Click Import
Export Data:
- Click Export in the toolbar
- 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
- Open a view in the View Editor
- Drag a Table component to the canvas
- Configure data source:
- Data Source: Data Management
- Data Table: Select your data table
- Configure columns to display
- Add filters and export buttons
📷 [Screenshot: Table component showing archived data]
Create a Chart Component
- Drag a Chart component (Bar, Line, Pie) to the canvas
- Configure data source:
- Data Source: Data Management
- Data Table: Select your data table
- Configure:
- Dimension: Field to group by (e.g., Hour, Product_Code)
- Metric: Field to aggregate (e.g., Total_Parts - Sum)
- Style the chart
📷 [Screenshot: Bar chart showing hourly production]
Best Practices
Table Design
- Use descriptive names:
Production_HourlynotTable1 - Include time dimension:
Energy_Daily,Alarms_By_Shift - Keep tables focused on a single purpose
- Avoid overly wide tables (> 50 fields)
Archiving Frequency
| Frequency | Use Case | Storage Impact |
|---|---|---|
| Every second | Critical parameters | High |
| Every 5-10 seconds | Standard monitoring | Medium |
| Every minute | Slow processes | Low |
| On event | Part completion | Very 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
- Configuring Triggers and Formulas - Set up data collection rules
- Data Management Reference - Field types, functions, troubleshooting
- Data Management Examples - Real-world scenarios