Los Alamos National Laboratory

An IRMIS Extension: cRIO WiringInformation SystemKanglin Xu
May 15, 2017

Operated by Los Alamos National Security, LLC for the U.S. Department of Energy's NNSA

Los Alamos National LaboratoryContents• APS IRMIS brief• LANSCE-RM device database system• Development environment and toolkits• LANSCE IRMIS and extended subsystems• Screenshots of implementation of IRMIS at LANSCE• LANSCE cRIO wiring information system• cRIO: CompactRIO system• Development environment for NoSQL database• System statistics• IRMIS schemas associated with the wiring system• Future work2/9/16 | 2

Los Alamos National Laboratory

IRMIS 2 was developed by Argonne National Lab.
Today it covers many aspects of EPICS control
systems including IOCs, PVs, cables, models, etc.
• IRMIS 2 basically has• RDB modules andschema• PV crawler for loading
PVs from database• GUI Application byJava• Stable and used at APS• But NOT supported by
IRMIS community anymore

2/9/16 | 3

Los Alamos National Laboratory

LANSCE-RM Device Database System is a site IRMIS
implementation to install, manipulate, track, and search
the data and information for LANSCE control systems.
• IRMIS 2 Schema andtables• IRMIS 2 PV Crawler• Application basedupon REST –Representational
State Transfer• More schema otherthan those coveredby IRMIS• More applications
and features

2/9/16 | 4

Los Alamos National Laboratory

The LANSCE-RM Device Database System isdeveloped by using many popular open source
software, tools and frameworks.
• LAMP open source software packages• Refer to the first letters of Linux, Apache, MySQL and PHP, PERL orPython• Python Django framework for the server side
• Pure python• MVC pattern• Free admin interface and user authentication ready• SQLAlchemy SQL toolkit for database interface• jQuery javascript library for the front-end client side and AJAXimplementation• jQuery GUI framework for some special UI requirements• jQuery Mobile framework used for developing mobile-friendly pages• Elasticsearch to provide powerful full-text search sever

2/9/16 | 5

Los Alamos National Laboratory

The system has many more extensions and subsystems for the LANSCE control system other than alocal and site IRMIS implementation.
• The PV system including the schema and crawler based upon IRMIS 2posted on the EPICS web site as mentioned.
• PV search and report generator• PV history including those changed and deleted• LANSCE wire scanner information system• Wire scanner and actuator general info like locations, chassis, IP, etc.
• Configuration and initial parameters• LANSCE daily log and archive management system• Auto archiving to save operators’ work and time
• Full-text search for historic data
• LANSCE switch and network device system• Legacy RICE channels system for timed/flavored data

2/9/16 | 6

Los Alamos National Laboratory

Screenshots of implementation of IRMIS at LANSCE:PV Search Page - Similar to the APS IRMIS 2 Java
Application

Multiple Search Patterns with wildCard “*”

Field value starts with “@”

2/9/16 | 7

Los Alamos National Laboratory

Screenshots of implementation of IRMIS at LANSCE:PV search result based upon the previous slide –similar to the APS 2 Java application Ajax call to avoid to change the URL andrefresh the whole page, and get each
PV details easily and quickly.

Click thethe Record
row to getthe detailed
FIELD/VALUEpairs
39 PVs Match the previous search pattern

2/9/16 | 8

Los Alamos National Laboratory

Screenshots of implementation of IRMIS at LANSCE:PV REPORT TEMPLATE – Dynamically Generate a PV
Report with FIELDS at Users’ Choice

Users can select up to 8 field types
to be included in the following report.

Other than FIELD types, IOC list, Rec Type list and text patterns are similar to PV search.

2/9/16 | 9

Los Alamos National Laboratory

Screenshots of implementation of IRMIS at LANSCE:PV report generated dynamicallyDefault Field Types

Users-selected field types at the previous slide

Can sort the results based on the FIELD clickedat both ASC and DESC directions

DJANGO pagination used

Ajax calls to get the complete FIELD/VALUE pairs
at the next slide and to send you an XLS
spreadsheet file created dynamically.

2/9/16 | 10

Los Alamos National Laboratory

Screenshots of implementation of IRMIS at LANSCE:PV report generated dynamically - Continued
Ajax call

Click the radio button of 01JC001L05 to get the its field pairs in the grey box;
And then click “Channel Info” button, we can get the white pop-up dialog with detailed info.
Both are AJAX calls without leaving and refreshing the page.

2/9/16 | 11

Los Alamos National Laboratory

The LANSCE cRIO wiring information system isdesigned as a subsystem and extension of LANSCEIRMIS device database system.
• To share wiring terminal codes between our hardware team, software
team, operators and other users.
• To centralize the wiring information rather than each one has his own
spreadsheet.
• To make the wiring information update easy.
• To save our engineers’ time and effort for troubleshooting andmaintaining our control system.
• To associate and map with LANSCE IRMIS Device Database Systemand find information like
• PV and record field values• IOC and its location• DB, DBD file locations, etc.

2/9/16 | 12

Los Alamos National Laboratory

The cRIO, a product of National Instruments (NI),combines a real-time controller chassis, reconfigurable
IO modules, and FPGA module.
• cRIO Hardware and software• Power PC, Intel Atom processor, and Intel Core i7 processor• DDR memory and nonvolatile storage.
• Ethernet ports and RS232 serial ports• VxWorks for free with hardware or NI Linux Real-time with embedded UIand Mini Displayport• LabVIEW, a NI graphical programming language, for programming thehardware and particularly for coding FPGA
• EPICS integrated via NI CA• Embedded EPICS• A Special Board Support Package (BSP) required• Additional configuration required

2/9/16 | 13

Los Alamos National Laboratory

The cRIO wiring information system is developed andbuilt on MongoDB, a NonSQL document-orientedsystem and other other open source toolkits.
• MongoDB 3.2.8 for data model rather than SQL schema because of• Fast development• Simple data model• Flexibility and no complex joins• Scalable architecture but the feature not really used in our site
• A first step to upgrade our IRMIS system to a NonSQL system• Pymongo-3.3.0• A Python distribution containing tools for working with MongoDB• mongo-c-driver, mongo-cxx-driver and swig
• To build C/C++ library to talk to MongoDB and an interface wrapper for ourexisted TCL applications• Other toolkits and frameworks mentioned above for IRMIS on our site

2/9/16 | 14

Los Alamos National Laboratory

Although this wiring information system is pretty
simple, it does store important information for our dailywork.
• IOC name• cRIO Module name• Module slot
• Terminal code
• PV name• cRIO module channel• Wire label• Wire color• IO item label

2/9/16 | 15

Los Alamos National Laboratory

We associate this system with our IRMIS device
database system to query the PVs’ field values needed
for control development and troubleshooting.
• To do so, we first join IRMIS tables including Record Names,Record Types, IOC names, Field Names, Field Values, etc.
• And then query and filter by PV name

2/9/16 | 16

Los Alamos National Laboratory

Screenshot of the LANSCE wiring information systemand applications Clicking the radio button of PV 21TM001L01and then clicking“Channel Info” button, we can get its field values.

2/9/16 | 17

Los Alamos National Laboratory

Future Works• New PV database implementations based on NoSQL at LANSCE• New crawler for NoSQL PV database• Applications based upon the backend• IOC information system based on NoSQL• New crawler for IOC information system• Related applications• Add more data like locations and rack numbers into the wiring
information system

2/9/16 | 18