Database Formats

Databases are used by MSL-Equipment to store EquipmentRecord’s in an Equipment-Register Database and ConnectionRecord’s in a Connection Database. The database file formats that are currently supported are .txt, .csv and .xls(x). A database is composed of fields (columns) and records (rows).

Equipment-Register Database

The information about the equipment that is used to perform a measurement must be known and it must be kept up to date. Keeping a central and official (hence the word Register) database of the equipment that is available in the laboratory allows for easily managing this information and for helping to ensure that the equipment that is being used for a project meets the calibration requirements needed to obtain the desired measurement uncertainty.

MSL-Equipment does not require that a single database is used for all equipment records. However, it is vital that each equipment record can only be uniquely found in ONE Equipment-Register database. The records in a database MUST NEVER be copied from one database to another database (keeping a backup copy of the database is encouraged). Rather, if you are borrowing equipment from another team you simply specify the path to that teams Equipment-Register database in your Configuration File. The owner of the equipment is responsible for ensuring that the information about the equipment is up to date in their Equipment-Register database and the user of the equipment defines an <equipment> XML tag in the Configuration File. Therefore, an Equipment-Register database is to be considered as a global database that can be accessed (with read permission only) by anyone via the MSL-Equipment package.

Each record in an Equipment-Register database is converted into an EquipmentRecord.

The following is an example of an Equipment-Register database (additional fields can also be added to a database, see Field Names).

Manufacturer Model Number Serial Number Date Calibrated Calibration Cycle [Years] Description
Keysight 34465A MY5450 4 April 2014 5 6.5 digital multimeter
Hewlett Packard HP8478B BCD024 17 June 2017 3.5 Dual element thermistor power sensors
Agilent 53230A 49e39f 9 Sept 2015 7 Universal counter/timer


Not all equipment records in the Equipment-Register database need to have the ability to be connected to. For example, cables, filters and adaptors can all be important equipment that may be used for a measurement and should be included in the Equipment-Register database and specified as <equipment> tags in the Configuration File.

Field Names

The supported fields for an Equipment-Register database are:

  • Asset Number – The IRL/CI asset number of the equipment.
  • Calibration Cycle – The number of years that can pass before the equipment must be re-calibrated.
  • Category – The category (e.g., Laser, DMM) that the equipment belongs to.
  • Date Calibrated – The date that the equipment was last calibrated.
  • Description – A description of the equipment.
  • Location – The location where the equipment can usually be found.
  • Manufacturer – The name of the manufacturer of the equipment.
  • Model – The model number of the equipment.
  • Register – The value assigned, as in MSL Policy and Procedures, for any equipment that requires calibration or maintenance for projects.
  • Latest Report Number – The report number for the last time that the equipment was calibrated.
  • Serial – The serial number, or engraved unique ID, of the equipment.

The text in the header of each field is not too particular for what it must be. The header text is parsed for one of the specific field names listed above and if the header contains one of these field names then that column is assigned to be that field. The order in which the fields appear in the database are not important.

For example, the following headers are valid (the blue text is what is important in the header)

  • Headers can contain many words.

    For a field to be assigned to the manufacturer the header can be written as

    This column is used to specify the Manufacturer of the equipment

  • Text is case insensitive.

    For a field to be assigned to the model the header can be written as any of the following

    • MODEL No.
    • Model #
    • model number
    • MoDeL

    Although using the following header will not raise an exception, you should not use the following header because either the manufacturer or the model will be assigned for this field depending on the order in which the fields appear in the database

    The model number from the manufacturer

  • Whitespace is replaced by an underscore.

    For a field to be assigned to the calibration_cycle the header can be written as

    Calibration Cycle, in years

  • If the header does not contain any of the specific field names that are being searched for then the values in that column are silently ignored.

Connection Database

A Connection database is used to store the information that is required to establish communication with the equipment.

The supported fields for a Connection database are:

  • Address – The address to use for the connection (see Address Syntax).
  • Backend – The Backend to use to communicate with the equipment
  • Manufacturer – The name of the manufacturer of the equipment
  • Model – The model number of the equipment
  • Properties – Additional properties that may be required to establish a connection to the equipment as key-value pairs separated by a semi-colon. For example, for a ConnectionSerial connection the baud rate and parity might need to be defined – baud_rate=11920; parity=even. The value (as in a key-value pair) gets cast to the appropriate data type (e.g., int, float, str) so the baud rate value would be 11920 as an int and the parity value would be Parity.EVEN.
  • Serial – The serial number, or engraved unique ID, of the equipment

A record in a Connection database gets matched with the appropriate record in an Equipment-Register Database by the unique combination of the Manufacturer + Model + Serial values, which when combined act as the primary key in each database.

The following is an example of a Connection database (the header of each field also follows the same Field Names format used in an Equipment-Register Database and so Model # would also be an acceptable header)

Manufacturer Model Number Serial Number Backend Address Properties
Keysight 34465A MY5450 MSL USB::0x2A8D::0x0101::MY5450  
Hewlett Packard 3468A BCD024 PyVISA GPIB::7 alias=dmm
Agilent 53230A 49e39f MSL COM2 baud_rate=119200; parity=even

Unlike an Equipment-Register Database each person can have their own Connection database. The reason being that since equipment can be shared between people some Connection values, like the GPIB address, can vary depending on who is using the equipment and what other equipment they are using. Therefore, everyone could have their own Connection database and connection records can be copied from one Connection database to another. Also, how one establishes a connection to the equipment is not vital information for the MSL Quality System. What equipment was used during data acquisition and the metadata associated with each equipment is important. What is not important is, for example, what the value of the GPIB address was when the equipment was used to acquired the data.

Address Syntax

The following are examples of an Address syntax (see more examples from National Instruments).


The text PythonClassName that is used in the table below would be replaced with the actual name of the Python class that is available in MSL Resources. The text PathToSDK would be the full path to where the SDK file is located or only the filename if the path to where the SDK file is located has been added as a <PATH> XML tag in the Configuration File.

MSLInterface Syntax
ASRL COM7::PythonClassName
SDK SDK::PythonClassName::PathToSDK
SDK SDK::Bentham::C:/Program Files/Bentham/lib/benhw32_cdecl.dll
SDK SDK::FilterFlipper::Thorlabs.MotionControl.FilterFlipper.dll