Skip to content

Fix issue with power supplies which do not allow 0 V

In Pisa pixel tests we use a CAEN power supply. Among the LV generator we have A2519C, which supports a voltage range between 5V -- 15V (manual).

Currently, settings/Devices/PowerSupply_caen.xml is generated using V0Set=0 even if 0 V is not allowed, eg.

<Devices>
  <PowerSupply InUse="Yes" ID="caen" Model="CAEN" Series="SY4527" Connection="Ethernet" IPAddress="192.168.0.102" Timeout="1" Port="9221" UserName="admin" Password="burnincms" HVSlot="0" LVSlot="6">
    <Channel ID="LV1" Channel="6" Slot="6" InUse="Yes" I0Set="1.0" V0Set="0" RUp="5" RDwn="5" Trip="0.1" RUpTime="100" RDwTime="100" UNVThr="5" OVVThr="15"/>
  </PowerSupply>
</Devices>

This gives a crash:

[thermal@localhost power_supply]$ ./bin/PowerSupplyController -c aaa.xml -p 7010 --verbose
Port: 7010
I'm initializing with the following configuration file: aaa.xml
Xml config file loaded: No error
Configuring CAEN ...
terminate called after throwing an instance of 'std::runtime_error'
  what():  [344] void CAENChannel::checkAnswer(const CAENHVRESULT&) CAEN SUPPLY ERROR: Value out of range (num. 0x7)
Aborted (core dumped)

After this fix, V0Set=0 is used only if it is allowed. Otherwise the lowest absolute allowed voltage will be used. Eg.

<Devices>
  <PowerSupply InUse="Yes" ID="caen" Model="CAEN" Series="SY4527" Connection="Ethernet" IPAddress="192.168.0.102" Timeout="1" Port="9221" UserName="admin" Password="burnincms" HVSlot="0" LVSlot="6">
    <Channel ID="LV1" Channel="6" Slot="6" InUse="Yes" I0Set="1.0" V0Set="0" RUp="5" RDwn="5" Trip="0.1" RUpTime="100" RDwTime="100" UNVThr="5" OVVThr="15"/>
  </PowerSupply>
</Devices>

and this is the output:

[thermal@localhost power_supply]$ ./bin/PowerSupplyController -c aaa.xml -p 7010 --verbose
Port: 7010
I'm initializing with the following configuration file: aaa.xml
Xml config file loaded: No error
Configuring CAEN ...
int TCPServerBase::accept(bool)Now server accept connections on socket: 3
Edited by Silvio Donato

Merge request reports

Loading