debby quock november 13, 2012 irmis at cls. irmis currently at cls pv crawler –perl modules that...
TRANSCRIPT
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
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)
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
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
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
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
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.
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.
Demonstrations
• IRMIS User Interface
– Django Python development framework
http://vsrv-apps-07:8000
• MySQL Development Tool– Toad for MySQL
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.