[THE INDEX PANEL]


November 1, 1995 All That Fits is News to Print Vol. 9, No. 8

Contents of Vol. 9, No. 8

  1. Introduction
  2. CA Utilities and Repeater Process
  3. Configurations
  4. Multiknobs
  5. Channel Panel
  6. EPICS Displays from the SCP
  7. History Buffers
  8. Summary Information Process
  9. Correlation Plots
Postscript version TeX source

Page contact and owner at end of this issue.


Introduction

October 26, 1995

Author: Stephanie Allison Subsystem: EPICS User Impact: Yes
Panel Changes: None Documentation: Yes Help File: No

This special issue of the Index Panel is devoted to the integration of the Experimental Physics and Industrial Control System (EPICS) into the SLC control system. EPICS is being used for several new controls projects including:

A description of EPICS is provided on the WWW (http://epics.aps.anl.gov/asd/controls/epics_home html). The EPICS software is developed and maintained by a collaboration of people from sites around the world, now including SLAC. As a result of the collaboration, the software is quite portable and extensible, and support for many platforms and hardware interfaces is available. Though there are many good features of EPICS to be utilized by the above projects, only one aspect, channel access, has been integrated with some higher level applications on the VAX SLC control system and will be discussed in this article. As they become available, other controls applications that use the EPICS toolbox will be discussed in future index panel articles.

Like the SLC control system, EPICS is a high performance, distributed database-driven system. The EPICS databases reside on microprocessors, usually in VXI or VME crates, called Input/Output Controllers (IOCs). These IOCs are similar in function with the SLC micros though the implementation is quite different. Functionality includes control and monitoring of hardware residing in the crate, data processing, and intermediate level applications (sequences) that need to be fast and do not require a direct user interface. Unlike the SLC micros, which run the RMX real-time operating system (RTOS) and communicate with the VAX using SLCNET, the IOCs run the VxWorks RTOS and communicate with the VAX and UNIX machines over Ethernet. The ability to transmit error messages from the IOCs to the VAX SLC error handler is still under development and will be discussed in a future index panel article.

EPICS Database

Each type of entity in the control system has an associated record type in the EPICS database. Commonly used record types include the analog input and output, binary input and output, multibit binary input and output, waveform, calculation, and subroutine records. Each record type has a unique structure and set of fields used to define the entity. A field is roughly analogous to a secondary in the SLC database and an instance of a record is roughly analogous to a unit in the SLC database.

Each field has a name (up to 4 characters, all upper-case). Most record types have fields called VAL, for current value, STAT and SEVR, for current status and severity, and DESC, for an arbitrary 28 character description. The analog record types also include fields for engineering unit name (EGU), high and low operating limits (HOPR, LOPR), alarm and warning limits (HIHI, HIGH, LOW, LOLO), fields for engineering unit conversion, and many others. The binary record types have zero and one state names (ZNAM, ONAM) and so on. Records associated with hardware (input or output) have fields defining the hardware location and the driver to use in accessing the hardware. Instances of records with no associated hardware are called "soft" records and are normally used for calculations using input from other records or to hold user input.

Each instance of each record is processed ("scanned") by the IOC either periodically or whenever a particular event happens, such as an I/O external interrupt, event triggered by software running on the IOC, or an update from the VAX, SUN station, or another IOC.

To allow access to records by clients on different hosts, each record is given a name (.NAME) that is unique across all IOCs on the same network. The combination of a record name and a field name, concatenated using a period, is called a channel. For example, in the PEP-II prototype EPICS database, RH10:SIMULATR:TEMP.VAL is the channel for the current value of the HER RF station 1 simulated temperature. Special characters are allowed in the record name, and colons are commonly used for readability. Since most applications only care about current value, often the channel is just the record name (ie, RH10:SIMULATR:TEMP), and the .VAL is assumed by channel access.

The value of a channel can be any data type including analog (float or double) and discrete (integer or string). The channel can be either single-valued, such as the VAL field of an analog or binary record, or multi-element, such as the VAL field of a waveform record.

Record Naming Convention

In order to provide some sanity to record names and to ease the user interface for applications that require a user to type in a channel name, a record naming convention has been chosen. This convention also makes it easier to integrate channel access into existing VAX SLC applications. The record name will be all upper-case and will consist of up to 4 subnames, each subname limited to 12 characters. It will be no greater than 18 characters total. A colon will be used for separation between subnames.

In addition to the record naming conventions, the DESC field of all records is reserved for special use by the SLC control system. The first 10 characters will contain a knob label for those records that will be knobbed, usually analog output records. The last 4 bytes of the 28 character field will contain the VAX status word (VSTA), maintained by the summary information process.

Channel Access

A small number of the VAX SLC applications have been enhanced to get and put data into the EPICS databases using "channel access" (CA), a software layer allowing EPICS database access over Ethernet using TCP/IP. These SLC applications are designated as CA "clients" and thus are able to communicate with the CA server tasks which run on the IOCs. The upgraded SLC applications include:

Configurations Multiknobs History Buffers Summary Information Process (SIP) Correlation Plots

New SLC applications are provided for:

EPICS Channel Panel EPICS Displays from the SCP

CA clients that only care about significant changes to a channel use "monitors" instead of polling (periodic gets). When a monitor is posted, the IOC sends fresh data up to the client only when the record status changes, when the data changes more than an amount specified in the database (for analogs), or when the state changes (for binaries). This method is intended to keep network traffic to a minimum, assuming that the database is set up correctly and the channel is not too noisy. Currently, SIP is the only SLC application that uses monitors. The other applications do straight gets and puts of either a single channel or a list of channels.

CA security is used on the IOCs to check that access to a particular channel by a particular client on a particular host is allowed. The most common usage will be to check that puts are done only on controllable output records.

EPICS Displays

A display editor (EDD) is available on the SLC SUN stations for creating graphical EPICS real-time color displays. These displays can then be invoked on the SUN stations using the display manager (DM) and shown on any X-terminal. DM uses channel monitors to drive all the monitored elements on the display, including text, plots, bars, meters, and indicators. CA put is used for controllable elements, including text, sliders, choice buttons, and message buttons. The ability to call up related or lower level displays from the current display is available.

If for some reason, a channel cannot be accessed, for all display elements that use that channel, DM will display a white color and, if there is room, will identify the channel name and indicate that it is not connected.

EPICS displays will be available to users in place of SLC VAX DCXP displays (.DSP). A later section describes how an EPICS display can be invoked from the SCP.


CA Utilities and Repeater Process

October 26, 1995

Author: Stephanie Allison Subsystem: EPICS User Impact: Small
Panel Changes: None Documentation: Yes Help File: No

A new VAX shareable, CAUTIL, provides channel access utility routines for use by higher level SLC applications. This shareable also contains the low level EPICS CA client software, currently at revision 3.12.1. It uses MULTINET for the network interface. Utilities are provided for:

Get and Put a Single Channel Get and Put a List of Channels Get Common Channel Attributes (Size, Type, Limits, EGU, DESC, etc) Post and Clear Monitors Channel Name Utilities

If for some reason, a channel cannot be accessed (the IOC is down or not available or there is some sort of network problem), CAUTIL logs an error message identifying the channel and indicating that it cannot be connected or that it did not respond in time.

A new process, "CA repeater", is now included in control system startup. Its main purpose is to forward UDP beacon (or "alive") messages from the IOCs to CA clients on the VAX. These messages are broadcast periodically (currently every 15 seconds). CAUTIL uses these beacon messages to determine when an IOC has gone down in order to flag channels as unknown or not-connected.

Both CAUTIL and CA repeater translate VAX logical names (EPICS_*) to determine EPICS system parameters ("environment variables").


Configurations

October 26, 1995

Author: Dan Van Olst Subsystem: EPICS User Impact: Large
Panel Changes: Few Documentation: Yes Help File: Yes

Configurations (configs) is a SCP facility that is used for saving accelerator parameters, such as magnet and klystron settings, as well as BPM measurements. It permits physicists and accelerator operators to quickly configure the accelerator by restoring previously saved settings. Configs also functions as a diagnostic tool, since it can be used to compare past accelerator parameters to current ones.

Since configs performs its operations on arbitrary collections of devices, known as "regions", parameters can be restored to one region of the accelerator without impacting other regions. There is also support for temporary ("scratch") configs, which can be made permanent ("normal") later. Users are also able to mark one saved config in a region the as the best-known ("gold") config.

Configs has been extended to support regions composed of EPICS channels. All types of channels are supported, including multi-element channels. Wildcarding of channel names or use of display groups (DGRPs) are not currently supported. Also, due to the large difference between the specification of channels and SLC devices, these two entities cannot be combined in one config region.

A CA config region is composed of one or more channel name triplets. The three channel names in each triplet indicate a "configuration" channel, a "desired" channel, and an "actual" channel (known as CON, DES, and ACT). The three channels specified must have the same data type and the same number of elements. The CON channel can be used to store a calculated value for a device, perhaps a value from a model. The DES channel is typically the setpoint for a device. The ACT channel is typically the readback for a device. The CON, DES, and ACT channel names can be identical, if desired.

Panel Overview

The CA Config Panel can be reached from the INDEX PANEL via

CONFIG
 Index 
  

followed by

MISC
 CONFIG 
 SELECT 

followed by

CHANNL
 ACCESS 
 CONFGS 

. The user must first select a config region on this panel before doing most functions, though currently no regions are defined. A special config region (CA_TEST) is provided for testing using the PEP-II prototype database (available to the SLC VAX only) and can be accessed by going from the USER DEV PANEL to the EPICS DEV PANEL to the CNF CA TEST panel.

Functions that did not require modification include those that deal with config file management and not the contents of the files:

Move Scratch To Normal - transform a scratch config file into a normal config file. Display Index - display all previously saved config files for the selected region. Delete Config - delete one or more previously saved config files for the selected region. Display Loaded Configs - display the index number of the last loaded config file for all regions. Choose New Gold - change the gold config for the selected region.

Certain functions were not modified for EPICS and remain unsupported:

Partial Loading and Activating of a CA Config Using Multiknobs to Activate a CA Config

Functions that were modified include those for saving, loading, activating, and displaying CA configs. These functions are performed in a manner very similar to other types of SLC configs, though the contents of a CA config file are quite different.

The current value of each channel in the selected region is saved to a config file using the SAVE CONFIG button. A status is also saved for each channel to indicate if the channel was unavailable or marked as bad by the IOC. The SAVE TYPE button is used to toggle between CON, DES, and ACT to indicate which channel name in the triplets to use.

The values in a previously saved config file are restored to the database using the LOAD CONFIG button. The CON channel is set to the value from the file, if the status indicates the value is good.

Depending on the application, after a config is loaded, it can be activated using the ACTIVATE CONFIG button. The DES channel value in each triplet is set to the current CON channel value from the database, if the status of the CON channel is good.

The contents of a previously saved file are displayed using the DISPLY CONFIG (ALL) button. For each channel, the name, saved value from the file, and the current CON and DES values from the database are displayed. If any value is bad, the status is shown instead. Color coding of the CON and DES values depend on the channel data type. For analog channels, red values are outside 1% of the file value, yellow values are between .5% and 1%, and green values are within .5%. For channels with discrete states, red values do not match the file value and green values do.

The contents of a previously saved file that differ from current values are displayed using the DISPLY CONFIG (RED) button.

The Gold CA Config Panel can be reached via

GOLD
 CH ACC 
 CONFIG 

. All functions on this panel are either the same as for SLC configs or are similar to what has already been described for scratch and normal configs.


Multiknobs

October 26, 1995

Author: Ron Chestnut Subsystem: EPICS User Impact: Small
Panel Changes: Few Documentation: Yes Help File: Yes

Multiknobs is a SCP facility which allows the coupling of many devices onto one knob and has been expanded to allow the knobbing of EPICS channels. Multiknob files (.MKB) in the MKB directory are used to set up the multiknob and specify control parameters. EPICS channels and SLC devices can be mixed in the same file.

The channel name entries in the multiknob file are recognized either by the format of the name or by the keyword /EPICS. Following are two examples (from MKB:EPICTEST.MKB):

Specification by format (colons are the giveaway):

def/dev=(rh10:gapvoltg:oper)

Specification by keyword:

def/dev=(rh10,drivmodu,pdes)/epics

All input is automatically converted to upper-case. The default field used in the channel name is VAL. This can be overidden by the CHAN keyword. To connect to the HOPR field instead of VAL, the last two examples would be:

def/dev=(rh10:gapvoltg:oper)/chan=hopr

and

def/dev=(rh10,drivmodu,pdes)/epics/chan=hopr

Messages are logged if any channel in the multiknob file is either currently unavailable, multi-element, read-only, or has discrete states. While multiknobbing is in process, messages are logged if any channel goes bad, as marked by the IOC, or if any channel becomes unavailable due to an IOC or network problem. The engineering units name, control limits, and knob label from the EPICS database are provided when the multiknob is first assigned.


Channel Panel

October 26, 1995

Author: Ron Chestnut Subsystem: EPICS User Impact: Small
Panel Changes: Few Documentation: No Help File: Yes

The EPICS channel panel is provided to examine, modify, and knob single-valued channels. This panel can be reached from the INDEX PANEL via

USER
 DEV 
 PANELS 

followed by

EPICS
 DEV 
 PANEL 

followed by

EPIC
 CHANNL 
 PANEL 

. This panel is currently set up to use channels from the PEP-II prototype database which is available to the SLC VAX only.

A list of preselected EPICS channels is provided by SHADOW declarations on the panel (EPICPANL.PNL). This panel is meant to serve as a cloneable model for future panels which serve some EPICS subsystem, such as PEP-II HER RF. On the cloned panels, the SHADOW declarations can preselect meaningful channels.

The button

ENTER
 CHAN 
  

is provided to select an arbitrary channel name. The entered channel name is added to the list of total channels available for selection. This list includes those channels from the SHADOW declarations plus all individually selected channels, up to a predefined limit.

SELECT
 CHAN 
  

allows selection of a channel from the list.

DISPLY
 LIST 
  

displays the list of channels and their current value, status (in hex), and writeability.

Once a channel is selected, the user may assign it to a knob and knob it using the standard SLC knob interface. The engineering units name, control limits, and knob label from the EPICS database are provided to the knob interface when the knob is first assigned. To just set the channel to a particular value,

ENTER
  VAL 
  

is provided and will prompt for a new value and set the channel to that value. A message is displayed if the user attempts to change or assign a knob to a channel which is either currently unavailable, multi-element, or read-only. A message is also displayed if the user attempts to assign a knob to a channel with discrete states. While knobbing is in process, messages are logged if the channel goes bad, as marked by the IOC, or if the channel becomes unavailable due to an IOC or network problem.


EPICS Displays from the SCP

October 26, 1995

Author: Ron MacKenzie Subsystem: EPICS User Impact: Small
Panel Changes: Few Documentation: Yes Help File: Yes

The user can now push a button on the SCP and have an EPICS display appear on the same X-terminal as the SCP. Currently, a PEP-II prototype display is accessible from the EPICS development panel using

PEP-II
 PROTO 
 DISPLY 

. It is anticipated that each project will have a main EPICS display, from which other related and lower level displays will be accessible. As each main display becomes available, a button for it will be placed on the appropriate SCP panel.

Only one main EPICS display is allowed on an X-terminal at one time. If a display is requested and it is already active, a message is shown on the SCP startup window. A display request results in a remote DM startup on the SLC SUN station using a special UNIX account. Any problems with this startup results in a message on the SCP startup window and users must then contact their favorite system administrator.

The EPICS display will stay active after the user exits the SCP from which it was created. Once the user is finished with the display, it is good practice to exit from the display (push right mouse button and select "exit display window"). The number of active EPICS displays should always be kept to manageable size to minimize network traffic.


History Buffers

October 26, 1995

Author: Ralph Johnson Subsystem: EPICS User Impact: Small
Panel Changes: Few Documentation: Yes Help File: Yes

The SLC history buffer system provides users with the ability to record device data at a specified time period. Once recorded, the data can then be plotted from the SCP over a specified time interval. How the data is plotted is configurable by the user. A new history buffer process, HSTBEPICS, is now included in control system startup. It functions similarly to HSTBSLC, the process that gathers histories of SLC devices, except that it handles channels instead.

History files (.HST) in the HST_SOURCE directory are used to specify the channels to be saved and the time period. Except for the channel name, the HSTBEPICS files use the same format as the HSTBMAIN files. The channel name specification is similar to that for multiknobs (DEF is replaced with DEFHSTB). Channels and SLC devices cannot be combined in the same file. Wildcarding of channel names is not currently supported. History buffering of either multi-element channels or channels whose values cannot be represented using the float data type is not allowed. HST_SOURCE:EPICSTST.HST is an example.

History buffer RMS calculations are not available for channels since it is more appropriate to have these calculation performed by the IOCs if necessary.

If a channel becomes unavailable due to an IOC or network problem, no message is logged by HSTBEPICS. Instead, the last known value (or zero if the channel has never been available) continues to be saved. The history plot of such a channel will show a straight line during the unavailable time interval. Also, HSTBEPICS ignores the channel status (the status indicating if the channel is good or bad as determined by the IOC).

When using the HSTBINS program to install a new history file, the keyword /EPICS is used to indicate that the file contains channels instead of SLC devices.

To display the history plot from general purpose history plotting panel,

ENTER
 FULL 
 NAME 

is provided for entering the channel name. The rest of the user interface remains unchanged and is exactly the same for both channels and SLC devices.

Canned history plot files (.DSP) in the DSP_SOURCE directory can be used by the SCP to display commonly-used predefined plots. Except for the channel name, the format for SLC devices and channels is the same. The channel name specification is similar to that for multiknobs. SLC devices and channels can be combined in the same file.

There are plans to support channels in the history buffer correlation facility. A future index panel article will advertise its availability.


Summary Information Process

October 26, 1993

Author: Ralph Johnson Subsystem: EPICS User Impact: Small
Panel Changes: Few Documentation: Yes Help File: No

The summary information process (SIP) periodically summarizes the status or states of groups of related devices and provides the results to both SCP displays and continuously updating displays (CUDs). It also functions as an alarm handler since it logs all changes of status or state in the SLC error log. SIP has been expanded to include EPICS channels.

SIP files (.SIP) in the SIP_SOURCE directory are used to specify the channels to be included in each summary. Both channels and SLC devices can be combined in the same summary. Except for the channel name, the format of the SIP files remain unchanged. The channel name specification is similar to that for history buffers (DEFHSTB is replaced by DEFSUMY). Wildcarding of channel names is not currently supported. Multi-element channels are not supported.

SIP places a monitor on each channel in each summary. If the channel has discrete states, the monitor triggers on a change to either state or status. If the channel is analog, the monitor triggers on a status change only. When a change occurs, a message is logged identifying the channel name and the new status or state. SIP also maintains the alarm summary bits in the VAX status (VSTA) of each channel. The VSTA is contained in the DESC field of each channel and is saved and restored across IOC reboots.

If a channel becomes unavailable due to an IOC or network problem, no message is logged by SIP and the channel is factored into the summarization as unknown.

The SCP status display summary (SDS) facility, which displays lists of devices contained in a summary box, has been modified to include channels. Also, SCP facilities for acknowledging errors and assigning cater numbers are also modified to update the channel VSTA.


Correlation Plots

October 26, 1995

Author: Greg White Subsystem: EPICS User Impact: Small
Panel Changes: Few Documentation: Yes Help File: Yes

Correlation plots is a SCP facility for performing accelerator physics and diagnostics experiments that involve the simple statistical correlation of a small number of independent variables, with some fairly large number of dependents. It has been enhanced to include EPICS channels as both independent (step) variables and dependent (sample) variables. During the correlation acquisition, the step variables are moved a delta amount, the specified settling time is allowed to pass, and the sample variables are acquired. After the acquisition, the step variables are restored to their pre-acquisition values.

When prompted for a step or sample variable, the user may enter any EPICS channel name, except for those that are currently unavailable, have bad status, multi-element, or have discrete states. Also, step variables cannot be read-only. Both channels and SLC devices may be combined in one correlation acquisition.

The rest of the user interface, for both acquisition and data analysis and plotting, remains unchanged and is exactly the same for both channels and SLC devices. The channel severity is used for color-coding in the correlation plot - see the panel help for the first display panel, 2nd page. Correlation plots arithmetic, saving correlation data to a file, saving a correlation plot setup to a file, and all types of fitting are supported for channels.

During the acquisition, if a channel used as a step variable becomes unavailable or goes bad, as marked by the IOC, the acquisition is halted and an attempt is made to restore all the step variables.


Back to top of this issue


October 26, 1995 Index Panel Vol. 9, No. 8

Translated from original PlainTeX by index2html.pl.

*Links followed by an asterisk are limited to SLAC clients only.
  Last modified on Wednesday, July 26, 2006 Webmaster