Formulas
Create notification and automatic intervention formulas using TAG and Advanced TAG data. Prevents unnecessary consumption. Notifies important situations early.
Important Note
Formulas can automatically intervene with PLCs. Test each formula carefully. Initially keep Writing Mode off, monitor only notifications and activate automatic intervention after ensuring the formula works correctly.
Supported Operators
Arithmetic Operators
+Addition-Subtraction*Multiplication/Division%Modulo (remainder)()Parentheses
Comparison Operators
==Equal!=Not equal>Greater than<Less than>=Greater or equal<=Less or equal
Logical Operators
&&AND||OR!NOT
Formula Structure
Formula Components
- Formula Name: Formula name
- Formula Text: Mathematical/logical expression
- Success Message: Message for TRUE result
- Warning Message: Message for FALSE result
- Writing Mode: Automatic TAG writing (optional)
- Scheduling: Run time
Operating Modes
- Notification Only: Writing Mode off, only generates notification
- Automatic Intervention: Writing Mode on, writes to TAGs
- Scheduled Run: Runs at specific times with Scheduling
- Continuous Monitoring: Checks at each cronjob run
Writing Mode
TAG Writing Based on Formula Results
With Writing Mode feature, you can write different values to different TAGs based on formula result (true/false). This feature is ideal for automatic control systems.
| Status | Description | Settings |
|---|---|---|
| True Result | When formula returns true | Value to write and target TAG |
| False Result | When formula returns false | Value to write and target TAG |
| Target TAG | TAG to write | Must be Writable |
Scheduling Configuration
| Schedule Type | Description | Usage Example |
|---|---|---|
| Second | Run every X seconds | Check every 10 seconds for critical formulas |
| Minute | Run every X minutes | Every 5 minutes for compressor control |
| Hourly | Run every X hours | Every 1 hour for lighting control |
| Daily | Run at specific time each day | At 23:59 each day for daily reporting |
| Weekly | Run on specific days of week | At 08:00 every Monday for weekly maintenance check |
| Monthly | Run on specific day of month | On 1st of each month for monthly optimization |
| Custom | Run with custom time ranges | Working hours: Every 10 minutes between 08:00-17:00 Mon-Fri |
Creating New Formula
Step by Step Formula Creation
- Go to Formula List page
- Click "Add New Formula" button
- Enter formula name
- Create formula with Formula Builder (TAG selection + operators)
- Write Success Message (for TRUE result)
- Write Warning Message (for FALSE result)
- Set Scheduling Configuration (how often to run)
- Keep Writing Mode off (Writing Mode is off as long as target TAG is not set)
- Save and activate formula
- Monitor results from Notification Logs (A few hours)
- If formula works correctly, activate Writing Mode
Testing Formula
Safe Testing with Notifications
There is no special "Test Mode" for testing new formulas. Instead, you can safely test by keeping Writing Mode off when creating the formula. Writing Mode is off as long as target TAG is not set.
- ✅ No intervention to PLC
- ✅ You can safely test formula logic
- ✅ You see all results in Notification Logs
- ✅ You detect errors early
- ✅ You can test as much as you want
Example Use Cases
Scenario 1: Compressor Optimization
Situation: Compressor still running when production stops
Result: Unnecessary energy consumption prevented, cost reduced
Scenario 2: Off-Hours Lighting
Situation: Some areas remain lit when shift ends
Result: Unnecessary off-hours lighting prevented
Scenario 3: Temperature Control
Situation: Equipment temperature approaching critical level
Result: Equipment protected from overheating, failure prevented
Scenario 4: Motor Protection
Situation: Motor current above normal
Result: Operator alerted, motor damage prevented