Epics rtems at nsls
This presentation is the property of its rightful owner.
Sponsored Links
1 / 12

EPICS/RTEMS at NSLS PowerPoint PPT Presentation


  • 129 Views
  • Uploaded on
  • Presentation posted in: General

EPICS/RTEMS at NSLS. S. Kate Feng EPICS Meeting at DLS, UK June 19, 2003. 1. Projects that use EPICS at NSLS. DUV-FEL accelerator (only one beamline) I began to implement EPICS/VxWorks in 2000 400 nm SASE achieved in February, 2002 266 nm HGHG achieved in October, 2002

Download Presentation

EPICS/RTEMS at NSLS

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Epics rtems at nsls

EPICS/RTEMS at NSLS

S. Kate Feng

EPICS Meeting at DLS, UK

June 19, 2003

1


Projects that use epics at nsls

Projects that use EPICS at NSLS

  • DUV-FEL accelerator (only one beamline)

    • I began to implement EPICS/VxWorks 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/VxWorks in 2000

    • Peter Siddons proposed to use RTEMS for beamline applications

2


Epics rtems at nsls1

EPICS/RTEMS at NSLS

  • I began the project in October, 2002

  • Development platform is Linux RedHat 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 running

3


Sample features as of june 10 2003

Sample features as of June 10, 2003

4


Rtems ioc configuration at nsls

RTEMS IOC configuration at NSLS

  • RTEMS IOC configuration

    • CPU: MVME2306

    • RTEMS : gcc-3.2.2, newlib-1.11.0, rtems-4.6.0pre3

    • RTEMS image download: bootp/tftp

    • Shell: rtems-cexp for dynamic loading (T.S., SSRL)

    • Remote login: telnetd (Till Straumann, SSRL, SLAC)

    • Portability: RTEMS devLib.c (T.S., SSRL), epics threads, epicsMutex, and so on (Eric Norum, APS)

    • EPICS 3.14.0beta2 (Marty Kraimer, APS, and Jeff Hill LANL)

5


Epics 3 14 osi for the duv fel project

EPICS 3.14 OSI for the DUV-FEL project

  • Radiation monitor IOC (needed for operation)

    • Tested on the RTEMS and Tornado2.02 platform

    • Used epicsTime thread instead of routines from drvTS.c

    • drvXVme293.c: driver for the MVME293 counter

    • devWFXvme293.c: radiation counts at various locations

    • devWF30secTotal.c: average radiation dose every 30 seconds at various locations

    • devWFHourTotal.c: total radiation dose hourly at various locations

    • devWFWorkdayTotal.c: total radiation dose during an eight-hour workday at various locations

6


Epics rtems for nsls beamlines

EPICS/RTEMS for NSLS beamlines

  • Added OSI over the beamline device/driver routines from the R3.13.x release and tested successfully on the RTEMS platform for the bitIO, scaler and OMS58 motor controller

    • stdApp (50%)

    • motorApp

  • Collaborating with Mark River, Time Mooney and others from APS to install and test the up-to-date beamline device/driver routines

7


What did i modify in epics 3 14

What did I modify in EPICS 3.14?

  • I modified the registerRecordDeviceDriver.pl file so that I could continue the scheme of dynamic loading to load the Record/Device/Driver for stdApp and motorApp in the startup script

  • Instead of registerRecordDeviceDriver(pdbase) for both the stdApp and motorApp, I used:

    • std_registerRecordDeviceDriver(pdbase)

    • motor_registerRecordDeviceDriver(pdbase)

8


Excerpt of the rtems startup script

Excerpt of the RTEMS startup script

cexpModuleLoad("std.obj")

cexpModuleLoad("motor.obj“)

vmeUniverseInit()

devAvme9440Config(1,0x8000,0x80)

VSCSetup(1, 0x20000000, 200)

oms58Setup(1, 8, 0xa000, 190, 7,0.2)

dbLoadDatabase("../dbd/std.dbd")

std_registerRecordDeviceDriver(pdbbase)

dbLoadDatabase("../dbd/motor.dbd")

motor_registerRecordDeviceDriver(pdbbase)

dbLoadRecords("../db/Acromag_16IO.db","P=Kate:,A=B1")

dbLoadRecords("../db/Jscaler.db","P=Kate:,S=scaler1,C=0")

dbLoadTemplate("../db/motor.substitutions")

dbLoadRecords("../db/scanParms.db","P=Kate:,Q=m10,SCANREC=$(P)scan1,POS=$(Q).VAL,RDBK=$(Q).RBV")

iocInit()

9


Next step

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 MVME230x board

10


Rtems specific issues that i encountered

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_be16(), ....out_be32() 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 osdTime.cpp file to offset the local time.

11


Summary

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.

12


  • Login