RealTime Data Transfer using the Timing System Original








- Slides: 8

Real-Time Data Transfer using the Timing System (Original slides and driver code by Babak Kalantari) Dirk Zimoch, EPICS Collaboration Meeting, Vancouver 2009

Real-Time Data Transfer Key Hardware Features ■ Event rate max 125 MHz ■ 8 bit event code + 8 bit signals or data (multiplexed) ■ Real-time data transfer rate max 62. 5 Mbytes/sec ■ At 1 k. Hz linac repetition rate: ~60 k. Bytes/bunch Dirk Zimoch, EPICS Collaboration Meeting, Vancouver 2009

Real-Time Data Transfer Event System Overview 8 bit data 8 bit event 8 bit signals 8 bit event Event Receiver Event Stream Timing IOC ext. signals 50 Hz mains Event Fan out FO links Generator Ref. clock master osc. Event Receiver • • local delays programmable pulses on/off signals real-time data Dirk Zimoch, EPICS Collaboration Meeting, Vancouver 2009

Real-Time Data Transfer Sources of Real-Time Data ■ Master timing IOC: real-time ■ Other IOC: network latency but synchronous ■ Upstream via timing system: real-time IOC 1 Event Receiver Network Timing IOC Event Generator Fan out FO links IOC 2 Event Receiver Event IOC 3 Receiver Event IOC 4 Receiver Event Receiver IOCn Dirk Zimoch, EPICS Collaboration Meeting, Vancouver 2009

Real-Time Data Transfer Driver Software ■ Real-time data is seen as buffer of 2048 bytes ► Variables can be mapped to offsets ► Event generator and receivers have to agree on mapping ► Send buffer on write or on trigger ► Interrupt on buffer receive ■ Configuration in startup script mrf. DBuff. Configure ("device", cardno, eg) ■ Still some work to do ► Endian issues ► Scheduling Dirk Zimoch, EPICS Collaboration Meeting, Vancouver 2009

Real-Time Data Transfer Device Support ■ Generic device support for blocks of registers ► Originally designed for S 7 PLC communication over ethernet ► Supports all standard i/o record types and data types ► Process input records "I/O Intr" (with high priority) device name ■ Example record (ai, "($NAME)") { field (DTYP, "reg. Dev") field (INP, "@evr/16 T=FLOAT") field (SCAN, "I/O Intr") field (PRIO, "HIGH") offset in bytes field (PREC, "6" } data type Dirk Zimoch, EPICS Collaboration Meeting, Vancouver 2009

Real-Time Data Transfer Example Real-Time Data ■ Bunch train counter ► 32 bit intoverflow in 16 months (at 100 Hz) ► double (52 bit mantissa) good for 1. 4 million years ► 3 day test shows 100% reliability ■ Other beam parameters ► bunch train length, energy, … ■ With upstream data: measured parameters ► intensity, position, … Dirk Zimoch, EPICS Collaboration Meeting, Vancouver 2009

Real-Time Data Transfer Application Synchronization (e. g. synchronous camera and current monitor trigger) 1. Application sends code to timing master 2. Event system distributes application code 3. IOCs arm devices depending on code Exp. 3 4. Devices acquire data synchronously dev. 1 Exp. 2 dev. 3 Beam source Exp. 1 dev. 2 dev. 4 Exp. 4 Dirk Zimoch, EPICS Collaboration Meeting, Vancouver 2009