Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

EPICS Power Monitor and Control Instructions in Group C lab

Instructions to run on hpstracker in group C

The epics setup for HPS has been checked to run on the zed board but is developed mainly on the hps tracker machine in group C. 

The development is based from the standard epics_example at:

/home/tracker/pelle/epics/example

and is currently on github under user "perhansson" and project name "svt-epics"

 

...

MPOD power supply control
Start IOC

Setup EPICS environment (part of the DAQ setup script):

$ cd /u1/software/software_new

$ source setup_env.csh

Go to the MPOD App IOC boot directory:

Login to ppa-clnrm01 (user "tracker") and open a terminal

$ $ cd /home/tracker/pelle/epics/svt-epics/example/iocBoot/iochvCaen/

...

svt-mpod-epics/

$./svt-voltages.cmdrun_ioc

This should run the epics hvCaenApp IOC and you should see output to the screen. Depending on the debug level (see below) there might be lots of output here.Open up the GUIs according to the instructions below

...

Hybrid power control

...

Start IOC

Setup EPICS environment (part of the DAQ setup script):

$ cd /u1/software/software_new

$ source setup_env.csh

Start the IOC

$ cd /home/tracker/pelle/epics/svt-epics/example/iocBoot/iocmyexampleApp

and monitoring
Login to ppa-pc91245 (user is your normal slac account) and open a terminal

$ cd /u1/epics/svt-epics/svt-daq-epics

$./run_ioc$./st.cmd

This should run the epics IOC and you should see output to the screen where it queries the socket for information. Depending on the debug level (see below) there might be lots of output here. If there is no control server running or it's not configured properly (see below) you should see it retrying to connect. 

2. Setting up the control server

Power the FEB according to instruction below with GUIs or manually.

Start the control server and GUI

$ cd /u1/software/software_new

$ source setup_env.csh

./bin/frontEndTestGui &

If the IOC is running (if not start it) you should see that the IOC now gets information from the control server. 

NOTE: if you don't see a connection you might need to change the TCP/IP settings  in the dedicated GUI.

Power control GUIs
Setup MEDM environment (part of the DAQ setup script):

$ cd /u1/software/software_new

$ source setup_env.csh

Go to the SVT MEDM directory:

Change the debug level using "mySubDebug" in "example/iocBoot/iocmyexampleApp/st.cmd ".

 


Start GUIs

Login to ppa-pc91245 (user is your normal slac account) and open a terminal

$ cd /u1/epics/svt-$ /home/tracker/pelle/epics/svt-medm

Start ALL GUIs using scripts:
$ ./runSVTGUIs.sh - 

Individual GUIs can be opened with

$ medm

:
$ source ./setup_epics.csh
$ medm gui-name.adl & (if you don't add -x it will open in edit mode and you'll have to hit "execute" in one of the windows popping up.

1. Power the flange using flange "hps_svt_FLLV_all.adl" GUI
2. Power the FEB using "hps_svt_FELV_all.adl" (DIGI first)
3. Configure the FEB
4. Control hybrid power from "svtStatusPS_latest_onoff_control.adl"

 

Notes on the hybrid power: 
  • The update frequency need to be tuned, sometimes it can take 1-2s before values are updated.
  
  •   
  • If the DAQ GUI (actually the server) dies and you restart the GUI's may not reflect the new state. For example the GUI's may say ON when channel is OFF. You can press OFF and then ON in that case to sync up manually. Working on a fix for this. 
Development
Changing debug output for hybrid IOC
The debug level for the subProcess (essentially stuff in myexampleApp/src/dbSubExample.c) is controlled by "int mySubDebug". (0=least output)
This can be controlled from the IOC startup script /home/tracker/pelle/epics/example/iocBoot/iocmyexampleApp/st.cmd  by changing line:

var mySubDebug 0

The debug level for some of the low-level SVT code is controlled by "int client_util_debug" which is in myexampleApp/src/client_util_debug.c 
Hybrid IOC development

Compiling source and DB

$ cd /home/tracker/pelle/epics/svt-epics/example/myexampleApp

$ make

Interesting files for development:
EPICS Db: /home/tracker/pelle/epics/svt-epics/example/myexampleApp/Db/
dbSVT.db: controls the polling from the control server
dbFebTemp.db: FEB temperature records
dbHybLV.db: hybrid low voltage records
dbHybT.db: hybrid temperature records

...

 
Instructions to change sense usage on MPOD

Slot and channel map

Slot

Channel

snmp name

 

0

X (0-7)

outputUserConfig.uX

 

Y (1-N)

X (0-7)

outputUserConfig.uY0X

 
 

Sense command:
2: use sense for output with medium length cables.
8: do not use sense lines at all

 

Example below for channel 0-3 on card in slot 0.

# enable ramp down; use sense for regulation; moderate regulation speed (cable length between 1 and 30 m); ignore external inhibit
snmpset -v2c -m +WIENER-CRATE-MIB -c guru ppa-mpod1 outputUserConfig.u0 i 2
snmpset -v2c -m +WIENER-CRATE-MIB -c guru ppa-mpod1 outputUserConfig.u1 i 2
snmpset -v2c -m +WIENER-CRATE-MIB -c guru ppa-mpod1 outputUserConfig.u2 i 2
snmpset -v2c -m +WIENER-CRATE-MIB -c guru ppa-mpod1 outputUserConfig.u3 i 2
Below is the definition of the decimal number ('2' in the example above). 
outputUserConfig OBJECT-TYPE
    SYNTAX  Integer32 (0..15)
    MAX-ACCESS  read-write
    STATUS  current
    DESCRIPTION
            "Definition of user-changeable items.
             A bit field packed into an integer which define the behavior of the output channel.
             Usable for WIENER LV devices only.
             The position of the bit fields in the integer value are:
             Bit 0:    Voltage ramping at switch off:
                           0: Ramp down at switch off.
                           1: No ramp at switch off (immediate off)
             Bit 1, 2: Set different regulation modes, dependent on the
                           cable inductance:
                                       0: fast:     short cables, up to 1 meter.
                                       1: moderate: cables from 1 to 30 meter.
                                       2: slow:     cables longer than 30 meter.
                                       3: slow (identical to 2, should not be used)
             Bit 3:    Internal sense line connection to the output (MPOD only):
                           0: The sense input at the sense connector is used
                              for regulation.
                           1: The output voltage is used for regulation.
                              Any signals at the sense connector are ignored.
             Bit 4:    External Inhibit input.
                           0: The external inhibit input is ignored.
                           1: The external inhibit input must be connected to
                              a voltage source to allow switch on.
             Community required for write access: guru.
            "
    ::= { outputEntry 37 }