COMPASSDCS - LOGBOOK 2006
INSTRUCTIONS
3.2 Firewall in the Linux PC’s for SLiC
4.1 How to manage the Wiener OPC Server for VME crates and Wiener LV PS
4.2 How to manage the rotary switches for Wiener LV PS
5 How to make offline copies of the project
6 How to stop/start the reading of SM2 magnetic field from NMR meter
7 In case of power cut that affects pccompass07
8 How to access pccompass06 or pccompass08/03
9 How to add comments in the COMPASS electronic logbook
10 Reading of DAQ temperatures
Login in the PC where SLiC for this crate is run (see 3.1) as root.
>cd /home/SLiC
>source env.bash
Edit the file configInit.txt and add the necessary lines, following same scheme.
This is necessary only if a new board is inserted in a crate already existing in the config, or if a new crate is included.
If there are many new channels, it may be also necessary to edit configParams.txt and increase the cycle times. There are 3 cycles:
Fast (vMon, iMon, Status)
Medium (readback items: v0, i0, etc.)
Slow (crate parameters like CAENET ID, #channels, etc.)
Generate new config files:
>./generateConfigurations.pl configParams.txt configInit.txt config.txt dimMap.txt
Start SLiC:
>./SLiCApp ./config.txt ./ ./dimMap.txt > /dev/null&
(Or acoording to 3.1 if there is a 2nd SLiC on PC)
In pccompass07 the new channels have also to be added in PVSS.
Identify first which is the SLiC/DIM to which these channels belong. For each SLiC/DIM there is an internal datapoint_fwDimDefaultConfig# (of type _FwDimConfig)
where the mapping ‘SLiC items ↔ PVSS dp elements’ is stored (in ‘client services’ and ‘client commands’ elements).
Check which fwDimDefault is being used as default. For this, go to the Framework directory and edit the script:
>cd /dcs/packages/jcop_fw/scripts/libs/fwDevice
>pico fwDevice.ctl
and search “fwDimDefault”… If necessary, change the default to the one that will take the new channels. Save.
From startConsole, start the control manager fwScripts.lst, so that the new fw default to DIM is used (this script will die after few seconds, which is normal).
Now open the FwDeviceEditorNavigator in vision mode (do not forget to change owner of the UI from the default “operator” to “root” first).
Add the channels under CAEN and the good crate, in the hardware view.
Confirm, from the para module, that the correct fwdimdefaultConfig# now contains mapping for the new channels, in clientServices and client Commands.
If adding channels in a SY527, you must delete by hand, from the para module, the items (.pw) from the list of ClientServices.
Add the new channels also in the logical view, at FwDeviceEditorNavigator.
Go to the scripts directory (> /dcs/home/scripts) and edit the SumAlerts_on_nodes.ctl, and modify as needed in “nodes” and “channels”. Run the script with:
>./runctl SumAlerts_on_nodes.ctl
This is to propagate correctly the sumAlerts to buttons in the panels.
Go to the corresponding project panel and check that the added channels are appearing in the table and updating.
Now put the .isOn alert on the new channels. For this, on a GEDI, open the panel teste_onoffcaen.pnl. Run this panel to propagate the alerts by clicking in the “teste” button.
Now the channels should be correctly displayed and updating. If not, stop and restart the corresponding DimApiManager.
Note: In case of problems, contact Catarina Quintans or Manuel Gonzalez.
In case the OPC Server stops, and one cannot it with DCS:
Go to pccompass06
Check if the OPC manager 8 is stopped or blocked (state 3 - purple color).
In case it is blocked, select the manager and do a "forced kill" with the mouse (right button).
Then, go to task manager, look for:
"ISEGHV~1.EXE" (if you find it, do select and "end process").
Once you have killed the server, the OPC DA client should restart it automatically in few seconds.
· 6 SLiCs exist at the moment, and for each there is a corresponding DIM API manager in PVSS.
When the DIMs are stopped or started, from the DCS panel of the project, there is no effect on the SLiCs – to start or stop SLiCs one must login as “root” in the corresponding linux PC’s, and do it by hand (by killing the SLiC process).
If in pccompass07 CAEN HV tables show the purple color in all fields (v0, vMon, iMon) and if DIMs are running (check in the DCS panel of the project) and dns is running (check in the prompt of a terminal window, with command >ps –ef | grep dns) it probably means that SLiC is stopped.
CAENET#1: BMS_CCR1 – BMS_CCR2 – BMS_CCR3 – BMS_CCR4 – BMS_CCR5 – BMS_CCR6
> ssh –l root pclip05
> cd /home/SLiC
> source env.bash
pclip05 >./ SLiCapp ./config.txt ./ ./dimMap.txt >/dev/null &
CAENET#2: HOD_CCR1 – HOD_CCR2 – HOD_CCR3
ssh for pclip07
pclip07 (and same as for pclip05)
CAENET#3: MWPC_CCR1 – SCIFIG_CCR3 – SCIFIG_CCR1 – SCIFIG_CCR2 – SCIFIG_CCR4
ssh –l root pclip07
>cd /home/SLiC
> source env.bash
>./ SLiCApp ./config2ndSLiC/config.txt ./ ./config2ndSLiC/dimMap.txt
pclip07 >/dev/null &
CAENET#4: GEM_CCR3 – GEM_CCR2 – MWPC_CCR2
ssh –l root pclip06
pclip06 (and same as for pclip05)
CAENET#5: SCIFIJ_CCR1 – GEM_CCR1
ssh for pclip09
pclip09 (and same as for pclip05)
CAENET#6: RICH_CCR1
ssh –l root pclip09
>cd /home/SLiC
> source env.bash
pclip09 >./ SLiCApp ./config2ndSLiC/config.txt ./ ./config2ndSLiC/dimMap.txt
>/dev/null &
Before starting a SLiC, one should delete existing semaphores. For this:
>ipcs
There is a list concerning semaphores, including semaphore ID’s (if there are ≥, first is for 1st card, 2nd for 2nd card)
>ipcrm sem [sem ID]
Before trying to start a SLiC, check if it is not already running, with >ps –ef | grep SLiC
If there was a power cut and SLiC PC went off, after starting it and before a SLiC restart, one must load the PCI – CAENET interface card. For this:
>cd /home/SLiC
> source env.bash
>cd /home/beharrel/project/HSCAENET…/driver
>./a1303_load
Then follow the instructions to start SLiCs
To check what ports are allowed in the present configuration, do (as root):
>more /etc/syconfig/iptables
and you should see a list of accepted ports
If this happens, one should:
Login in pclip06 (or other Linux PC where the problem appears) as root
From a terminal window, start the security configuration program, by doing
>redhat-config-securitylevel-tui
Go to the config option
Allow eth0 and ssh
Explicitly allow ports for PVSS and utpd ports: 4998, 4892, 2506
“Ok” it to exit & saving, and restart iptables and ntpd by doing
>/sbin/service iptables restart
>/sbin/service ntpd restart (at this step, some ntpd “failed” messages appear)
Note: whenever the redhat-config-securitylevel is run, the previous settings are reset and put to 0, so that one can reconfigure.
The DCS project, for the 2006 Run, is controlling 30 Wiener crates scattered in three CAN Buses. For each chain of crates, one client and server have to be run in one independent pc.
The WIENER_CAN1, has 10 Wiener LV PS being controlled for RICH. In this case, the server is the WienerOPCServer2 and OPC DA Client 19, as client. The client and server are running in pccompass06.
15 VME crates, in the DAQ system, were integrated in the WIENER_CAN2, in pccompass08. The server is the WienerOPCServer and their client is the OPC DA Client 11.
For the third chain, WIENER_CAN3 has 4 power supplies connected. The OPC DA Client manager 20 and the WienerOPCServer3 are running in pccompass03.
On the whole, we have:
CAN Bus |
Client |
Server |
PC |
WIENER_CAN1 |
OPC DA Client 19 |
WienerOPCServer2 |
pccompass06 |
WIENER_CAN2 |
OPC DA Client 11 |
WienerOPCServer |
pccompass08 |
WIENER_CAN3 |
OPC DA Client 20 |
WienerOPCServer3 |
pccompass03 |
All output voltages can be adjusted manually via the two rotary switches situated on the power supply top.
|
|
Having this into account, one example, using ID4, is showed:
A – 4
B – 0
C – F
D – 7
E – 4
· Login in pccompass07 as compassdcs
>cd /dcs/projects
The DCS project is the contents of the subdir “compassdcs”.
Start a project administration PVSS console:
startPA
Select the project we want to stop (“compassdcs”) and use the red semaphore to stop it. When the status of the project will be “not running”, close the PVSS admin console
>ps –ef | grep pvss
This command must answer nothing (except for the “grep PVSS” issued), proving that no more PVSS processes are running.
>ps –ef | grep lm
Usually the PVSS locker is not killed when PVSS stops (bug). If this command answer with a line: “500 [id] 1 0 [time]? [time] /dcs/pack…/lm-ip –a lockmgr” you must kill this process by hand:
>kill [id]
Issue the ps command again, to be sure the locker was killed.
In the following directories, remove old versions of files:
/dcs/home/panels
/dcs/home/panels/objects
/dcs/home/log
By issuing the command (when inside the given directory:
>rm *.*.bak (the “.bak” is essential! Do not delete all the content of the dir by mistake!!!)
>cd /dcs/projets
>gtar --atime-preserve –cvf comp07-copy09june2006.tar compassdcs/*
>gzip comp07-copy[date].tar
mv comp07-copy[date].tar.gz /dcs_Backup/offline_backups/
Restart the PVSS project from the admin console. Check in the project console that all the important managers are started (some important ones may be in “manual” start mode).
Start a dcsUI , go to the DCS panel, and start the remote OPC’s and DIM’s.
This concerns the reading of the magnetic field from SM2, that can be viewed in the DCS from the "Magnets button".
The NMR meter is in the control room, after the DAQ computers. It is connected via RS232 (serial) to pccompass07.
A "USB to serial" adaptor is used in the PC the reading is done from port /dev/ttyUSB0
the program to read from the port is in the directory:
/dcs/packages/compass/nmr/bpi
and is called readout_NMR. this program must be running at all times (during Run) in compass07.
Check if the program is running with the command:
>ps -ef|grep readout
This program runs interactively, in a virtual scream. To enter the virtual screen (readout), do:
>screen -r
By doing this, you regain the view of the virtual screen. You should see the program printing text to the screen, with a new value every few seconds.
To detach from the virtual screen, do: ctrl -a d
Do not logout before detaching from the virtual screen first. It would kill the program.
In case the program is stopped: as "compassdcs" do:
Reattach to the screen with >screen -r, if it still exists. If not, type simply >screen
You should see the prompt in the virtual screen. Then type:
>./readout_NMR
The program starts running
Detach from the virtual screen with ctrl -a d
Logout from "compassdcs" and eventually login again as "dcs" for normal operation
On the PVSS side, start the manager PVSS00nmr from the console
Check that the values in the "Magnet" panel start updating
· Switch on the PC
Login as “compassdcs” and start the DIM NAME SERVER
>cd /dcs/packages/dim/linux
>dns &
Also from terminal window:
startConsole
user: root
pw: as for system superuser
It enters the “compassdcs” project. Start the project from the green semaphr on top.
Check that all the important managers are started:
data
event
archive0
archive6
archive7
archive8
archive9
archive10
archive11
simulation1
control1 (pvss_script.ctl)
dim1
dim2
dim3
dim4
dim5
dim5
dim6
control compass_survey.ctl
control smsTrigger.ctl
control hvhtsConGuard.ctl (hvChIsOnGuardian.ctl)
control SetTime.ctl
Once the project is started, close all windows, logout, login again as “dcs” → pw as old onl.
From a terminal window, do > dcsUI, with PVSS login “operator” (without password)
Go to the “dcs panel” in the project, start all the OPC managers, and DIMs if not yet started.
· If you are in a Linux PC, you can either:
Login to a compass gateway (pccogw01 or pccogw02) with you afs account. From there launch: (ex: rdesktop pccompass06)
The other possibility is to connect to na58pc014 (pc in the office). From there, open putty and load the session your want (pccompass06 or pccompass08 / 03). This will open a tunel between your connection and the pc you want to log in (this is needed because na58pc014 is not in the compass domain. After that, open a remote desktop and connect to:
“localhost: 6001” (for pccompass03)
“localhost: 6001” (for pccompass06)
"localhost: 6002" (for pccompass08)
· Log in to the COMPASS gateways (pccogw01 or pccogw02) with your personal afs account
· Set command: ssh -l daq pccorc01 (no password required)
· Set command: add_comment (this will launch an application)
· In the X application fill the required field with
your name
detector (choose slow control from the listbox)
write comment
submit
· A DIM server is running in a DAQ machine, and sending data to compass07
· The DIM api manager for this reading is -num11
· To check if the values are updating, go to the panel "DAQ" and "Temperatures"