2.1 KiB
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
Without executable
$ cmake -B build
$ cmake --build build
With executable
$ cmake -B build -DBUILD_FRONTEND=ON
$ 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 |
|---|---|---|
| Output Pressure SetPoint Index | 3 (0x3) | 8 (0x8) |
| Input SetPoint Index | 1 (0x1) | 1 (0x1) |
| Input Temperature Index | 0 (0x0) | 0 (0x0) |
| Input Power Index | 10 (0xA) | 8 (0x8) |
| Average Power Time Window | 30f | 30f |
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.
All dotted lines represent data and execution flow going through the EventBus (Broker) with the publish / subscribe method.
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.

