Skip to content

Equipment Registers¤

Laboratories that use equipment for traceable calibration measurements are required to manage information about the equipment by following the ISO/IEC 17025 standard. This information is saved in files that are referred to as equipment registers.

An equipment register is based on the definitions in the Schema and may either be saved in the eXtensible Markup Language (XML) file format or in a Python module. Using the XML format is the preferred way to save the information since XML files can be easily validated against the Schema to ensure data integrity and it allows for equipment registers to be parsed by many programming languages. An equipment register can be saved in a single XML file or distributed across multiple XML files.

The Schema Classes section of the documentation shows how an equipment register can be used in a Python program. The Register class loads an equipment register, or when using a configuration file the registers attribute provides access to multiple equipment registers.

XML Schema¤

The documentation for the equipment-register schema is available here and development of the schema is performed in the repository.

Currently, the schema is targeting equipment that is located at the Measurement Standards Laboratory of New Zealand (in particular, enumeration values and pattern-string matches). If you work at a calibration laboratory and are interested in using the schema within your Quality Management System, please contact us or open an issue.

See this section for details on how to validate the contents of an equipment register against the schema.

Python Module¤

You may save the information about the equipment you are using in Python modules instead of in XML files.

from datetime import date

from msl.equipment import (
    CompletedTask,
    Component,
    Connection,
    Equation,
    Equipment,
    Evaluable,
    Maintenance,
    Measurand,
    Range,
    Report,
)

equipment = Equipment(
    manufacturer="HP",
    model="3458A",
    connection=Connection("GPIB::22"),
    maintenance=Maintenance(
        completed=(
            CompletedTask(
                task="Clean fan",
                due_date=date(2025, 3, 4),
                completed_date=date(2025, 3, 5),
                performed_by="John",
            ),
        )
    ),
    calibrations=(
        Measurand(
            quantity="Voltage DC",
            calibration_interval=1,
            components=(
                Component(
                    reports=(
                        Report(
                            id="Report No.",
                            report_issue_date=date(2024, 8, 13),
                            measurement_start_date=date(2024, 8, 5),
                            measurement_stop_date=date(2024, 8, 6),
                            equations=(
                                Equation(
                                    value=Evaluable(
                                        equation="0.9999862*v + 1.024e-5",
                                        variables=("v",),
                                        ranges={"v": Range(1, 10)}
                                    ),
                                    uncertainty=Evaluable(equation="3.2e-6"),
                                    unit="V",
                                ),
                            ),
                        ),
                    )
                ),
            ),
        ),
    ),
)

# Connect to the digital multimeter and query its identity
dmm = equipment.connect()
print(dmm.query("ID?"))

# Configure the multimeter, fetch voltage readings, convert to float(s)
voltages = ...

# Apply the calibration equation to correct the voltage readings
correction = equipment.latest_report().equation
print(correction.value(v=voltages))
print(correction.uncertainty(v=voltages))