Fast Monitoring System - PXI

From GlueXWiki
Revision as of 13:34, 5 June 2013 by Yqiang (Talk | contribs) (Checkout and Compile the Source Code)

Jump to: navigation, search

Overview

A PXI system is built and configured to monitor the vital signals of the Hall-D super-conducting magnet to ensure its safe operation, particularly to detector the turn-to-turn short faults. Currently, the system contains 4 ADC modules which can sample up to 32 channels simultaneously at a maximum rate of 250 kHz. A LabVIEW RT program is automatically loaded and executed when the system is booted as a stand alone turn-key system. Through its Ethernet connection, the system hosts an EPICS server so that the measurements can be easily accessed and archived remotely. It also serves as an Ethernet device to the magnet control system based on PLC to provides various readings including current, field and voltages.

Ethernet Configuration

  1. hostname: HallD-PXI.jlab.org
  2. IP address: 129.57.37.80

Reboot the PXI system

Option I - local power cycling
  1. Climb the ladder and reach the top of the magnet where the PXI system is located.
  2. Reboot the PXI by pushing the power button in the front panel.
Option II - using a web browser

This method requires the web sever running properly on PXI.

  1. Go to http://halld-pxi.jlab.org (MS Silverlight plugin is required).
  2. Click Restart on the top right of the page to reboot the system remotely.
Option III - using NI-MAX

This method requires the Ethernet interface running on PXI.

  1. Use remote desktop to log onto halld2.jlab.org as user halldusers. Ask Elliott for password.
  2. Double click the NI-MAX short-cut on the desktop to open Measurement & Automation Explorer.
  3. Expand the device tree on the left panel and select HallD-PXI under Remote Systems
  4. Click the Restart button on the right panel and acknowledge the prompt to reboot the system.

PXI DAQ Configuration and Channel List

By turning on the PXI system, a LabVIEW-RT program will be automatically executed and a DAQ session will be started. One can also stop a DAQ session and start a new one through EPICS control GUI.

During the initialization of a DAQ session, a configuration file Channel_Config.ini will be loaded, which defines various DAQ parameters as well as properties of individual channels.

A spreadsheet of the channel list is routinely updated and can be found in M drive:

M:\halld\controls\Rockwell Software\HallD_Controls_Development\Reference Documentation\PXI_Channel_List_date.xlsx

Access Channel_Config.ini

There are two methods to access and modify the file:

Option I - Web-Browser

The easiest way is to edit the file using a web-browser from a Windows machine (MS Silverlight plugin is required)

  1. Go to http://halld-pxi.jlab.org
  2. Click login on top-right of the page, type in user name 'halld' and password when prompted. Ask Elliott to get the password.
  3. Click the Remote File Browser from the left panel
  4. Expand the directory tree to open the folder called c:\ni-rt\Solenoid_DAQ
  5. Choose Channel_Config.ini in the right panel, then click Edit File ... to open it
  6. WARNING! Modify the file content if you know what you are doing, click Save Changes or Cancel to exit the editor.
Option II - FTP
  1. Use any ftp client to log on to halld-pxi.jlab.org as halld
  2. The configuration file can be found in directory /ni-rt/Solenoid_DAQ

Description of Channel_Config.ini

An example of the Channel_Config.ini is attached.

Some sections of the configuration are shown here with some description after #:

[Global]
Sample_Rate = 100000   # ADC sampling rate in Hz, maximum for 4300 module is 250kHz
Report_Rate = 10       # EPICS report rate in Hz
Data_Rate = 5000       # ROOT file/local binary data file recording rate in Hz
Save_Length = 300      # Duration of a single local binary data file in seconds
Save_History = 0       # Number of binary data files kept on local disk
Fake_Signal = FALSE    # Flag for fake data stream
[Modules]              # Section for list of modules installed.
Slot2 = "4300"         # Module type in each slot.
Slot4 = "4300"         # Currently, only 4300 and 4300B are supported
Slot6 = "4300"         #
Slot8 = "4300B"        #
[Slot2_Ch0]            # Channel Section. The name has to follow the 'Slot#_Ch#' convention
Active = TRUE          # Channel activated for DAQ: TRUE or FALSE
Channel_Name = "VTT4"  # Channel name, will also be used for EPICS PV variables, eg: HallD-PXI:Data:VTT4 and HallD-PXI:Array:VTT4
Voltage_Range = 10     # Voltage range for ADC channel (+-), available ranges are: 1, 5 and 10 for 4300; 30, 150 and 300 for 4300B
Offset = -0.000169     # Offset applied for EPICS PV variables and PLC variables
Slope = 1              # Scaling factor applied for EPICS PV variables and PLC variables
Delay = 0              # Channel delay compensation in seconds

Communication with EPICS

Types of EPICS variables

There are two types of EPICS variables served by this PXI system.

Single Elements

These variables are updated at the rate specified as Report_Rate in the configuration file. The PXI system average all readings between two reports to improve the data quality. The PV names for these variables are HallD-PXI:data:Channel_Name, where the Channel_Name is defined in the configuration file.

Arrays

The arrays are mainly used for the remote archiving of the high speed data. Each array has a fixed dimension of 5000, and the update rate depends on the specified Data_Rate in the configuration. Same as the single element variables, these values are also taken from averages. The PV names for these variables are HallD-PXI:array:Channel_Name.

EPICS ProcServer for ROOTFile Recording

An EPICS procserver is running on gluon01.jlab.org to save the high speed data to rootfiles when needed. All the rootfiles will be saved on gluon01 under directory

/local/scratch/PXI_DATA/ROOT/

and period backed up on JLab silo tapes. To enable or disable the data writing, one can use the EPICS GUI

Reboot the procserver

  1. Log onto gluon01.jlab.org as user halld, ask Elliott for password,
  2. Connect to the PXI-EPICS server by typing telnet localhost 26060
  3. Hit Ctrl+X to reboot the server, reboot it a couple more times to make sure no error messages coming out,
  4. Hit Ctrl+] to exit the server
  5. Type 'quit' to exit telnet

Communication with PLC

How to Run EPICS Control

Start EPICS Control

  1. Log onto gluon01.jlab.org using username halld from any Linux terminal, ask Elliott if you do not know the password.
  2. Type css & to start the Control System Studio.
  3. If PXI control is not already loaded, click File -> Open File in the top left menu, open ~halld/CSS-Workspaces/Default/Hall-D/PXI/PXI_Status.opi.

Use EPICS Control

Make sure that the PXI's heart beat is blinking, and all the EPICS channels are connected.

Main Screen

The main screen give you the accesses to PXI control, ROOTFile Recording, strip-charts for CPU usage,magnetic current, field strength, pickup coil signals and buttons to open other strip-charts for sub coil voltages and voltage ratios.

To Start DAQ

  1. By default, the PXI-DAQ should be running, if not, hit Start to start the DAQ process, you should see that the status changes from System Standby to Initialize DAQ to DAQ Running

Calculate Offsets

  1. Make sure magnet is in a state that the all signals remain zero,
  2. Stop running DAQ proccess by hitting Stop,
  3. Click zero button to start zeroing process, the status will change from System Standby to Initizalize to Zeroing. After about 1 minute, the zeroing process should automatically stop and System Standby should be shwon then.

Reset Offsets

  1. Stop DAQ
  2. Click Reset Offset button
  3. Start DAQ

Generate Fake Turn-to-Turn Short Alarm

  1. The feature only works during a normal DAQ process
  2. Click T-2-T Alarm to trigger an alarm
  3. Click T-2-T Alarm again to return to disable the fake alarm

Open Strip Charts for Voltage Taps

  1. Click Open Sub Coil Chart

Open Strip Charts for Total Voltage and Ratios of Voltages

  1. Click Open Voltage Chart button

Start or Stop ROOTFile Recording

  1. ROOT Files need to be recorded for offline analysis, start a new ROOTFILE everytime a new ramp up starts from 0 A.
  2. Check the status of ROOT File Recording, if it says Idle .. Click to start new file, then click the button, acknowledge the popup message to start a new ROOTFile. The button should then say Writing Data .. Click to stop.
  3. Then one need to check the existance of the new file. First log onto gluon01 from a Linux terminal, then type ll -h /local/scratch/PXI_DATA/ROOT/*.root to display the list of availble root list, try to find the file with latest time stamp, also repeat the command a couple of more times make sure the file size is increasing.
  4. If ROOT file is not updating, one need to restart the EPICS IOC service for recording.
  5. Stop ROOTFile writing by click the button after the current ramps down to 0 A.

How to Analyize ROOT Files

List of ROOT Files

  • HallD Elog entry of list of rootfiles
  • all the rootfiles are on gluon01.jlab.org in directory /local/scratch/PXI_DATA/ROOT, there is a symbolic link in the Analyzer directory mentioned later.

Solenoid ROOT File Analysis Tool

As more channels are added to the ROOT files since May 28, 2013, there are two versions of solenoid data Analyzers are available on gluon1 to analyze data files taken before and after the change.

Run the Analyzer

  1. Log onto gluon01 using username halld: ssh halld@gluon01
  2. Go to analyzer directory
    • For data taken on or after 05/29/2013: cd /home/halld/solenoid/Analyzer
    • For data taken before 05/29/2013: cd /home/halld/solenoid/Analyzer_pre0529
  3. Run the analyzer: ./analyzer &

Checkout and Compile the Source Code

The source files of the Analyzer are stored in the Hall-D SVN repository.

  1. Check out the code
    svn co -r 10916 https://halldsvn.jlab.org/repos/home/yqiang/Solenoid/Analyzer
  2. Make sure the ROOT library is include in LD_LIBRARY_PATH environment variable
  3. Compile the code: make
  4. Execute the compiled binary: ./Analyzer

List of button/features in analyzer

  • Open: open a rootfile
  • Exit: exit the program
  • Top Panel: The magnet's current will be shown in the top panel, by zooming in/out the time(X) axis, one will select the range of displays/evaluations shown in the bottom panel
  • Bottom Panel: Display of plots, calculations
  • Field Delay: Delay time for field probe, default is 0
  • Resample Frequency: Show data with different resample frequency, the maximum is 5000 Hz
  • Legend: Show legends in plots
  • Cal Mean: Calculate mean values of histograms shown in plots, the results will be printed in terminal
  • Cal Fit: