EPICS GPIB Interface via HP LAN Box

Download Report

Transcript EPICS GPIB Interface via HP LAN Box

Stanford Linear Accelerator Center
May 2002 EPICS Collaboration
Meeting Trip Report
EPICS Core,
Generic Transient Recorder,
Visual DB Configuration Tool,
Channel Access Extensions
7/20/2015
Stephanie Allison
1
EPICS Core
•
•
•
•
•
7/20/2015
Workshop
Linux PC IOC
Linux PC104 IOC
RTEMS IOC
Licensing
Stephanie Allison
2
EPICS Core Workshop
•
•
•
•
•
•
•
•
•
7/20/2015
3.14  mv167
3.13.6 + Tornado 2 also big
CA link resolution time
3.14 CA search better, ideas to make better
3.13.6 VxWorks statistics upgrade
Unbundle devLib  vmeLib/pciLib
Unbundle drvTS (timestamp driver)
3.14 release date?
Large array support a priority for SNS
Stephanie Allison
3
Linux PC IOC: Vision (M.
Kraimer)
•
•
•
•
7/20/2015
Existing Linux good enough for some
Applications.
2.6 Kernel will be good enough for additional
Apps.
Often small part of App has stricter real time.
requirements. In this case consider
RTLinux/RTAI.
For demanding Apps use RTEMS or stay with
vxWorks
Stephanie Allison
4
Linux PC IOC: Vision (M.
Kraimer)
•
BUT: Linux isn’t a real time operating
system
—
—
—
7/20/2015
Non-preemptive kernel => no context
switch while kernel active.
Interrupts can be disabled for long periods
of time.
Worst case can be 100s milliseconds.
Stephanie Allison
5
Linux PC IOC: Progress (M.
Kraimer)
•
Linux Kernel support now exists for
—
—
—
•
EPICS GPIB driver
—
—
—
•
7/20/2015
Generic IP carrier support (Like ANJs IPAC
support)
PCI-40A : SBS Quad IP Carrier for PCI Bus
IP-488 (Green Springs GPIB IP using the ti9914)
Implements Benjamin Franksen’s interface
Talks via file system to IP488 Linux driver
DG535 support works (For awhile before crashing)
Message Passing Facility MPF ported to 3.14
Stephanie Allison
6
Linux PC IOC: Still to do (M.
Kraimer)
•
•
IP Serial, IP330 (ADC), DAC128V (DAC),
ipUnidig (Digital I/O)
BIG ISSUE
—
—
•
Initial Strategy
—
—
•
7/20/2015
MPF support allows interrupt routine registration,
i.e. user code called directly by interrupt routine.
IP330 allows floating point in interrupt routine.
Extract interrupt handlers and use insmod to put
them in kernel
Convert floating point to integer.
Allow user level to access IP register space.
Stephanie Allison
7
Linux PC-104 IOC: Why?
(Arne Freyberger)
•
•
•
•
•
•
7/20/2015
Desire to control HW not requiring VME
(Serial, ARCnet, GPIB)
Small form-factor…put it inside a magnet
Large variety of cards and features
Linux: No licensing issues for Linux
Linux: Familiar UNIX-like OS
Not real-time, but moving in that direction
(kernel 2.5.15)
Stephanie Allison
8
Linux PC-104 IOC: Status
(Arne Freyberger)
•
•
•
•
•
•
7/20/2015
PC104 card: 32MB RAM; 64MB Flash;
Ethernet port and 2 serial ports
Using EPICS R3.14.0beta1 compiled under
RedHat7.2
Used to host soft-only records (~1000 calc/ai)
EPICS database processing works well
SNL code crashes
Working on building our own kernel
Stephanie Allison
9
RTEMS IOC: Advantages (Till
Straumann)
•
•
•
•
•
•
7/20/2015
Good performance
Open source
No fees
History > 10y; supportive user
community (mailing list)
Maintenance
Supported by EPICS
Stephanie Allison
10
RTEMS IOC: Disadvantages
(Till Straumann)
•
•
•
•
•
7/20/2015
Critical mass (of EPICS users) not yet
reached
Less BSPs available
No standardized API for lowlevel resource
management and basic BSP services (IRQ,
address probe/ mapping, VME, PCI)
No NFS (for EPICS not very important, has
TFTPfs)
No shell (but: iocsh, monitor, cexp)
Stephanie Allison
11
RTEMS IOC: Experience (Till
Straumann)
•
•
•
•
•
•
7/20/2015
Development of RTEMS applications and
drivers
Study / comparison of latency behavior
(RTEMS/ vxWorks/ RTLinux)
Development of BSP for Synergy VGM series
PPC SBC
Kernel internals
Port of EPICS to VGM BSP (easy, thanks
folks)
EPICS Applications on RTEMS
Stephanie Allison
12
Licensing: Old Agreement
(Andrew Johnson)
•
•
•
•
•
7/20/2015
EPICS was provided for “research, development,
evaluation and demonstration purposes only”
No royalties were charged because of “the
collaborative nature” of the agreement
EPICS was “loaned” to other collaborators, and must
be returned or destroyed on termination of the
agreement.
All enhancements must be made available to LANL
for royalty-free distribution to other EPICS users
Licensees are not allowed to distribute EPICS to other
sites without further written permission
Stephanie Allison
13
Licensing: New EPICS Base
License (Andrew Johnson)
•
ANL Legal department developed a new
license for EPICS Base that meets both
DoE and EAR99 needs:
—
—
—
—
7/20/2015
Permits copying and modification with an organization
Allows distribution of modified copies outside of the licensee’s
organization, but only to other (verified) licensees
•
Verification involves checking the web-published list of
licensees, contacting APS only if the destination site is not
publicly listed
Lists the US Government’s rights to use the software
Contains warranty disclaimer and liability limitation clauses
Stephanie Allison
14
Licensing: EPICS Open
License (Andrew Johnson)
•
The EPICS Open License was derived from the Base
License, with the EAR99 restrictions removed:
—
—
—
—
•
•
•
7/20/2015
Permits modifications and redistribution of the software
Requires the copyright notice and license agreement be retained
Requires any modifications made to be marked as such
Contains disclaimers that make it acceptable to DoE
APS is working to convert unbundled support
modules and extensions to use the new EPICS open
license
We can only do this for code written at Argonne
Other sites: talk to your management about licensing
your locally-produced code, preferably as Open
Source
Stephanie Allison
15
GTR (M. Kraimer)
Generic Transient Recorder – Definition
• ADC(s) with common gate, clock, trigger
• Memory to record samples
• Provides following methods for data
collection:
—
—
•
•
7/20/2015
postTrigger – Data sampling starts on trigger.
prePostTrigger (optional) – Data sampled
continuously into circular buffer. On trigger,
acquire additional set of samples and stop.
Device specific clock and trigger options.
Supports multipleStephanie
events
(optional)
Allison
16
GTR: Support (M. Kraimer)
•
•
Generic adl file for control.
Generic set of records to control and collect
waveforms:
—
—
—
•
Other Features?
—
7/20/2015
Generic device support.
Generic driver which calls TR specific drivers.
TR specific drivers for Joerger VTR1012,
VTR10010, VTR10012, VRTR10012_8 and Struck
SIS3300, SIS3301 TRs.
—
VTR10012 and SIS330x provide many additional
features
Define other interfaces?
Stephanie Allison
17
GTR: postTrigger (M.
Kraimer)
7/20/2015
Stephanie Allison
18
GTR: prePostTrigger (M.
Kraimer)
7/20/2015
Stephanie Allison
19
GTR: Performance (M.
Kraimer)
•
•
Testing showed that limit was 1
megaSample/sec.
Same limit with 68040 and with powerPC.
Limit was VME transfers from recorder
memory.
Why? This is only 2 megaBytes/sec
With a VME bus analyzer we determined that
—
—
•
7/20/2015
VTR1012 responded in 190 nanoseconds.
Rest of the overhead was VME interfaces.
Andrew Johnson provided generic DMA
interface
Stephanie Allison
20
VDCT: Package A (R Sabjan)
More or less bug fixes:
1) Make all fields available as link destinations
2) Always place connectors on top of symbols.
3) The "Up One Level" button doesn't work when vdct is first
started.
4) Multiple zoom/un-zooms relocates the view rectangle location.
5) Symbols don’t scale at the same proportion than the
lines/spaces
6) Print Preview doesn’t erase previous preview
7) Create Makefile for VDCT.
Go to JDK 1.4 – but are now really I/O performance problems?
7/20/2015
Stephanie Allison
21
VDCT: Package B (R Sabjan)
•
New features in:
—
—
—
—
—
—
—
—
—
—
7/20/2015
data entry (links,..)
option to select which fields are shown
"shortcut-stub" (global tags), “external link stub”
place comments and graphical objects
Scaling of Printing: resolution and paper size
Inspector
Configuration
Hierarchical capabilities
Navigation tools
Documentation
Stephanie Allison
22
VDCT: Package C (R Sabjan)
•
•
•
•
Provide a gdct conversion tool.
Provide the ability to have multiple files/dbs
open at one time.
Define interactions with higher level
tools/applications (Oracle).
Use the dbStaticLib to access the files
—
•
7/20/2015
dbStaticLib would need to be modified by APS
staff to cope with comments.
Provide a CapFast conversion tool
Stephanie Allison
23
Channel Access Extensions
•
•
•
•
7/20/2015
MatLab CA Interface
PV Proxy Gateway
PV Name Server
Proxy IOC
Stephanie Allison
24
MatLab CA (MCA) Interface
(Ernest Williams)
•
•
•
•
•
•
•
•
7/20/2015
From Spear/SSRL
Added fixes/upgrades
Now survives heavier usage
Now works on Win32 and Linux
Complements EDM
Rapid programming and visualization
C++
MCA functions accessible as MatLab functions
Stephanie Allison
25
MatLab CA (MCA) Interface
Plans (Ernest Williams)
•
•
•
•
•
•
7/20/2015
SNS to maintain MCA instead of
Spear/SSRL
Spear/SSRL still responsible for Win32
port
Make more portable (remove ifdef’s)
Add EPICS timestamp support
Develop MatLab CA server
Improve reliability/robustness
Stephanie Allison
26
CA Proxy Gateway (Ralph
Lange)
Allows CA between separated networks –
configurable through regular expression
filters and CA access security.
CA Clients
CA Gateway
CA Servers
7/20/2015
Stephanie Allison
27
CA Proxy Gateway (Ralph
Lange)
Clients point to one proxy that distributes
the data with minimal impact on the
private parts.
CA Clients
CA Gateway
CA Servers
7/20/2015
Stephanie Allison
28
CA Proxy Gateway: Caveats
(Ralph Lange)
•
•
•
7/20/2015
The CA Gateway always introduces a singlepoint bottleneck in a scalable distributed
system.
A heavily loaded Gateway is a CPU and
memory consuming application that usually
will add overhead to the system: Expect some
increase in latency and connect time.
In some cases too loose configuration may
put even more load on the precious side
instead of protecting the IOCs.
Stephanie Allison
29
CA Proxy Gateway: Possible
Improvements (Ralph Lange)
•
•
•
•
•
•
7/20/2015
New configuration file format (hierarchical
regexp patterns)
New configurable watchdog to introduce GUI
at process level (borrow archive manager
code)
Some additional statistics
Code documentation (Doxygen?)
User manual
CMLOG interface
Stephanie Allison
30
Nameserver Update (Joan
Sage)
•
•
•
7/20/2015
Currently in use at JLab for all client
applications except those few which
haven’t been rebuilt with EPICS 3.13
Handles more than 250,000 pvs and all
control room hosts
Reduces load on IOCs and reduces
client connection time
Stephanie Allison
31
Nameserver Update (Joan
Sage)
•
•
7/20/2015
Although updates to hashtable are automatic
when IOCs are rebooted, if pvs are moved
from one IOC to another, the IOC which loses
the pvs must be rebooted before the IOC
which gains them.
The nameserver has twice gone into a mode
in which it takes 100% of cpu time.Gateway,
Netscape, medm also do this. HPUX problem?
Stephanie Allison
32
Proxy IOC (PIOC) (Joan
Sage)
•
•
•
•
•
7/20/2015
A server based on PCAS
A sponsor API which allows application
programmers to create and delete pvs from
within code or scripts
Purpose:
Integration of high level application’s process
variables into EPICS.
System simulation and offline testing of
applications which normally access IOC pvs.
Stephanie Allison
33
PIOC Scope (Joan Sage)
•
Supports all CA datatypes and CAS pv types
channel access security
pv attributes:
hopr, lopr, drvh, drvl, alarms, precision
units, status and severity
•
Ready for beta testing
•
•
•
•
7/20/2015
Stephanie Allison
34