EPICSRTEMS at NSLS S Kate Feng EPICS Meeting

  • Slides: 12
Download presentation
EPICS/RTEMS at NSLS S. Kate Feng EPICS Meeting at DLS, UK June 19, 2003

EPICS/RTEMS at NSLS S. Kate Feng EPICS Meeting at DLS, UK June 19, 2003 Funded under contract: DE-AC 02 -98 CH 10886 U. S. Department of Energy Office of Basic Energy Sciences 1 BROOKHAVEN SCIENCE ASSOCIATES

Projects that use EPICS at NSLS DUV-FEL accelerator (only one beamline) I began to

Projects that use EPICS at NSLS DUV-FEL accelerator (only one beamline) I began to implement EPICS/Vx. Works in 2000 400 nm SASE achieved in February, 2002 266 nm HGHG achieved in October, 2002 Currently in operation for users NSLS beamlines (currently > 10) Peter Siddons and Ivan So began to implement EPICS/Vx. Works in 2000 Peter. Light Siddons to use RTEMS for beamline National Synchrotron Source proposed U. S. Department of Energy Office of Basic Energy Sciences applications 2 BROOKHAVEN SCIENCE ASSOCIATES

EPICS/RTEMS at NSLS I began the project in October, 2002 Development platform is Linux

EPICS/RTEMS at NSLS I began the project in October, 2002 Development platform is Linux Red. Hat 7. 3 EPICS 3. 14 IOC test platform is RTEMS Evaluated cexp vs. esh for RTEMS dynamic loading cexp is ideal for run-time dynamic loading plus other nice features esh would be a good debugging tool (e. g. breakpoint and single step) if it is fully developed as promised. All the run-time modules to be loaded have to be pre-mounted into the IMFS file system via a makefile before National Synchrotron Light Source U. S. Department of Energy running Office of Basic Energy Sciences 3 BROOKHAVEN SCIENCE ASSOCIATES

Sample features as of June 10, 2003 Sample features as of 6/10/03 cexp esh

Sample features as of June 10, 2003 Sample features as of 6/10/03 cexp esh 100 % Pre-mounted files only Invoking func() to skip function registration yes Disassembler yes Symbol Table lookup yes Telnetd, scripts and reentrant yes no Data Type All types except short Only integer and float Memory dump for a region no yes Single step no Promised, not done Break point no Promised, not done Thread control no yes Run-time dynamic loader National Synchrotron Light Source 4 U. S. Department of Energy Office of Basic Energy Sciences BROOKHAVEN SCIENCE ASSOCIATES

RTEMS IOC configuration at NSLS RTEMS IOC configuration 5 CPU: MVME 2306 RTEMS :

RTEMS IOC configuration at NSLS RTEMS IOC configuration 5 CPU: MVME 2306 RTEMS : gcc-3. 2. 2, newlib-1. 11. 0, rtems 4. 6. 0 pre 3 RTEMS image download: bootp/tftp Shell: rtems-cexp for dynamic loading (T. S. , SSRL) Remote login: telnetd (Till Straumann, SSRL, SLAC) Portability: RTEMS dev. Lib. c (T. S. , SSRL), epics threads, epics. Mutex, and so on (Eric National Synchrotron Light Source U. S. Department of Energy Norum, APS) Office of Basic Energy Sciences BROOKHAVEN SCIENCE ASSOCIATES

EPICS 3. 14 OSI for the DUV-FEL project Radiation monitor IOC (needed for operation)

EPICS 3. 14 OSI for the DUV-FEL project Radiation monitor IOC (needed for operation) Tested on the RTEMS and Tornado 2. 02 platform Used epics. Time thread instead of routines from drv. TS. c drv. XVme 293. c: driver for the MVME 293 counter dev. WFXvme 293. c: radiation counts at various locations dev. WF 30 sec. Total. c: average radiation dose every 30 seconds at various locations dev. WFHour. Total. c: total radiation dose hourly at various locations dev. WFWorkday. Total. c: National Synchrotron Light Source U. S. Department oftotal Energy radiation dose Office of Basic Energy Sciences during an eight-hour workday at various 6 BROOKHAVEN SCIENCE ASSOCIATES

EPICS/RTEMS for NSLS beamlines Added OSI over the beamline device/driver routines from the R

EPICS/RTEMS for NSLS beamlines Added OSI over the beamline device/driver routines from the R 3. 13. x release and tested successfully on the RTEMS platform for the bit. IO, scaler and OMS 58 motor controller std. App (50%) motor. App Collaborating with Mark River, Time Mooney and others from APS to install and test the up-to-date beamline National Synchrotron Light Source device/driver routines U. S. Department of Energy Office of Basic Energy Sciences 7 BROOKHAVEN SCIENCE ASSOCIATES

What did I modify in EPICS 3. 14? I modified the register. Record. Device.

What did I modify in EPICS 3. 14? I modified the register. Record. Device. Driver. pl file so that I could continue the scheme of dynamic loading to load the Record/Device/Driver for std. App and motor. App in the startup script Instead of register. Record. Device. Driver(pdbase) for both the std. App and motor. App, I used: std_register. Record. Device. Driver(pdba se) Light Source National Synchrotron U. S. Department of Energy Office of Basic Energy Sciences 8 BROOKHAVEN SCIENCE ASSOCIATES

Excerpt of the RTEMS startup script cexp. Module. Load("std. obj") cexp. Module. Load("motor. obj“)

Excerpt of the RTEMS startup script cexp. Module. Load("std. obj") cexp. Module. Load("motor. obj“) vme. Universe. Init() dev. Avme 9440 Config(1, 0 x 8000, 0 x 80) VSCSetup(1, 0 x 20000000, 200) oms 58 Setup(1, 8, 0 xa 000, 190, 7, 0. 2) db. Load. Database(". . /dbd/std. dbd") std_register. Record. Device. Driver(pdbbase) db. Load. Database(". . /dbd/motor. dbd") motor_register. Record. Device. Driver(pdbbase) db. Load. Records(". . /db/Acromag_16 IO. db", "P=Kate: , A=B 1") db. Load. Records(". . /db/Jscaler. db", "P=Kate: , S=scaler 1, C=0") db. Load. Template(". . /db/motor. substitutions") db. Load. Records(". . /db/scan. Parms. db", "P=Kate: , Q=m 10, SCANREC=$(P)scan 1, POS=$(Q). VAL, RDBK=$(Q). RBV") ioc. Init() National Synchrotron Light Source 9 U. S. Department of Energy Office of Basic Energy Sciences BROOKHAVEN SCIENCE ASSOCIATES

Next step To install and test RTEMS – NFS (Till Straumann, SSRL) so that

Next step To install and test RTEMS – NFS (Till Straumann, SSRL) so that we can use EPICS save_restore (Tim Mooney, APS) To find a different VME/CPU board to run RTEMS in the event that Motorola discontinues the MVME 230 x board National Synchrotron Light Source 10 U. S. Department of Energy Office of Basic Energy Sciences BROOKHAVEN SCIENCE ASSOCIATES

RTEMS-specific issues that I encountered Most of the RTEMS-specific issues are transparent over the

RTEMS-specific issues that I encountered Most of the RTEMS-specific issues are transparent over the EPICS OSI. The RTEMS-specific issues I dealt with were very minor. For example : Use strtok instead of strtok_r for strict ANSI C I/O Ops. : in_8(), in_be 16(), . . out_be 32() for PPC The NTP client for RTEMS reads only the GMT time. An easy workaround is to change the value of rtems_bsdnet_timeoffset in the osd. Time. cpp file to offset the local time. National Synchrotron Light Source U. S. Department of Energy Office of Basic Energy Sciences 11 BROOKHAVEN SCIENCE ASSOCIATES

Summary While RTEMS is lacking in source level debugging tools, the existing EPICS OSI/RTEMS/CEXP

Summary While RTEMS is lacking in source level debugging tools, the existing EPICS OSI/RTEMS/CEXP packages are sufficient for us to port the IOC applications to RTEMS. As of today, RTEMS meets the requirements of our real-time IOC applications. The challenge to its wider use lies in its limited range of BSP’s. National Synchrotron Light Source 12 U. S. Department of Energy Office of Basic Energy Sciences BROOKHAVEN SCIENCE ASSOCIATES