Top Banner
Debby Quock November 13, 2012 IRMIS at CLS
17

Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.

Dec 30, 2015

Download

Documents

Alfred Cannon
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.

Debby QuockNovember 13, 2012

IRMIS at CLS

Page 2: Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.

IRMIS Currently at CLS

PV Crawler– Perl modules that parse EPICS IOC st.cmd, db, and dbd

files. Information about IOCs and EPICS PVs is written to relational database.

Web Client– PHP language and SOAP web services

Relational Database– Microsoft SQL Server

Page 3: Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.

CLS PV Viewer

Page 4: Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.

CLS PV Viewer Cont.

Page 5: Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.

CLS PV Viewer Cont.

Page 6: Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.

CLS PV Viewer Cont.

Page 7: Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.

Crawlers (Planned)

• IOC (EPICS db files)– Addition of Sequence Crawler developed at APS

• EDM screens• Accelerator Toolbox (Matlab)• Auto CAD - PID drawings• CSS Alarm handler• Modicon Momentum PLC

(Concept Programming Tools)

Page 8: Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.

CLS IRMIS Architecture (Planned)

• Perl Language for IRMIS Crawlers– a Matlab function writes Matlab EPICS PV data directly to a simple text file

that is then interpreted by Perl script– CSS Alarm Handler generates an XML file that is then interpreted by Perl

script– EPICS IOC st.cmd and db files are parsed directly by Perl scripts

• MySQL as the Relational Database• Django Python based development framework for the User

Interface

Page 9: Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.

IRMIS 3 Database Schema

Page 10: Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.

IRMIS 3 Database Schema - EPICS PV and IOC Boot Data

Page 11: Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.

CLS IRMIS Crawler Mechanics

MySQL Perl Crawlers

CSS Alarm Handler XML File

IOC File System

EPICS PVs- Heartbeat- Boot Timestamp

EDM File System

And other EPICS Clients File Systems …

Matlab Text File

Page 12: Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.

IRMIS Crawler Mechanics Cont.

On an automated schedule, the PV crawler:

– Identifies IOCs to be scanned and their last known boot date (i.e., CLSBootScan.pm, APSBootScan.pm or SNSBootScan.pm)

– For each IOC• Checks for new boot date

• If so, insert new ioc_boot record into the MySQL IRMIS database and proceed

• If not, skip to next IOC• Parses st.cmd type files (collecting all info on dbd and db files)• Checks for any dbd or db file time mods

• If so, insert all pv and field data in db for IOC

Page 13: Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.

IRMIS PV Crawler Stored Information

Boot history• Each new IOC boot is recorded with date, regardless of whether any configuration

has changed• If there is an identifiable problem with the boot, or inability to parse its configuration,

an associated error is recorded

File system resources (only if changed from last crawl)• Path to each dbd and db file that make up configuration, along with file modified date

and any text substitutions applied

Record type definitions (dbd) (only if changed from last crawl)• The set of fields defined for each record type at that time

Record definitions (db) (only if changed from last crawl)• Record name, fields and their default/over riden values

Page 14: Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.

Sequence Crawler Discovered Attributes

In IOC startup command files, searches for script lines:– ld (load)– registerRecordDeviceDriver– #! (shebang)– seq (sequence)

Utilizes information:– IOC architecture– executable sequence file– sequence library file– EPICS database load file

Performs tasks:– Marks sequence records as old by setting table field rec_client::current_load =0 for any records

associated with the current IOC– Inserts new rows into tables uri, vuri, vuri_rel, and rec_client. Table rec_client holds PV name and

points to table vuri. Table uri holds the file name for the sequence program.

Page 15: Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.

Functionality of IRMIS Crawlers

• Parse EPICS core IOC file system to collect information about IOC boot history and associated EPICS PVs

• Parse files of EPICS clients such as MEDM, EDM, CSS, Auto CAD, and Matlab to collect specific information about how they utilize EPICS PVs

• Push EPICS IOC and PV related data into a relational database for archiving purposes and logical organization of information

The IRMIS relational database provides easily accessible search and data retrieval on accelerator controls information needed for

vital accelerator operations.

Page 16: Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.

Demonstrations

• IRMIS User Interface

– Django Python development framework

http://vsrv-apps-07:8000

• MySQL Development Tool– Toad for MySQL

Page 17: Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.

Summary

• IRMIS is currently in use at numerous accelerator facilities in North America. Collaboration continues among MSU, BNL, CLS, LANL and ANL.

• At ANL Advanced Photon Source, IRMIS was deemed mission critical to routine operations.

• Your imagination is the only limit as to how IRMIS can be expanded and enhanced.