UCL

UCL Department of Physics and Astronomy »

High Energy Physics

27 Apr 2024

Adding New Items to the HEP Lab Equipment Database

In order to add items to the HEP lab equipment database inventory, the following steps are needed:

  1. Create a PHP file with the relevant item details in the /unix/www/html/labequipment/equipment/ directory.
  2. Take a square photo of the item and upload it to the corresponding sub-directory in /unix/www/html/labequipment/photos/.
  3. Print off the asset tag and stick it to the item.
The item will then show up automatically in the main database list and any searches.

Creating the Item PHP Record File

The steps to create a record for a new item are as follows:

  1. Duplicate the template file /unix/www/html/labequipment/equipment/equipmentItem.php.template.
  2. Rename it with a unique username for that new item and the extension php.
  3. Edit the fields within the new file to match the details of the new item.
  4. Ensure that the new file is owned by the group users and group-writeable: chgrp users newItem.php; chmod ug+w,a+rx newItem.php
  5. Move it to the relevant sub-directory within /unix/www/html/labequipment/equipment/ corresponding to its category.
  6. Take and upload a photo (see instructions below)
  7. Refresh the list to ensure the new item shows up in the listing.
  8. Click on the item to make sure the information is displayed correctly.
  9. Click on the “Print Asset Tag” link, check that the QR code is working properly, print the asset tag and stick it to the new item. See below for printing setup details.

There are a few prerequisites that must be followed when creating this file:

  1. The new item filename MUST be unique. Items are listed and searched by this unique item ID and if two items have identical filenames/IDs, one will not be displayed.
  2. While the sub-category can be anything concise and descriptive, the category has to be chosen from a specific list (see below).
  3. Some fields are optional but the following are compulsory in order for the asset tag:
    • $name — Display name of item.
    • $contact — Owner or person responsible: use plus1 username or “High Energy Physics” if owned by the group.
    • $experiment — Short name of experiment eg. ATLAS, PBT. Use “High Energy Physics” if owned by the group.
    • $specs — Item specification. Include size and weight (necessary for off-site storage) plus relevant spec.
    • $cat — Equipment category; see below webpage for options. Single word; lower case.
  4. For the owner, user their plus1 username: their contact details are then pulled automatically from the group members list.
  5. Where an item is a duplicate of something that already has a record eg. another NIM delay unit, don't create another file but simply increment the $numItems value in the existing file.

Printing the Asset Tag

We have a Dymo LabelWriter 5XL label printer in D15 that is set up on the HEP laptop network. By default it is loaded with 36 mm x 89 mm labels that are used for the standard asset tags. In order to print to this printer:

  1. Download the appropriate LabelWriter printer driver software for your OS from the Dymo website (for Linux, the CUPS printer-driver-dymo package is available).
  2. Connect to the HEP wired laptop network. Note: printing does not work over WiFi.
  3. Search for “Dymo LabelWriter 5XL” on the network to connect to the printer. The IP address is: 192.168.4.51.
  4. For the desired item, click on the “Print Standard Asset Tag” link from the item listing: this will display the asset tag to be printed.
  5. Print the asset tag from the web browser. The page size needs to be set to:
    • No margins — this seems best done from Google Chrome or Firefox using the browser print options (Safari always add default margins through the MacOS print dialogue).
    • Scale to fit.
    • 36 mm x 89 mm page size (or nearest equivalent).
    • Landscape.

If necessary, the printer can be disconnected from the network and plugged in directly via USB.

Adding the Photo

Alongside the new item record file, a photo of the item needs to be taken and uploaded. Please follow these steps:

  • Take a square photo of the item and save it as a web-safe format eg. JPG, PNG etc. It doesn't need to be particularly high resolution: somewhere between 300x300 and 800x800 pixels is fine.
  • Give it the IDENTICAL name as the item it shows eg. if the filename of the item itself is pbt_zarges_small.php, the photo should be saved as pbt_zarges_small.jpg. To save having to hard-code the filename into each PHP file, the list of photos is constructed and matched automatically but the filenames need to match otherwise the photo won't be found.
  • Upload the photo to the matching directory in /unix/www/html/labequipment/photos/ ie. if the PHP item file is stored in equipment/storage/ the photo needs to be uploaded to photos/storage/. This directory should have the same name as the item category.

Equipment Categories

These are the categories to choose from when creating the new item file:

  • comp — Computing and Networking
  • detector — Detectors
  • elec — Electronics
  • nim — NIM Modules and Crates
  • pmt — Photomultiplier Tubes
  • power — Power Supplies
  • scopes — Oscilloscopes and Network Analysers
  • storage — Storage and Experimental Enclosures
  • tools — Lab and Workshop Tools
  • vme — VME Modules and Crates

Item Details

These are all the fields that can be present within an item PHP record file:

  • $name — Display name of item.
  • $contact — Owner or person responsible: use plus1 username or “High Energy Physics” if owned by the group.
  • $experiment — Short name of experiment eg. ATLAS, PBT. Use “High Energy Physics” if owned by the group.
  • $specs — Item specification. Include size and weight (necessary for off-site storage) plus relevant spec.
  • $cat — Equipment category; see below webpage for options. Single word; lower case.
  • $subcat — Sub-category; can be anything you want but must be concise and descriptive.
  • $make — Make of item.
  • $model — Model of item.
  • $location — Storage location.
  • $numItems — Number of identical items in our labs. Only really necessary if there are multiple items covered by same listing.
  • $year — Year purchased. Can be approximate but useful to gauge the age of the item.
  • $url — Web address of item details. This can really be anything that gives the maximum information about the item but a product spec page is ideal.
  • $notes — Any notes relevant to the item eg. long-form spec, anticipated disposal date, usage details etc.