File:slow_mpc.html
Moller Polarimeter Slow Control
The Moller Polarimeter Control program (MPC) have been crated to control
Moller Detector Settiing, Colimator and Slide Position, High Voltage Setting
and monitoring of the Epics Variables and Moller Target Status over
network using TCP/IP connection. It has GUI (Main Window) to show
applications for control or monitoring and runs server on port 5773 that
accepts external requests.
Every application can be started as stand-alone program.
There are few scripts located in ~/Java/msetting/ to start applications:
- einfo - to start Epics Monitor program;
- mhv - to start High Voltage Control program;
- ms - to start Moller Detector Setting program;
- motor - to start Motor Control program;
The configuration parameters to start application are defined inside scripts.
There is no server when applications runnning alone.
Start MPC program
To start MPC programm there is script with name "mpc".
After login with moller account change directory to
~moller/Java/msetting and type "mpc".
Properties file
The MPC program has configured by using properties file that located in the
user directory with name "MPC.props".
This file stored names of application configuration files.
Properties file is loaded to MPC program when it is started.
The file has next format(example):
#Moller Polarmeter Control Configuration
#Thu Feb 06 18:01:14 EST 2003
config.file4=config5
config.file3=/home/moller/Java/msetting/motorControl.config
config.file2=/home/moller/Java/msetting/hvControl.config
config.file1=/home/moller/mpset
config.file0=/home/moller/Java/msetting/epicsMonitor.config
server.port=5773
app.names=Epics\ Monitor\:Detector\ Setting\:High\ Voltage\ Control\:Motor\ Control\
:Target\ Monitor\:
Where,
app.names - names(title) of applications separated by ":" symbol;
server.port - port number of the MPC server;
config.fileN - full name(with path) of the configuration file for corresponded application;
Main Window
Main Window shows Menu Bar, and Status Window.
Menu bar includes next menu items :
'File', 'View' , 'Help'
'File' includes following items:
-
'Quit' - to exit from program with confirmation
'View' includes follows menu items:
-
'Epics Monitor' - to open new window
with table, that shows information gathering from Epics using cdevGateway server.
To start cdevGateway server login on 'adaqs2' and type "cdevGatewayStart".
The cdevGateway server port for connection is set now to 9573.
The parameters to start of this application stored in configuration file that
has next format:
gatewayhost=adaql1 - name of the host where cdevGateway server is running ;
gatewayport=9573 - port number of cdevGateway server;
epicslist=/adaqfs/home/moller/daq/coda2/RunInfo/epics.list - file with list of names
and comments of epics variables;
The full name(with path) of configuration file stored in poperties file that located in user directory with name "MPC.props".
The configuration file name placed after property "config.file0".
-
'Detector Setting' - to open new window
with panels to control and setting parameters of the Moller Detector Electronic
Modules that installed in CAMAC crate over network using connection to the server.
Server runs on the VME CPU. The VME server port for connection is set now to 5222.
The parameters to start of this application stored in configuration file that
has next format(example):
# Date 04:57:29 PM Feb 11, 2003
# hostname:port
hallavme5:5222
#
Module: LeCroy-2365
Name : PLU Module
Slot : 11
CTR 0
#channel andBits orBits Not Logic
0 4105 0 1 not(not(0)+not(3)+not(12))
1 4114 0 1 not(not(1)+not(4)+not(12))
2 4123 0 1 not(not(0)+not(1)+not(3)+not(4)+not(12))
3 6226 0 1 not(not(1)+not(4)+not(6)+not(11)+not(12))
4 4128 0 1 not(not(5)+not(12))
5 5120 0 1 not(not(10)+not(12))
6 6145 0 1 not(not(0)+not(11)+not(12))
7 4097 8192 1 not(not(0)+not(12)+(13))
#
Module: TD8000
Name : LedDiscriminator
Slot : 2
WIDTH 32
#channels 1 2 3 4 5 6 7 8
MASK 0 0 0 0 0 0 0 0
THRESHOLD 39 39 80 80 80 900 900 900
#
Module: LeCroy-4518
Name : Delay Line
Slot : 6
#channels 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
DELAY 6 6 2 18 18 2 2 2 26 2 2 2 26 26 26 26
The full name(with path) of configuration file stored in poperties file that located in user directory with name "MPC.props".
The configuration file name placed after property "config.file1".
-
'High Voltage Contol' - to open new window
with panels to control and setting parameters of the High Voltage Mainframe type of
LeCroy-1450 over network using connection to the portserver and telnet protocol.
The parameters to start of this application stored in configuration file that
has next format:
hvHost=hatsv5 - hostname of telnet portserver;
hvPort=2011 - port number of telnet portserver;
login=user - login name for telnet protocol ;
passwd=xxxxx - password for telnet protocol;
slots=S5 S6 - slot numbers to control(slot #5 and slot #6 in this examle);
dataDir=/home/moller/daq/coda2/ - path where files with voltage settings are stored.
The full name(with path) of configuration file stored
in poperties file that located in user directory with name "MPC.props".
The configuration file name placed after property "config.file2".
-
'Motor Control' - to open new window
with panels to remotely control of 2 elements: collimator and slide.
- Collimator at the dipole enterance consists of 2 lead
(or some other heavy material) bricks in each arm. The distance
between the bricks is adjustable in a range of about 2-40mm.
The collimators in both arms are moved at the same time,
leaving a horizontal slit.
- Slide is a movable platform positioned between the dipole
and the detector box. It is used to test detectors. The detectors can
be attached to this platform.
Both the collimator and the slide can be moved remotely using stepping
motors controller "VELMEX-NF90".
The parameters to start of this application stored in configuration file that
has next format(it is one line for one motor to control):
Title HostName Port Motor# Acceleration Speed MinRange(steps) MaxRange(steps) PosCoeffi
cient(steps/mm) LastPosition(steps)
Where,
Title - is the name and title of control panel;
HostName - is the name of the telnet portserver;
Port - is port number of the telnet portserver for connection;
Motor# - is the name of the motor to control (example: 1M);
Acceleration - is value of acceleration parameter (type: long; range: 1 to 50);
Speed - is value of speed parameter (type: long; range: 1 to 6000);
MinRange - is minimum absolute value of position in steps(type: long);
MaxRange - is maximum absolute value of position in steps(type: long);
PosCoefficient - is coefficient(steps/mm) to recalculate position from steps to mm(type: float);
LastPosition - is last stored absolute value of position in steps(type: long);
Example for two elements: Slide and Collimator:
Slide hatsv12 2003 1M 5 1000 0 128350 633.3 0
Collimator hatsv12 2002 1M 2 20 0 10000 250.0 2500
The full name(with path) of configuration file stored
in poperties file that located in user directory with name "MPC.props".
The configuration file name placed after property "config.file3".
'Help' shows help file.
MPC Server
External requests.
To communicate with MPC Server the program 'mpcclient' is used.
This program gets as parameters the hostname(where MPC server is running), portnumber and
message for sending to the MPC Server:
mpcclient hostname portnumber 'message to send'
For example, next command send command message "GET EPICSINFO" (get
information from Epics) to the MPC Server that runs on adaql1 host:
mpcclient adaql1 5773 'get epicsinfo'
The command message is string with ASCII characters. The
format of this command message is follows:
<command> - command word to server, one
of follows :
GET - get values of <property>.
This command valid only for next values of <properties>
:
EPICSINFO - get epics information;
DETECTORINFO - get current detector settings;
Updated: 18 Aug 2004