Troubleshooting
Log paired Torque and Angle values for a live XY chart
Short answer
The Tag Historian stores Torque and Angle independently, so no record ever pairs them and the XY chart plots mismatched points. Replace that storage for this chart with a SQL Bridge transaction group that samples both tags into one table row with a common timestamp, size its trigger evaluation rate from the shortest feature the curve must resolve, and bind Angle to X and Torque to Y from those rows.
On this page
The Ignition Tag Historian cannot deliver this chart. It stores each tag independently, so a Torque update produces a Torque record with no matching Angle record, and no stored observation ever holds both coordinates of one point. An XY chart needs exactly that: one complete pair per plotted point. The answer is a SQL Bridge transaction group that samples both tags in one execution and writes them to a single table row with a common timestamp. Its trigger evaluation rate, not a fixed transaction-group ceiling, sets how fast you capture, so size that rate from the shortest feature your curve must resolve, then bind the chart to those rows: Angle on X, Torque on Y.
Why the historian never pairs the two values #
The Tag Historian records tags, not relationships between them. Each tag runs on its own change detection and its own schedule, and the module maintains no timing relationship between different tags. Both tags can be perfectly valid while the chart is wrong: when the two histories are joined by time, each Torque value is matched to whatever Angle record happens to be nearest, which can predate it by a full process update.
Rebuilding the pairs afterwards means carrying values forward or interpolating between records. Both methods invent points that were never measured, and for a torque-angle curve the shape is the entire point: a flattened peak or a shifted knee is a false measurement, not a display quirk. The same split between the two storage models applies to any short-term trend database, and the trade-off is laid out in Tag Historian vs SQL Bridge storage for a short-term trend database.
Rule out a tag fault before changing storage #
Change the storage model only when the values themselves are proven good. Work through this list during a known process movement:
- Watch both live tags: each must change as the process moves, at the rate the controller publishes.
- Check quality on both. A bad-quality update can return no value at all, which looks like a pairing fault but is an acquisition fault; the pattern is described in Why a bad quality update hides Historian values.
- Inspect the data delivered to the chart, not just the rendered trace: open the records behind one suspicious plotted point and note that the two values were stored at different times.
- Move to the transaction group only when both tags are fresh, of good quality, and the plotted points still do not correspond to the process.
Store both values in one transaction group row #
A transaction group is a unit of execution in the SQL Bridge module: one execution reads all of its items and performs its action, such as an insert. The documentation positions transaction groups as a flexible alternative to the Tag Historian, which is built for speed and efficiency rather than simplicity. For this chart the group is the unit of association:
- Create one transaction group and add both Torque and Angle as items of that same group, so a single execution samples both.
- Map the two items to two columns of one destination table, and store the timestamp alongside them so the row carries its observation time.
- Configure the group to insert a new row on every execution rather than only retaining the latest values; every observation must survive for plotting.
- Run one process cycle, then read the new rows back. Each row must contain both coordinates and its own timestamp. That read-back is the test that proves the pairing before the chart is touched.
| Configuration | What gets stored | Use it for |
|---|---|---|
| Two historian tags | Each tag on its own schedule, never paired | Independent trends and reports |
| One transaction group with both items | One row per execution: both values, one timestamp | This XY chart |
| Controller snapshot read by the group | Both values captured in one controller scan, then stored | Curves that must be coherent within one scan |
Set the evaluation rate from the shortest feature #
A transaction group that seemed too slow was almost always told to evaluate too slowly. There is no hardwired transaction-group speed limit: the practical ceiling is the database's sustained insert rate plus the gateway's execution load, and below that ceiling the capture rate is whatever you configure. Keep four rates distinct:
- Source update rate, set in the controller and driver: how often genuinely new values exist. Evaluating faster than this only writes rows that repeat the previous values.
- Trigger evaluation rate, set on the transaction group: how often the group checks whether to execute. This is the capture rate, capped by the source rate.
- Database write rate: whether the inserts sustain without growing delays.
- Chart refresh rate: how quickly stored rows appear on screen. It is independent of capture: refresh once or twice per second, return all rows since the last refresh, and every captured point still appears.
Worked example, with planning numbers. This is an illustration, not a measured result:
- Shortest feature to resolve: the torque rise of one rundown, 0.2 s. Working rule: capture at least 5 samples across the shortest feature, or the peak flattens.
- Required interval: 0.2 s ÷ 5 = 0.04 s = 40 ms. Required rate: 1 ÷ 0.04 s = 25 samples per second.
- Source check: the controller updates both values every 10 ms, that is 100 updates per second. 25 per second is below that, so every evaluation can see a fresh value and the capture rate is the required 25 per second.
- Volume: a 3 s rundown at 25 samples/s = 75 rows per joint. At a 15 s cycle, 3600 s ÷ 15 s = 240 joints per hour, so 240 × 75 = 18,000 rows per hour while running.
- Storage: 18,000 × 8 h = 144,000 rows per 8-hour shift. At a planning 50 bytes per row including indexes, that is 144,000 × 50 B = 7.2 MB per shift, about 1.8 GB over 250 shifts.
The decision from those inputs: set the evaluation rate to 40 ms and gate the trigger on the rundown bit, so the group executes only during a run. Ungated, the same group writes 25 × 3600 = 90,000 rows per hour, five times the needed volume, and everything between joints is a repeat. If the source updates slower than the required rate, fix acquisition first; no storage layer recovers changes that never reached the gateway. Where the store is a time-series database fed by an oversampling source, the same source-versus-required-rate check is what sizes the machine, as shown in Sizing an edge PC for oversampled PLC data to InfluxDB.
Bind the chart to the paired rows #
Changing storage repairs nothing if the binding still queries the two historian paths. Point the chart's data query at the transaction group's table and take both coordinates from each returned row:
- Select the Angle, Torque and timestamp columns together in one query result.
- Restrict the query to the intended acquisition window, such as the current run or joint, so two runs cannot merge into one trace.
- Order by capture order; at fast rates timestamps can repeat, so use a monotonically increasing row identifier to break ties.
- Bind Angle to the horizontal axis and Torque to the vertical axis. Time orders the observations and is not an axis of this chart.
If this curve feeds an accept-or-reject decision, that decision stays in the controller: the chart and its table are the record and the view, never the interlock.
When the controller must own the pairing #
One group execution reads the latest value of each item, so if the controller computes Torque and Angle on different paths, the two values can come from instants up to one source-update period apart. In the worked example that worst case is 10 ms, which is 10 ms ÷ 200 ms = 5% of the feature width: acceptable for monitoring and analysis. If the curve is the acceptance record, or the two values update on unrelated paths, have the controller copy both values into a snapshot pair within one scan and publish it with a sequence value, then point the transaction group at the snapshot. A new sequence value marks a complete observation, and repeated reads are recognizable as repeats.
The decision for each case #
- Both tags good, chart mismatched: one SQL Bridge transaction group, both tags as items, one row per execution, common timestamp. This is the fix.
- Transaction group seemed too slow: the trigger evaluation rate was too low, or the source is slower than assumed. Set the rate from the shortest feature, then confirm it from the spacing of the stored rows.
- Source updates below the required rate: correct the controller or driver update rate first; storage cannot manufacture resolution.
- Curve is an acceptance record, or the values update on separate paths: controller snapshot with a sequence value, then the transaction group stores the snapshot.
- Historian tags: keep them for independent trends and reports. They are the right store for those jobs; they simply do not feed this chart.
Questions asked
Can the same row carry more than Torque and Angle?
Yes. Add a run identifier, a station number or a result code as further items in the same transaction group. Each lands in its own column of the same row, so the identifier stays aligned with the sample instead of being joined in afterwards. Extra items add bytes per row, not extra executions, so the evaluation rate and the database load from the worked example do not change.
Does the chart page have to stay open for logging to continue?
No. The transaction group executes inside the gateway as a configured resource, not in the client session, so rows are written whether or not anyone is displaying the chart. A closed or slow page therefore never loses captured points; the chart only reads rows that were already stored.
How do I prove the pairing after the change?
Run one cycle and read the new rows back. Every row must hold both coordinates with no nulls, timestamps must step by the evaluation interval, and during a movement both columns must change from row to row. Then compare one stored pair against the controller's own value display mid-run: if the stored pair matches the controller while the old chart did not, the storage fix is confirmed.
Will 25 rows per second overwhelm my database?
No. Twenty-five small inserts per second is a light sustained load for a database on the same site network, and the worked example writes about 18,000 rows per hour only while rundowns are active. Watch the group's execution status instead of guessing: growing execution errors or delays are the first sign that the database is falling behind.