WebData Editor (Reference) provides an integrated environment for defining and editing JSON, XML, HTML, and text data structures with dynamic tag binding. The WebData Editor enables:
Access via Reports → WebData Editor
Embed tag values using curly brackets:
{Tag.TagName}
JSON:
json
{
"deviceId": "SENSOR-001",
"timestamp": "{Info.Date}",
"measurements": {
"temperature": {Tag.TankFarm/Tank1/Temp},
"pressure": {Tag.TankFarm/Tank1/Pressure},
"level": {Tag.TankFarm/Tank1/Level}
},
"status": "{Tag.Equipment/Status}"
}
XML:
xml
<SensorData>
<DeviceID>SENSOR-001</DeviceID>
<Timestamp>{Info.Date}</Timestamp>
<Temperature>{Tag.TankFarm/Tank1/Temp}</Temperature>
<Pressure>{Tag.TankFarm/Tank1/Pressure}</Pressure>
<Status>{Tag.Equipment/Status}</Status>
</SensorData>
HTML:
html
<html>
<body>
<h1>Production Report</h1>
<p>Date: {Info.Date}</p>
<p>Total Production: {Tag.Production_Count}</p>
<p>Quality Score: {Tag.Quality_Score}%</p>
</body>
</html>
Text:
Device Report
=============
Date: {Info.Date}
Temperature: {Tag.TankFarm/Tank1/Temp} °C
Pressure: {Tag.TankFarm/Tank1/Pressure} PSI
Status: {Tag.Equipment/Status}
Tags replace placeholders when sending:
json
// Template
{"name": "{Tag.UserName}"}
// If Tag.UserName = "John"
// Sent as:
{"name": "John"}
Tags populate from received content:
json
// WebData Template
{"temperature": "{Tag.Temp}"}
// Received Data
{"temperature": 25.5}
// Result: Tag.Temp = 25.5
When binding tags to nested JSON objects:
Template:
json
{
"data": "{Tag.SensorData}"
}
Received:
json
{
"data": {
"id": 175,
"values": [10, 20, 30],
"status": "active"
}
}
Result: Tag.SensorData receives entire nested object:
json
{
"id": 175,
"values": [10, 20, 30],
"status": "active"
}
json
{
// Use consistent indentation
"metadata": {
"version": "1.0",
"timestamp": "{Info.Date}"
},
// Group related data
"measurements": {
"temperature": {Tag.Temp},
"pressure": {Tag.Pressure}
},
// Handle arrays properly
"values": [
{Tag.Value1},
{Tag.Value2}
]
}
xml
<!-- Use proper nesting -->
<Root>
<!-- Group related elements -->
<Measurements>
<Temperature unit="C">{Tag.Temp}</Temperature>
<Pressure unit="PSI">{Tag.Pressure}</Pressure>
</Measurements>
<!-- Use attributes wisely -->
<Status code="{Tag.StatusCode}">{Tag.StatusText}</Status>
</Root>
json
{
"status": "{Tag.Status}",
"error": "{Tag.ErrorMessage}",
"retry": {Tag.RetryCount}
}
json
{
"method": "getData",
"params": {
"startDate": "{Tag.StartDate}",
"endDate": "{Tag.EndDate}",
"filters": {
"location": "{Tag.Location}",
"type": "{Tag.DataType}"
}
}
}
json
{
"settings": {
"interval": {Tag.UpdateInterval},
"threshold": {Tag.AlarmThreshold},
"enabled": {Tag.SystemEnabled}
}
}
xml
<StatusReport>
<Timestamp>{Info.Date} {Info.Time}</Timestamp>
<System>
<Running>{Tag.System_Running}</Running>
<Uptime>{Tag.System_Uptime}</Uptime>
</System>
<Production>
<Count>{Tag.Production_Count}</Count>
<Rate>{Tag.Production_Rate}</Rate>
</Production>
</StatusReport>
Tag not replacing:
Invalid JSON/XML:
Data not populating:
Performance issues: