ITC Pressure Optimizer
Optimize the pressure setpoint on a Mercury ITC depending on temperature parameters read from the (same) Mercury ITC. Pressures are calculated as a function of temperature setpoint, actual temperature, heater power, and currently set pressure. This driver is a port of mitcpresscio.c, with an event
Preview
Download
$ git clone ....
Compile
$ cmake -B build
$ cmake --build build
Run
$ $pwd/build/itcPressureOptimizer <frontend_name> <equipment_name>
Configuration
In /Equipment/<name>/Settings/Devices/MITCPRESSC/DD/, you can modify settings regarding where to read/write values to the equipment.
Default values are :
| Equipment | variox0 | heliox0 |
|---|---|---|
| MITC_OutputPressSPIndex | 3 (0x3) | 8 (0x8) |
| MITC_InputVarioxSPIndex | 1 (0x1) | 1 (0x1) |
| MITC_InputVarioxTempIndex | 0 (0x0) | 0 (0x0) |
| MITC_InputVarioxPowIndex | 10 (0xA) | 8 (0x8) |
| RecalcInterval | 10 (0xA) | 10 (0xA) |
| MitcReadoutInterval | 2 (0x2) | 2 (0x2) |
| PressReadoutInterval | 3 (0x3) | 3 (0x3) |
NOTE: OutputPressSPIndex and InputVarioxPowIndex are different for variox0 and heliox0
Usage
In /Equipment/<name>/Variables/Demand you can specify demand to the equipment. See Preview
Project structure
This is the execution flow graph.
For cleaner code, all execution and data flow pass through an EventBus. Objects can subscribe to one or many specific event types. They can also publish an event, which will be dispatched to all subscribers by invoking their callbacks.
OdbHotlink triggers the execution flow whenever a value changes. Only DemandHandler and InputHandler are registered.
itc_pressure_optimizer instantiates all components and publishes an InitEvent first, allowing all handlers to initialize and connect to the ODB. It also periodically publishes a PollEvent every second to update time-dependent averages.

