Power Supply Configuration

To be used with this driver the power supply must be configured to use UDP communication.  To allow setpoint changes faster than 40 Hz or so  the network interface in the supply must be configured to use a carriage-return character ('\r', hex 0x0D) as a trigger.   This can be changed from the network interface web server or from the network interface telnet server (port 9999).   The value is set in the ¨Match Bytes¨ field of the web server as shown below.

SerialSettings.png

If using the telnet server to make the change the terminal session will look something like the following.

> telnet 192.168.1.51 9999
MAC address 00204AC47B1C
Software version V6.6.0.2 (080926) XPTEXE

Press Enter for Setup Mode


*** basic parameters
Hardware: Ethernet TPI
IP addr 192.168.1.51, no gateway set,netmask 255.255.255.0
DNS Server not set

*** Security
SNMP is              enabled
SNMP Community Name: public
Telnet Setup is      enabled
TFTP Download is     enabled
Port 77FEh is        enabled
Web Server is        enabled
Web Setup is         enabled
ECHO is              disabled
Enhanced Password is disabled
Port 77F0h is        enabled

*** Channel 1
Baudrate 921600, I/F Mode 4C, Flow 00
Port 10001
Connect Mode : CC
Datagram Type 01
Pack Cntrl:   00
Remote IP Adr: --- none ---, Port 00000


*** Expert
TCP Keepalive    : 45s
ARP cache timeout: 600s
CPU performance: High
Monitor Mode @ bootup : enabled
RS485 tx enable  : active low
HTTP Port Number : 80
SMTP Port Number : 25
MTU Size: 1400
Alternate MAC: disabled
Ethernet connection type: auto-negotiate

*** E-mail
Mail server: 0.0.0.0
Unit       :
Domain     :
Recipient 1:
Recipient 2:

- Trigger 1
Serial trigger input: disabled
  Channel: 1
  Match: 00,00
Trigger input1: X
Trigger input2: X
Trigger input3: X
Message :
Priority: L
Min. notification interval: 1 s
Re-notification interval  : 0 s

- Trigger 2
Serial trigger input: disabled
  Channel: 1
  Match: 00,00
Trigger input1: X
Trigger input2: X
Trigger input3: X
Message :
Priority: L
Min. notification interval: 1 s
Re-notification interval  : 0 s

- Trigger 3
Serial trigger input: disabled
  Channel: 1
  Match: 00,00
Trigger input1: X
Trigger input2: X
Trigger input3: X
Message :
Priority: L
Min. notification interval: 1 s
Re-notification interval  : 0 s


Change Setup:
  0 Server
  1 Channel 1
  3 E-mail
  5 Expert
  6 Security
  7 Defaults
  8 Exit without save
  9 Save and exit            Your choice ? 1

Baudrate (921600) ?
I/F Mode (4C) ?
Flow (00) ?
Port No (10001) ?
ConnectMode (CC) ?
Datagram Type (01) ?
Send as Broadcast (N) ?
Remote IP Address : (000) .(000) .(000) .(000)
Remote Port  (0) ?
Pack Cntrl  (00) ?
SendChar 1  (00) ? 0d
SendChar 2  (00) ?

Change Setup:
  0 Server
  1 Channel 1
  3 E-mail
  5 Expert
  6 Security
  7 Defaults
  8 Exit without save
  9 Save and exit            Your choice ? 9

Parameters stored ...
Connection closed by foreign host.


Adding Caen A2620 power supply support to an application

Several files need minor modifications to use CaenA2620 instrument support in an application.

  1. Add the full paths to the CaenA2620 and ASYN support directories to the application configure/RELEASE file:
    CaenA2620=xxxx/modules/instrument/CaenA2620/<release>
    ASYN=xxxx/modules/soft/asyn/<release>
    where <release> is the release number of of the support.
  2. Add instrument support to application database definition file
    The application database definition file must include the database definition files for the Caen A2620. There are two ways that this can be done:
  3. Add the Caen A2620 and ASYN support libraries to the application
    You must link the CaenA2620 support library and the ASYN support library with the application. Add the following lines:
    xxx_LIBS += devCaenA2620
    xxx_LIBS += asyn
    before the
    xxx_LIBS += $(EPICS_BASE_IOC_LIBS)
    in the application Makefile.

Startup Script Commands

The Caen A2620 driver is configured using the devCaenA2620Configure command:
     devCaenA2620Configure("<L>", "<H>", <FLAGS>, <PRIORITY>)
where the arguments are
  1. The ASYN port name.   This can be any alphanumeric string and is used in subsequent dbLoadRecords commands to associate the records with a particular power supply.
  2. The host information (Internet address and UDP port number) of the power supply.  The factory-configured port number is 10001.
  3. An optional flags argument.  A value of 0 is used if the argument is not present.  If the least-significant bit of  flags is set the driver will inhibit the first status readback (see the description of the $(P)$(R)ReadbackPoll_ record below) after a setpoint update command.   This allows continous setpoint updates without interruption by status readbacks resulting in more deterministic fast control.  The effect is minor in most cases since a setpoint update also reads back the power supply status and updates all the readback records.
  4. The priority at which the worker threads of this driver and the port driver will run.  If missing, a value of epicsThreadPriorityMedium will be used.
The records associated with a given power supply are loaded as follows:
      dbLoadRecords("db/devCaenA2620.db,"P=<P>,R=<R>,PORT=<L>")
You'll have to provide appropriate values for the PV name prefixes (<P> and <R>) and the port name (<L>).

Database

The example database and EDM engineering screen provided as part of this support module prefix all record names with the macros “$(P)$(R)”.  Typically the $(P) macro would expand to a “per-IOC” string and the $(R) macro would expand to a string unique to each of the Caen A2620 power supplies connected to the IOC.  You'll probably want to use the database and screen only as a starting point for developing your own customized versions.

Control Records

Record
Name
Record
Type

Description
$(P)$(R)Enable bo
Turn the supply off/on.
$(P)$(R)Reset
bo
Send a command to reset the latched faults.
$(P)$(R)Setpoint
ao
Write a value to the power supply setpoint and read the status/readback values.
$(P)$(R)SlewControl
bo
Disable/Enable current rate-of-change limiter (20A/s).

Status/Readback Records

Record
Name
Record
Type

Description
$(P)$(R)CurrentRBV ai
Power supply output current.
$(P)$(R)SetpointRBV
ai
Power supply setpoint.
$(P)$(R)OnOffStatus
bi
Power supply On/Off status.
$(P)$(R)HWFaultStatus
bi
Overall fault status.
$(P)$(R)DCunderVStatus
bi
Set when power supply detects DC input is too low.
$(P)$(R)FETovertempStatus bi
Set when MOSFET regulator is too hot.
$(P)$(R)ShuntOvertempStatus bi
Set when shunt is too hot.
$(P)$(R)InterlockStatus
bi
Set when the interlock chain is broken.
$(P)$(R)InputOverIStatus bi
Set when power supply detects excessive input current.
$(P)$(R)Crowbar bi
Set when crowbar has tripped.
$(P)$(R)SlewControlRBV bi Set when rate-of-change limiter is enabled.

All status and readback records are processed after any of the control records are processed.

Other Record

Record
Name
Record
Type

Description
$(P)$(R)ReadbackPoll_ bi
The SCAN field of this record sets the rate at which readback updates are performed.  When this record processes it reads  the status/readback values from the power supply then processes the status/readback records.

Installation and Building

After obtaining a copy of the distribution, it must be installed and built for use at your site.
  1. Create an installation directory for the module. The path name of this directory should end with modules/instrument/caena2620.
  2. Place the distribution file into this directory.
  3. Execute the following commands:
    cd modules/instrument/caena2620
    gunzip caena2620<release>.tar.gz
    tar xvf caena2620<release>.tar
    cd <release>
    Where <release> is the release number of of the CaenA2620 support.
  4. Edit the configure/RELEASE file and set the paths to your installation of EPICS base and ASYN.
  5. Execute make in the top level directory.