- Table of contents
- Purity Monitors - Experts And Interested Parties
- The Purity Monitors and their PC
- Current operation
- The network configurations
- Starting the DAQ
- Making a measurement
- Current Settings
- Getting and Building the DAQ Code
- Script to restart Dropbox on Windows
- Sending Data to the Slow Controls
- Daily Plots
- Plotting scope traces
- Other Items
Purity Monitors - Experts And Interested Parties¶
The Purity Monitors and their PC¶
The three monitors are operated by three Windows PCs. The purity monitor, its number, and its PC are listed here:
- 0: Short monitor, controlled by the PC puritymondaq1 in rack PM-R1
- 1: Long monitor, controlled by the PC ppd-120300 in PM-R2
- 2: Inline mointor, controlled by the PC ppd-124374 in PM-R3
To access the three PCs you'll need a Windows FERMI domain account and user accounts on the PCs above. The accounts can be obtained via a service desk ticket. To get user accounts on the PCs, contact Ben.
The other prerequisite needed to send data to the iFix historian is access to write to the folder ImportFiles on the Windows PC ppd-120854. Contact Mark Knapp to get access.
As of May 17, 2016, only the short and long monitors are operating. Of the two, the long monitor is the most trustworthy. The inline monitor is present in the inline vessel. The inline vessel sits just after the filters, the argon is very pure right there. The inline vessel though is normally not filled however as it's difficult to keep argon flowing through it. For this reason, the inline is normally not run.
The network configurations¶
The three purity monitor PCs all have wired network connections to the MicroBooNE-Site-General subnet of 18.104.22.168/27, subnet mask of 255.255.255.224. Their default gateway and DNS are 22.214.171.124 and 126.96.36.199 respectively. The IP addresses are static and assigned as follows:
- puritymondaq1: 188.8.131.52
- ppd-120300: 184.108.40.206
- ppd-124374: 220.127.116.11
Starting the DAQ¶
To begin a run, click the "Start menu", select "All Programs", select "PurityMonDAQ", and then "PurityMonDAQ". The following window will then appear:
- Select the purity monitor you want by checking the needed box under the PrM label. Here it is 0. Remember, each PC has its own monitor. Only one box should ever be checked.
- Enter the "Interval (Min)" or time between measurements. Set it for one hour or 60 minutes.
- Select "Copy to Dropbox" if that's desired. The plots that show up in the logbook depend on this. Only do it if you are signed into Dropbox and are invited to the shared PrM_Log directory.
- Select "Send to iFix" to copy data to the iFix historian. Only do this if you have write access to the ppd-120854 machine's ImportFiles directory.
- Click "DAQ Stopped - Press to Start DAQ" to let it go.
- The DAQ will now run autonomously without human intervention.
You might notice the DAQ program freezing while taking data. That is normal as the digitizer card is capturing traces. After about a few moments, it'll return.
Making a measurement¶
When taking a measurement, a few steps are take. I've outlined them below:
- The DAQ turns the flash-lamp on for the purity monitor, leaving the HV off
- The DAQ then takes 400 noise traces to be averaged
- 25 traces are taken at a time, this is a limit of memory on the digitizer card
- Every 50 traces, the DAQ is paused and everything is turned off, this prevents hardware timeouts
- The flash-lamp is left on while the HV is turned on, signals from the photocathode and anode from drifting electrons should be present now if the argon is pure enough
- The DAQ then takes another 400 traces to average for signal
- As with the noise, 25 traces are taken at a time
- Every 50 traces, the DAQ is paused and everything is shut off
- After the signal traces are taken, everything is turned off
- The QA/QC and lifetime calculations are then carried out
The HV applied to the anode and cathode are a changeable parameter. The current settings are as follows:
- 0: Short monitor, controlled by PM-R1 rack, V_a = 2.250 kV, V_c = 202.5 V
- 1: Long monitor, controlled by PM-R2 rack, V_a = 1.5 kV, V_c = 50 V
- 2: Inline monitor, controlled by PM-R3 rack, V_a = 5 kV, V_c = 100 V
The HV is controlled by the Drogie HV supplies, one for negative HV and the other for positive HV. To check the HV, you'll need a multimeter set to measure DC voltage. On the Automation Module in the NIM bin, set the switch on it from "Remote" to "Local". This fires the flash-lamp and turns the HV on. On the Electronics Module, also in the NIM bin, locate the red pick point labeled "Anode HV". This will tell you the anode HV. As it's labeled, the voltage you read here is stepped down by a factor of 10,000. On the same module, there is a pick point for "Cathode HV". This will tell you the HV on the cathode. This is stepped down by a factor of 1,000.
The flash-lamps are set to operate at 5000 mJ and 2 Hz.
Getting and Building the DAQ Code¶
The language and IDE¶
The DAQ code is written using Microsoft Visual Basic .NET via the Visual Studio 2015 Community Edition IDE. Visual Studio 2015 Community Edition is free to download and use. You can find it to download here. You'll likely need to register it at some point. Registering is free though. The IDE is currently installed on the puritymondaq1 PC. I recommend doing all development there.
The code is stored in a Git Redmine repository here. To grab the code, install a the git client here. The installation of the git client will be a little different from the default. I recommend following the directions here. You'll need plink and an active kerberos ticket (more on this below). I got this working with the Git Gui. Getting the code and checking in changes is a little confusing to me still. Hopefully the directions will be improved over time.
To clone the repository, use this:
git clone ssh://email@example.com/cvs/projects/uboone-purity-monitor-daq
To clone the repository via ssh (you want to do this), you'll need the RSA key for the cdcvs.fnal.gov server. To do this, open up good old PuTTY. For "Host Name (or IP address)", enter cdcvs.fnal.gov. Make sure "Connection type" is SSH. Hit "Open", say yes to accepting the RSA key. Now the PuTTY session can be closed. You should now be able to clone the repository with ssh.
Getting an active kerberos ticket¶
In order to commit to the repository, you'll need an active kerberos ticket. I recommend using MIT Kerberos for Windows here. On puritymondaq1, this is already installed. You'll want to grab a ticket for username@FNAL.GOV.
Building the code¶
Go to where you chose to clone the git repository at and open the PurityMonDAQ.vproj file with Visual Studio. The code is easy to build, select the "Build" drop down menu and select "Build PurityMonDAQ". The code will build now. You can also create an installer by selecting "Publish PurityMonDAQ" in the "Build" menu. This is recommended over constantly copying over the executable itself.
In order to run the code that you have built, run the included script "PrM_Setup.ps1". You can do this by right-clicking it and selecting "Run with PowerShell". That will setup the preferences and log directories.
Script to restart Dropbox on Windows¶
Occasionally the Dropbox.exe program will crash and need to be restarted. There is a simple command which can be put into a *.cmd batch file to restart it if it is not running. The command to check and restart is is:
tasklist /nh /fi "imagename eq Dropbox.exe" | find /i "Dropbox.exe" > nul ||(start C:\"Program Files"\Dropbox\Client\Dropbox.exe)
Sending Data to the Slow Controls¶
The DAQ program sends data from the measurements to the slow controls. In particular, the data is sent to ubdaq-prod-smc. This is done by sending variables via raw TCP connection.
Each of the purity monitor PCs can only send data for the purity monitor that it controls. The scheme is (I've also listed the IP addresses for the DAQ PCs):
- puritymondaq1/18.104.22.168 for PrM0
- PPD-120300/22.214.171.124 for PrM1
- PPD-124374/126.96.36.199 for PrM2
Every eight hours, plots from the long purity monitor, PrM1, are posted automatically to the ELog. This can be done from the DAQ gateway machines, ubdaq-prod-ws01 or ubdaq-prod-ws02. The code to make the plots appears in the git repository here. The repository can be checked out via the usual command:
git clone https://gitlab.com/bcarls/purityMonAnalysis.git
The script that makes the plots is make_daily_purity_plots.sh. To run it, simply supply the number of the monitor you wish to plot. For the long monitor it's:
If you attempt to run the script, you'll notice that it fails due to an incorrect username and password. We're trying to keep the password sort of hidden.
The directions to get the password stuff setup is long. I've made a special page for it here.
To setup the crontab, do this:
Configure it to look like this:
MAILTO=yourEmail 0 0 * * * /home/userName/purityMonAnalysis/make_daily_purity_plots.sh 1 0 8 * * * /home/userName/purityMonAnalysis/make_daily_purity_plots.sh 1 0 16 * * * /home/userName/purityMonAnalysis/make_daily_purity_plots.sh 1
Replace userName with you user name and yourEmail with your email. With the MAILTO set, you'll be getting an email every time the command runs.
Plotting scope traces¶
The scope traces are saved on each PC in the directory: C:\PrM_Data_and_Pref as text files. To plot the traces, the needed code accompanies the purityMonAnalysis repository mentioned above. Open up the ROOT macro run_PlotScopeTraces.C in your favorite text editor. It should be obvious from looking at the code how to plot them.
Flash-lamp is not firing¶
Sometimes the flash-lamp can get into a funny state and will not fire or offer the full range of configurations. This could result from events such as a power outage. If this happens, try following the flash-lamp reset procedure outlined under the Purity Monitor section here.
PCs are unreachable after a restart¶
Sometimes after the Windows PCs have been restarted the network doesn't come back. To fix this, open up the back of the rack with the PC having the issue. Unplug the Ethernet cable in back of the PC. Pause momentarily. Plug the cable back in.
The DAQ PCs run Windows 7 Enterprise Edition. As is common with Windows, they need to be regularly updated to fend off malware. It's good to login to the PCs about one a week to check for updates. If there are updates available, go ahead and install them.
The lab has malware detection that is quite stringent. Someone installed a browser toolbar once that got flagged as malware. Once a machine has been flagged for malware, it's required to be wiped. You need to be very careful when installing any software on the DAQ PCs! Okay! Be very careful!