Automated Design-to-HMI
Manually creating HMI screens is one of the most time-consuming tasks in automation. With T-IA Connect, you can transform your data structures (UDTs and DBs) into graphical objects (buttons, gauges, input fields) automatically positioned and linked to your tags.
Prerequisites
- TIA Portal project with an HMI station (Comfort or Unified)
- Active T-IA Connect server
- Tag table defined for the HMI
Step 1: List and Explore HMI Views
Use the API to retrieve the list of existing screens and understand the hierarchy of your HMI project.
curl http://localhost:9000/api/hmi/screens
{
"screens": [
{ "name": "Main_Overview", "width": 1280, "height": 800 },
{ "name": "Motor_Control", "width": 1280, "height": 800 },
{ "name": "Alarms_History", "width": 1280, "height": 800 }
],
"total": 3
}Step 2: Create Dynamic Graphical Objects
Send a request to add objects to a screen. You can specify the object type, position, size, and most importantly, its tag binding with a PLC variable.
curl -X POST http://localhost:9000/api/hmi/screens/Motor_Control/objects \
-H "Content-Type: application/json" \
-d '{
"type": "Circle",
"name": "Status_Light",
"left": 100,
"top": 150,
"width": 50,
"height": 50,
"bindings": [
{
"property": "BackColor",
"tag": "DB_Motors.Motor_1.Running",
"converter": "BooleanToColor",
"params": { "true": "Green", "false": "Red" }
}
]
}'{
"success": true,
"objectId": "obj_987654",
"name": "Status_Light",
"status": "Created & Linked"
}Step 3: Export and Compile HMI
Once screens are generated, use the API to launch a global compilation of the HMI station to verify link consistency.
curl -X POST http://localhost:9000/api/hmi/compile \
-H "Content-Type: application/json" \
-d '{ "stationName": "HMI_TP1200", "rebuildAll": false }'{
"success": true,
"errors": 0,
"warnings": 2,
"compileTimeMs": 14500,
"binaryPath": "C:\\Projects\\Output\\HMI_Data.fw"
}HMI automation ensures that every variable in your DB has its graphical equivalent without any data entry error risk.