High Voltage Control Applications

From GlueXWiki
Jump to: navigation, search

CAEN SY 1527 based High Voltage Control

CAEN SY 1527 Hardware Configuration

I used an relatively old CAEN SY1527 chassis which was used for the magnetic field tests in the Test Lab during the Hall D solenoid tests. It has two 1535N cards in it and one A1532 card. We started with the firmware version 2.00.02, and upgraded to 3.01.05 using flash sent to us by CAEN. To be able to control it we have to manually assign it its IP address after obtaining it from the Computer Center.

CAEN SY x527 EPICS Driver from Canadian Light Source

We sent an e-mail to Ru Igarashi asking him for his EPICS driver for SYx527 CAEN HV chassis. He sent us a tar ball with what he currently had, plus a User's Guide. It is not clear how much effort Ru will be putting into this project. He says that:

  • It is not a full implementation of the available controls, lacking crate-wide and board-wide control.
  • I haven't had time to eliminate a bug that causes the controls to lose communication with the crate

It is also apparent that some of the functionalities that were implemented need improvements, some of the parameters are hardcoded in the source files. So, if we want to use this driver, we will need to evaluate it, identify the problems, fixed them and add more control features. like board and crate-wide functions.

We took Ru's tar-file and adopted his source code and his EPICS database to our current EPICS scheme. We also used his EDM screens to evaluate the driver for the first time (automatic conversion to BOY OPI failed). The driver connected to our test SY1527 chassis and the EPICS records seemed to work. To start an IOC for a single SY1527 chassis with debug level = 0 we need to issue the following command:

harpo:iocharpo> ./hvCAEN.cmd -c admin@halltesthv.jlab.org  -D 0

We can also use multiple chassis by listing them on this command line. All chassis will assume single (username, password) combination which is at this point is hardcoded in the source of the EPICS driver.

On driver initialization we get a lot of messages
 CAENHVGetCHParamProp(): Param Not Found (22)
but otherwise the application seems to work fine at the first glance.

Both the EPICS support and the application adjusted for our framework has been checked in into Hall D SVN repository. The applications, the database configuration with the Makefile will need a lot of modification. The example application was loading just a single board in one DB file using MSI EPICS extension for template substitutions.

CAEN SY 1527 EPICS Driver from Hall B

Hall B also developed EPICS support for CAEN SY1527 HV chassis. It has been extensively used for CLAS. It can be considered as a fallback to CLS EPICS support if for some reason it turns out not to match Hall D needs.

CAN-bus-based Controls of the FCAL PMT bases

CAN-bus Hardware Configuration

AnaGate CAN quattro module

This is a CAN-bus to Ethernet bridge that Indiana University have chosen to use to control the bases via Ethernet. Matt is buying all these modules for us.

Here are the steps to set up an AnaGate module:

  1. Obtain an IP address for the module based on the MAC address which is provided on the bottom of the device.
  2. Plug in into a small local switch, and also connect a computer to that switch using a local static IP address configuration. AnaGate module is factory-configured in static IP mode as (,, .
  3. Start a browser on the computer and navigate to the AnaGate module's web server at and configure it for DHCP by checking the IPSetttings->DHCP check-box and save the setting.
  4. The DHCP-based network configuration should be complete at this point and the device should show up on the JLab's network. Note that you will need to reset your computer to the same subnet as the AnaGate device and reset the power to the the small switch if you want to keep both device on that switch.

CAN-bus-based EPICS Driver for Hall D

Considerations and Requirements

  • The hardware/firmware is going to be slow when responding to requests to read parameters. A request to read an ADC seems to take 350 msec, and according to Dan Bennett it will take about 1 second to 1.5 second if we have 100 bases on a single CANbus.
    • After upgrading the firmware on the boards the readback time became much smaller, ~20ms. This was apparently due to removing the red LEDs flashes on the boards.
  • The FCAL group is not very concerned about the speed, scanning with a period of 30 second should be fine.
    • After the upgrade I could scan one bus with two bases well under a second.
  • The ramping rates will not be adjustable, it is set in the hardware and will not change.
  • The IU group will try to implement trip current in the firmware checking the current ADC versus the set-point when the micro-controller is idle.

Installation of the EPICS device support

The source code for the EPICS device/driver support is in the Hall D software repository : https://halldsvn.jlab.org/repos/trunk/controls/epics/app/hvIU/. It is created with usual EPICS makeBaseApp.pl script. First one needs to check out the source code from SVN:

svn co https://halldsvn.jlab.org/repos/trunk/controls/epics/app/hvIU</i>
Assuming you are in the top directory where you keep your EPICS support packages, go to <i>hvIU</i> directory, then build the libraries 
cd hvIU;

This should install the libraries in hvIU/../lib/$EPICS_HOST_ARCH directory. this will also install baseIU.dbd into hvIU/../dbd directory.

Installation of the application to control IU bases

The code of the application to control IU HV bases is located in the Hall D software repository, which is the common application for all types of HV chassis in Hall D: https://halldsvn.jlab.org/repos/trunk/controls/epics/app/hvChassis/ Assuming you are in the top directory where you keep your EPICS applications, go to hvChassis directory, then build the libraries

cd hvChassis;

This should install the IOC executable in hvChassis/../bin/$EPICS_HOST_ARCH directory. It will also install the EPICS DB files into hvChassis/../db directory.

Running the application to control IU bases

To manually start the IOC for IU bases go to $IOC/your_ioc_name . There you need to have a script that launches the executable for IOC, loads the DB files and initializes the IOC. And example of such setup can be found at :


To launch the IOC in this example one simply types: