Presentation is loading. Please wait.

Presentation is loading. Please wait.

SNS Integrated Control System EPICS IOCs – Relational DB Connectivity Bridge A. Liyu, A. Zhukov.

Similar presentations


Presentation on theme: "SNS Integrated Control System EPICS IOCs – Relational DB Connectivity Bridge A. Liyu, A. Zhukov."— Presentation transcript:

1 SNS Integrated Control System EPICS IOCs – Relational DB Connectivity Bridge A. Liyu, A. Zhukov

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

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

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

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

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

7 SNS Integrated Control System 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 SNS Integrated Control System 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 : “…” Demo: test-diag-ioc-blm1 retrieves files from RDB Disk IOC

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

10 SNS Integrated Control System Next possible steps l 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 l IOC loads data directly from RDB – “on fly” »Drivers (path, library, init library) »Records (dbLoadRecordFromRDB() ) »Save/restore, CA security, commands…

11 SNS Integrated Control System Next possible steps (continued) l Smart CA clients ALWAYS use RDB to get device info (types, quantity, standard PV’s set…) l 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


Download ppt "SNS Integrated Control System EPICS IOCs – Relational DB Connectivity Bridge A. Liyu, A. Zhukov."

Similar presentations


Ads by Google