Difference between revisions of "High Voltage Control Applications"

From GlueXWiki
Jump to: navigation, search
(CAEN SY x527 EPICS Driver from Canadian Light Source)
(CAEN SY 1527 EPICS Driver from Hall B)
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
= CAEN SY 1527 based High Voltage Control =
 
= CAEN SY 1527 based High Voltage Control =
  
== CAEN SY 1527 Hardware Configuration ==  
+
== 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 ==  
 
== CAEN SY x527 EPICS Driver from Canadian Light Source ==  
Line 12: Line 13:
  
  
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. On driver initialization we get a lot of messages  
+
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:
<pre> CAENHVGetCHParamProp(): Param Not Found (22)</pre> but otherwise the application seems to work fine at the first glance.  
+
 
 +
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 <pre> CAENHVGetCHParamProp(): Param Not Found (22)</pre> but otherwise the application seems to work fine at the first glance.  
  
  
Line 22: Line 27:
 
== CAEN SY 1527 EPICS Driver from Hall B ==  
 
== 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.
  
 
<br/ clear="all">
 
<br/ clear="all">
 
  
 
= CAN-bus-based Controls of the FCAL PMT bases =
 
= CAN-bus-based Controls of the FCAL PMT bases =
Line 30: Line 37:
  
 
== CAN-bus Hardware Configuration ==
 
== CAN-bus Hardware Configuration ==
 +
 +
=== AnaGate CAN quattro module ===
 +
 +
This is a [[media:AnaGateCANquattroManual.pdf | 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:
 +
 +
# Obtain an IP address for the module based on the MAC address which is provided on the bottom of the device.
 +
# 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 (192.168.1.254, 255.255.255.0, 192.168.1.1) .
 +
# Start a browser on the computer and navigate to  the AnaGate module's web server at 192.168.1.254 and configure it for DHCP by checking the IPSetttings->DHCP check-box and save the setting.
 +
# 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.
  
  
Line 36: Line 54:
 
== CAN-bus-based EPICS Driver for Hall D ==
 
== 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.
 +
 
<br/ clear="all">
 
<br/ clear="all">
 +
 +
=== 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 <i>makeBaseApp.pl</i>
 +
script. First one needs to check out the source code from SVN:
 +
<pre>
 +
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
 +
<pre>
 +
cd hvIU;
 +
make;
 +
</pre>
 +
This should install the libraries in <i>hvIU/../lib/$EPICS_HOST_ARCH</i> directory. this will also install <i>baseIU.dbd</i> into <i>hvIU/../dbd</i> 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 <i>hvChassis</i> directory, then build the libraries
 +
<pre>
 +
cd hvChassis;
 +
make;
 +
</pre>
 +
 +
This should install the IOC executable in <i>hvChassis/../bin/$EPICS_HOST_ARCH</i> directory. It will also install the EPICS DB files into <i>hvChassis/../db</i> 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 :
 +
https://halldsvn.jlab.org/repos/trunk/controls/epics/app/iocBoot/iocsomov-l1/hvChassis.cmd
 +
To launch the IOC in this example one simply types:
 +
<pre>
 +
./hvChassis.cmd
 +
</pre>

Latest revision as of 00:24, 12 February 2012

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 (192.168.1.254, 255.255.255.0, 192.168.1.1) .
  3. Start a browser on the computer and navigate to the AnaGate module's web server at 192.168.1.254 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 
<pre>
cd hvIU;
make; 

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;
make; 

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 :

https://halldsvn.jlab.org/repos/trunk/controls/epics/app/iocBoot/iocsomov-l1/hvChassis.cmd

To launch the IOC in this example one simply types:

./hvChassis.cmd