1 / 11

EPICS IOCs – Relational DB Connectivity Bridge A. Liyu, A. Zhukov

EPICS IOCs – Relational DB Connectivity Bridge A. Liyu, A. Zhukov. EPICS (standard) and SNS architectures. EPICS architecture (standard). OPI (like EDM). CA. Boot file server. IOC. OPI (like EDM). RDB (ORACLE). XAL applications. CA. JERI +. SNS EPICS architecture. Boot file server.

Download Presentation

EPICS IOCs – Relational DB Connectivity Bridge A. Liyu, A. Zhukov

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EPICS IOCs – Relational DB Connectivity Bridge A. Liyu, A. Zhukov

  2. EPICS (standard) and SNS architectures EPICS architecture (standard) OPI (like EDM) CA Boot file server IOC OPI (like EDM) RDB (ORACLE) XAL applications CA JERI + SNS EPICS architecture Boot file server IOC

  3. Main advantage of single data storage Single central datastorage (RDB) CA client applications Other client applications CA IOCs and client applications take data from the same place RDB (ORACLE) IOC IOC and client applications are always synchronized

  4. Problems to solve… • Different IOC operating systems (vxWorks, Linux, Windows, Windows - Shared Memory - LabView…) • Usually RTOSs have no SQL RDB support • Different Databases (Oracle, MySQL, MS Access…) … and possible solutions • Straightforward way: create a RDB driver per each OS-database combination • Easy way: create intermediate universal server between OS and RDB.

  5. Any Web server (on Linux, Windows…) Apache is fine Universal Solution Requests HTTP EPICS Socket Library TCP/IP OS independence Standard Web server – RDB connectivity: PHP, JSP, ASP RDB independence RDB (ORACLE) IOC

  6. Demo: test-diag-ioc-blm1 retrieves files from RDB • IOC requests file list from Web server • Web Server looks up IOC’s host name in RDB and returns list of file names, paths and IDs for this particular IOC • IOC requests a file having specific ID from Web Server • Web Server requests the file from RDB and returns to the IOC • IOC writes the file to disk

  7. Demo: RDB structure 1 select file_id, DIAG_CONFIG_FILE_NM, DIAG_CONFIG_FILE_LOC from az9.ioc_file inner join az9.ioc_dvc on az9.ioc_file.dvc_id=az9.ioc_dvc.dvc_id where IOC_NET_NM='$(REMOTE_SHORTNAME)' 2 select diag_config_file_cont from az9.ioc_file where FILE_ID=$(FILE_ID)

  8. Demo: test-diag-ioc-blm1 retrieves files from RDB IOC ORACLE RDB Web Server HTTP: “GET /FileList.sql” 1 SQL: “Select …“ Data: “12 Detectors.ini ./iocBoot/test-diag-ioc-blm1/ …” HTTP: “GET /FileList.sql?FILE_ID=12” 2 SQL: Select … File : “…” Disk

  9. Demo: test-diag-ioc-blm1 retrieves files from RDB • #st.cmd • … • cd topbin • ld < blm.munch • cd top • hostAdd(“audit”,”192.168.240.46”) • vFGetFilesByHTTP(“http: //audit:8080”) • cd top • dbLoadDatabase(“dbd/blm.dbd”,0,0) • blm_registerRecordDeviceDriver(pdbbase) • …

  10. Next possible steps • vxWorks and Windows IOC have been tested. Linux and MacOS will require recompilation only. Windows+”Shared Memory”+LabView: some work to be done • This approach (on “files in Oracle” level) could be applied to any IOC type at SNS • IOC loads data directly from RDB – “on fly” • Drivers (path, library, init library) • Records (dbLoadRecordFromRDB() ) • Save/restore, CA security, commands…

  11. Next possible steps (continued) • Smart CA clients ALWAYS use RDB to get device info (types, quantity, standard PV’s set…) • Changes to EPICS : • Definition of interface to IOC • Definition of interface to RDB • Definitions of EPICS types (Records, Drivers…) in RDB • Changes in EPICS core software

More Related