Back to prompt library
Build an open62541 Flowmeter Calibration Drift and Rework Queue — implementation
Linked challenge: Build an open62541 Flowmeter Calibration Drift and Rework Queue
Prompt source
implementation81 lines11 sectionsNo variables1 code block
## Build
Cross-check open62541 OPC UA volumetric flowmeter telemetry against benchmark master meter measurements. Queue drifting instruments into recalibration workflows with discrepancy reports.
## User
Calibration Technician
## Workflow
1. Extract flow rate telemetry from open62541 OPC UA client sessions and compare with reference meter logs.
2. Calculate percentage measurement deviation across multiple flow velocity setpoints.
3. Flag flowmeters showing systematic gain error or zero-point offset drift.
4. Generate a standardized calibration bench test ticket with recommended span adjustments.
## Interface
Calibration test bench interface displaying error curves and bench work orders.
## Data
Synthesize JSON records of open62541 OPC UA flow transmitter nodes and calibration lab master meter values.
Starter examples below are synthetic. They are not downloaded records.
## Source
[open62541 OPC UA](https://raw.githubusercontent.com/open62541/open62541/master/README.md)
Utilizes open62541 OPC UA client and server information models and data types from Source 0.
## Tools
pydantic-ai, matplotlib.
Pydantic AI ensures type-safe validation of metrology curves and generates structured technician instructions.
Local or hosted LLM to compose calibration deviation narratives and technician recommendations.
## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.
## Acceptance
- Identifies meter drift exceeding ±0.5% of reading.
- Calculates required zero and span calibration adjustment coefficients.
- Emits compliant calibration bench dispatch records.
## Starter Examples
```json
[
{
"input": {
"meter_node": "ns=1;s=ChemicalLine.MagMeter.FlowRate",
"flow_rates_lpm": [
100,
200,
300
],
"reference_rates_lpm": [
98.8,
197.6,
296.4
],
"max_allowed_error_pct": 0.5
},
"expected_output": {
"meter_node": "ns=1;s=ChemicalLine.MagMeter.FlowRate",
"observed_error_pct": 1.2,
"status": "CALIBRATION_FAIL",
"action": "QUEUE_FOR_BENCH_RECALIBRATION",
"span_correction_factor": 0.988
}
},
{
"input": {
"meter_node": "ns=1;s=WaterLine.VortexMeter.FlowRate",
"flow_rates_lpm": [
50,
100,
150
],
"reference_rates_lpm": [
49.9,
99.8,
149.7
],
"max_allowed_error_pct": 0.5
},
"expected_output": {
"meter_node": "ns=1;s=WaterLine.VortexMeter.FlowRate",
"observed_error_pct": 0.2,
"status": "CALIBRATION_PASS",
"action": "RELEASE_TO_SERVICE",
"span_correction_factor": 0.998
}
}
]
```
## Safety
Read-only calibration evaluation; calibration coefficients require physical technician verification on the test bench.
Use mock external writes. Require human review before any real deployment.