Skip to Content

← All functionalities

Fuse test benchRaspberry PLC 19RFicherosDatalogging

Test reports that still open in twenty years

Automated test reports in plain TXT sound humble until an auditor asks for a record from five years ago. This example writes one timestamped file per run into Test_Reports/: a header with date, test type, fuse rating and ambient temperature, a per-sample table of mean current, voltage drop and hot resistance, the global verdict and free-form operator comments. It is the document of record in a real fuse test bench deployment.

Why plain text beats PDF here

A TXT file opens on any machine, diffs cleanly, greps instantly and survives every software migration. The report is generated with nothing but the Python standard library — no reportlab, no template engine — so the PLC image stays minimal and the generator can never break on a dependency update.

What goes in the header

Everything needed to reproduce the test: timestamp, sequence type with its current factor, fuse holder, nominal and setpoint currents, and the DS18B20 ambient temperature. Fusing behaviour is temperature-dependent, so a verdict without the ambient reading is scientifically incomplete.

The per-sample table

Each fuse sample gets a row: mean current, voltage drop in millivolts, and the derived hot resistance in milliohms — the early-warning metric for element degradation. Fixed-width columns keep the table readable in any editor and trivially parseable later if the data moves to a database.

A snippet from the implementation

Straight from the example as deployed on the Raspberry PLC 19R — copy it freely:

def rule(char="-"):
    return char * WIDTH + "\n"

The full example is a complete program — wiring header, setup and main loop — ready to adapt to your application.

Frequently asked questions

Why compute resistance in the report instead of just logging raw values?

Hot resistance (voltage drop over current) is the figure engineers compare across batches. Computing it at write time, next to its inputs, means the report is self-contained and nobody re-derives it differently later.

How are report files named and organized?

Informe_YYYY-MM-DD_HH-MM-SS.txt inside Test_Reports/, one file per run. The sortable timestamp makes the directory itself the chronological index, with no database required.

Can these reports be exported or synced off the PLC?

Easily — they are just files. rsync, a USB stick, or a small script mailing the day's reports all work; several catalog templates cover pushing files from a PLC to a server.

Related functionalities