Tags

Definitions for reading Siemens, Modbus and OPC TAG values. Advanced control with SaveToDatabase and Writable features.

What is a TAG?

TAG is the name of a data point in industrial automation systems. For example, a compressor's pressure value, a motor's operating status, or an energy meter's instantaneous power value are all TAGs.

TAG Types

TypeDescriptionExample
Standard TAGReal data read from PLC/DeviceSiemens DB100.DBD0, Modbus 40001
Static TAGFixed value, used in formulasPi number, conversion coefficients
Calculated TAGCalculated from other TAGsCreated with Advanced TAG

TAG Fields

Field NameDescriptionStatus
Friendly Name/Global Tag NameUser-friendly name and unique TAG nameRequired
Tag CategoriesTAG categoriesOptional, Recommended
Select Tag SourceTAG source - type. OPC, Siemens, Modbus, StaticRequired
Station NameConnected stationRequired for Siemens - Modbus TAG
Data Block TypeData Block type (REAL, INT, DINT, BOOL, STRING)Required for Siemens - Modbus TAG
Data Block NumberData Block numberRequired for Siemens TAG
Data Block OffsetData Block offsetRequired for Siemens TAG
Modbus TypeModbus type (Discrete Input, Coil, Holding Register, Input Register)Required for Modbus TAG
Modbus AddressModbus addressRequired for Modbus TAG
Tag NameOPC tag nameRequired for OPC
OPC AddressOPC tag addressRequired for OPC
Static ValueFixed valueFor Static TAG
Forward FillingFill with previous value in case of data loss (Useful for metrics that should not be reset (e.g. electricity, water, gas))Optional
WritableWritable TAG (If TAG will be intervened with formula)Optional
Save To DatabaseEnable historical data storage for this tagOptional
Storage ScheduleDatabase save frequency (e.g. every 15 minutes or more complex structures). Configure different time ranges for each day. Each time range can have a custom run time.Optional

Data Types

Data TypeDescriptionSizeExample Address
BOOLBoolean (true/false)1 bitM0.0, DB1.DBX0.0
BYTE8-bit unsigned1 byteMB0, DB1.DBB0
INT16-bit signed integer2 byteMW0, DB1.DBW0
DINT32-bit signed integer4 byteMD0, DB1.DBD0
LINT64-bit signed integer8 byteML0, DB1.DBW0
REAL32-bit float4 byteMD0, DB1.DBD0
WORD16-bit unsigned2 byteMW0, DB1.DBW0
DWORD32-bit unsigned4 byteMD0, DB1.DBW0
STRINGTextVariableDB1.DBB0

Adding New TAG

Step by Step TAG Addition

  1. Go to Tag List page
  2. Click "Add New Tag" button
  3. Select TAG type (Standard/Static)
  4. Enter Tag Name and Friendly Name
  5. Select Category
  6. Select Station (for Standard TAG)
  7. Specify Address and Data Type
  8. Set Forward Filling (if needed)
  9. Check Writable (if needed)
  10. Set SaveToDatabase and Storage Schedule (if needed)
  11. Save and test

SaveToDatabase Feature

Advantages:

  • Ability to perform historical data analysis
  • Creating trend charts
  • Reporting and comparison

Considerations:

  • Database size can grow rapidly
  • Adjust update frequency according to need
  • Don't save unnecessary TAGs

Writable Feature

Writable TAGs

When the Writable feature is activated, the TAG value can be changed through the Smart Energy system. This feature is used for automatic intervention in formulas.

⚠️ Security Warning:

  • Make only necessary TAGs writable
  • Don't make critical security TAGs writable
  • Monitor write operations in logs

Forward Filling Feature

Data Continuity and Forward Filling

Forward Filling is the feature of using the last recorded value in case of data loss or value decrease. This feature is especially critical for continuously increasing metrics such as meter readings.

Use Cases:

  • Electricity meters: kWh values continuously increase, not reset
  • Water meters: m³ values continuously increase
  • Natural gas meters: m³ values continuously increase
  • Production counters: Total production count
  • Operating hour counters: Machine operating hours

Update Rate (Storage Schedule)

Schedule TypeDescriptionUsage Example
SecondRun every X secondsRecord every 5 seconds for critical security TAGs (fast changing values)
MinuteRun every X minutesRecord every 15 minutes for energy meters (standard measurements)
HourlyRun every X hoursRecord every 1 hour for temperature sensors (slowly changing values)
DailyRun at specific time each dayRecord at 23:59 each day for daily summary reports
WeeklyRun on specific days of weekRecord at 08:00 every Monday for weekly maintenance TAGs
MonthlyRun on specific day of monthRecord at 00:00 on 1st of each month for monthly meter readings
CustomRun with custom time rangesWorking hours: Every 10 minutes between 08:00-17:00 Mon-Fri, every 1 hour between 01:00-06:00 at night

Common Issues

Cannot Read TAG Value

  • Check Station connection
  • Verify TAG address is correct
  • Check data type is compatible
  • Check that relevant area exists in PLC

Write Operation Failed

  • Check TAG's "Writable" feature is active
  • Make sure there is no write protection in PLC
  • Check value to be written is compatible with data type
  • Check user permissions

Best Practices

  • Keep TAG names standard and descriptive
  • Write Friendly Names understandably
  • Assign category for each TAG
  • Optimize Storage Schedule according to need
  • Don't SaveToDatabase unnecessary TAGs
  • Regularly test critical TAGs
  • Establish and apply naming convention