Converted the plotting script to be modular, and changed the filename.
Tightened up the logic to pick a new trim when one has been tried before.
Made the plotting script more modular.
Fixed bug in the I2C output that merged columns
Fixed bug where the script would get stuck in an infinite loop if XDAQ crashes.
Tidied up and trimmed the environment variable requirements.