auto_sampler_volume Triggers sampler based on volume

auto_sampler_volume.py

  • Sampler is triggered based on water volume.
  • If volume is insufficient, triggers sampler at 20:00:00 UTC
  • Sampler triggers no more than once per day.

A Sat/XLink setup is associated with this module: auto_sampler_volume_setup.txt

auto_sampler_volume.compute_volume_total(inval)

This function needs to be associated with the total volume measurement. It will compute the total volume based on the current volume and past volume. The script will trigger the sampler if appropriate.

Parameters:inval – not relevant
Returns:the current volume reading
auto_sampler_volume.daily_trigger()

This function should be associated with a script task scheduled for a certain time every day. If the sampler has not been triggered today, this function will trigger it.

auto_sampler_volume.trigger_sampler()

Call to attempt to trigger the sampler. Certain conditions may prevent the triggering.

Returns:True if sampler was triggered.
auto_sampler_volume.trigger_sampler_master()

Triggers the sampler immediately and logs it.

auto_sampler_volume.triggered_today()

Have we triggered the sampler today?

auto_sampler_volume.volume_threshold()

Returns the threshold at which the volume difference triggers the sampler. It is stored in the setup as Alarm 1 Threshold.

Returns:volume threshold
Return type:float