Thermistors¶
Description¶
The acquisition of the thermistors is controlled via the digitemp
software (https://github.com/bcl/digitemp). The command is called every THERM_ACQ_SLEEP
seconds and the resulting output is parsed into an array of temperature data. This data is then written to the CPU run file opened by the main acquisition (DataAcquisition::CreateCpuRun()
) asynchronously in the form of a THERM_PACKET
.
Reading out the thermistors¶
The thermistors will be read out asynchronously if the -therm
flag is passed to the main mecontrol
executable. If no thermistors are connected, a temperature of 99
will be read out for debugging purposes. If thermistors are connected, some sensible temperature should be read out. The unit of the measurements is degrees celcius and the range of the sensors is from -50 to +70. See the digitemp software for more information.
ThermManager¶
-
class ThermManager¶
controls the thermistor acquisition
Public Functions
-
ThermManager()¶
constructor. initailses cpu_file_is_set to false
-
void Init()¶
initialise the thermistors and write addresses to init file
-
TempAcq *GetTemperature()¶
get the temperature by running the digitemp command and parsing the output
-
void PrintTemperature()¶
print the temperature for use with debugging
-
int Notify()¶
notify the object of an instrument mode switch used by OperationMode::Notify
-
int Reset()¶
reset the mode switching after an instrument mode change used by OperationMode::Reset()
Private Functions
-
TempAcq *ParseDigitempOutput(std::string input_string)¶
parse the digitemp output
- Parameters:
input_string – the string containing the output of the digitemp command
-
ThermManager()¶